For Loops
There are some instances that you may want to have a for loop and not have it driven by the XML data coming in.It is in the user guide in the section where shapes are discussed but it is not elaborated at all. I used it in my "Dynamic Formatting" blog.
Here is the construct of the loop:
<?for-each@inlines:xdoxslt:foreach_number($_XDOCTX,1,3,1)?><-some text-><?end
for-each?>
$_XDOCTX,1,3,1 - This number will be the start of the count.
$_XDOCTX,1,3,1 - The loop ends when this number is reached.
$_XDOCTX,1,3,1 - This number is used as the increment of the count.
The output of the above example will be: <-some text-><-some text-><-some text->
If you remove the @inlines then the output text will be:
<-some text->
<-some text->
<-some text->
Instead of hard coding the three numbers, a variable can be used in one or more places.
This comment has been removed by the author.
ReplyDeleteRTF Issue details:
ReplyDelete====================
Expected output:
------------------------------
Supplier A Site 1
Supplier A Site 2
Supplier B Site 1
Supplier C Site 1
Current output :
------------------------------
Supplier A Site 1
Supplier A Site1--- wrong data(1st record repeated twice)
Supplier B Site 1
Supplier C Site 1
Some issue with the for loops. Please check the attached RTF and the xml file