Posts

Showing posts with the label subtemplate

subtemplating

Image
Have a look at this, just adding sub template and calling them based on the concurrent program parameter. <?param@begin:ReportType;string(‘YS’)?> <?choose:?> <?when: $ReportType =’YES’?> <?call:TC1?> <?end when?> <?when: $ReportType =’NO’?> <?call:TC2?> <?end when?> <?otherwise:?> <?call:TC2?> <?end otherwise?> <?end choose?> Run with ReportType as NO or other than YES. You should get the result as follows Run with ReportType YES. You should get the result as follows

No conditional import - Subtemplate

Image
You cannot do the conditional import of sub-template. Import them and call them conditionally Create a rtf called MAIN.rtf paste the follwoing. <?import:file:///C:/OraFusion/subtemplate1.rtf?> <?import:file:///C:/OraFusion/subtemplate2.rtf?> <?call@inlines:template1?><?with-param:p_template1;string(‘Call template 1 RTF’)?> <?end call?> <?call@inlines:template2?> <?with-param:p_template2;string('call Template 2 RTF')?> <?end call?> <?if:1>0?> <?call@inlines:template1?><?with-param:p_template1;string(‘Yes, 1 is greater than 0’)?> <?end call?> <?end if?> <?if:1>1?> <?call@inlines:template2?> <?with-param:p_template2;string('call Template 2 RTF')?> <?end call?> <?end if?> The above condition fails, so template2 is not called Create a rtf called subtemplate2 paste the following <?template:template2?> <?param:p_template2;string('sub template 2 rtf...

Call templates

Link <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <xsl:template name="add-X"> <xsl:param name="string" select="." /> <xsl:if test="$string"> <xsl:text>X</xsl:text> <xsl:value-of select="substring($string, 1,1)"/> <xsl:call-template name="add-X"> <xsl:with-param name="string" select="substring($string, 2)" /> </xsl:call-template> </xsl:if> </xsl:template> </xsl:stylesheet> Create an file named TEST.xsl with the above code. <aaaa>ABCDE</aaaa> Create an file named TEST.XML with the above code. Create an RTF template with form field valus as <?import: file:///C:\Desktop\Sample RTF\TEST.xsl?> Note : here you have to point the xsl path where your ...