We have are using a template syntax that isn’t XML friendly. I wanted to test xslt transformations. I created a filter that changes the variables to something that XML likes. A XSLT filter. Finally a filter that restored the variables to their original state.
filter 1
$<variable> -> $[variable]
filter 2
xslt
filter 3
$[variable] -> $<variable>
When I run the filters on a Copy only filter 1 and 3 is executed.
When I run 1 and 2 it executes both.
When I run 2 and 1 or 3 only 1 or 3 is executed.
If I use only 2 the transformation fails because XML is destroyed by the variables.
I have a github repo with the files. GitHub - mcNisse/gradleXsltFilter: A repo for testing/debugging xslt filter in gradle. The filters is in buildSrc.
the task transform
runs the filters that I want it to work.