microsoft / slow-cheetah

Tooling for XML and JSON file transforms on build from Visual Studio and MSBuild
Other
324 stars 67 forks source link

Need guidance: Document Transform commandlets #156

Closed mwpowellhtx closed 6 years ago

mwpowellhtx commented 6 years ago

For a given element, you include xdt:Transform("Replace") for a given element. This is well and good, but how do I xdt:Transform("Add")?

I mean beyond the examples involving configuration with actual <add ... /> functionality.

For instance,

<Task Name="MyCustomAddedTask" ... xdt:Transform("Add") />

Or, otherwise "append" to the transformed output...

Better yet, what else can I do besides Replace? A more comprehensive set of documentation would be welcome along these lines. That, and/or I cannot easily trace the Replace Transform to an area in the code.

Thanks!

davilimap commented 6 years ago

This is more specific to XDT, the transformation engine SlowCheetah uses for XML files. You can find more info on that here. I think what you're looking for is the Insert command.

mwpowellhtx commented 6 years ago

Yessir, Insert was it, thank you; but the broader reference is also appreciated, thanks. Honestly, maybe I hadn't asked the right questions up to that point, but I'm not sure I would have found the Transformation Syntax reference otherwise.