Xss:marker - xkp/Doc GitHub Wiki
Sometimes when generating code you might need to write code to parts of the output other than the current position. The xss:marker tag allows the developer to create marks that will be written to later on. The out dsl supports a marker parameter that will redirect the output to the specified marker.
- name: the name of the marker.
Suppose you have the following:
//Variables here
<xss:marker name="variables"/>
//Some other code here
And later on you have:
<xss:code>
array<string> variables = ["btn1", "btn2", "btn3"];
for(var variable in variables)
{
out(marker = "variables")
{
var <xss:e v="variable"/>;
}
}
</xss:code>
The output will look like this:
//Variables here
var btn1;
var btn2;
var btn3;
//Some other code here