Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 16

XML TAGS

For loop
F -<?for-each:<group name>?>

E - <?end for-each?>
GROUP BY
G -
<?for-each-group:<group name>;./<column name?>

F - <?for-each: current-group()?>

E - <?end for-each?>

E - <?end for-each-group?>
EXAMPLE
PAGE BREAK
<?split-by-page-break:?>
sort records
<?sort:<field name>;'ascending'; data-type='text'?>
If condition
IF - <?if: condition?>

END IF - <?end if?>


IF THEN ELSE
<?xdofx:if <condition> then ’<text>’
else
if <condition> then ’<text>’
else
’<text>’
end if?>
To apply background color for odd
rows

<?if@row:position() mod 2=0?>


<xsl:attribute name="background-color"xdofo:ctx="incontext">
Name of the color
</xsl:attribute><?end if?>
Highlight the cell
with condition
<?if:<condition>?>
<xsl:attribute xdofo:ctx="block" name="backgroundcolor">
Red
</xsl:attribute>
<?end if?>
parameter
<?param@begin:parameter_name;parameter_value?>

► parameter_name is the name of the parameter

► parameter_value is the default value for the parameter

► param@begino:
- is a required string to push the parameter declaration to the top
of the template at runtime so that it can be referred to globally in
the template.
XDOFX COMMANDS
► <?xdofx:if
instr(xdoxslt:get_variable($_XDOCTX,'TOT'),',',1)>0 then
replace(xdoxslt:get_variable($_XDOCTX,'TOT'),'.',',') end
if?>

► <?xdoxslt:replace(xdoxslt:get_variable($_XDOCTX,'TOT'),'.'
,',')?>

► <?xdofx:substr(xdoxslt:replace(xdoxslt:get_variable($_XD
OCTX,'TOT'),'.',','),instr(xdoxslt:get_variable($_XDOCTX,'TO
T')),1),2)?>
► <?xdoxslt:set_variable($_XDOCTX,’TOT’,
xdoxslt: get_variable($_XDOCTX,’TOT’) +
number(translate(C_EXTENDED_PRICE,',','.'
))) ?><? end if ?>

► <?format-
number:xdoxslt:replace(xdoxslt:get_variable
($_XDOCTX,'TOT'),'.',',');'999G999D99'?>
► <?xdofx:ifinstr(C_EXTENDED_PRICE,',',1)=0
then C_EXTENDED_PRICE||',00' else if
length(substr(C_EXTENDED_PRICE,instr(C_EXTEN
DED_PRICE,',')))=2 then C_EXTENDED_PRICE||0
else C_EXTENDED_PRICE end if?>

► <? xdoxslt: set_variable($_XDOCTX,’TOT’, xdoxslt:


get_variable($_XDOCTX,’TOT’) +
number(translate(C_EXTENDED_PRICE,',','.'))) ?>

You might also like