If you have more complex design requirements, XML Publisher supports the use of XSL and XSL:FO elements, and has also extended a set of SQL functions.
RTF templates offer extremely powerful layout options using XML Publisher's syntax. However, because the underlying technology is based on open W3C standards, such as XSL and XPATH, you are not limited by the functionality described in this guide. You can fully utilize the layout and data manipulation features available in these technologies.
You can use any XSL element in your template by inserting the XSL syntax into a form field.
If you are using the basic RTF method, you cannot insert XSL syntax directly into your template. XML Publisher has extended the following XSL elements for use in RTF templates.
To use these in a basic-method RTF template, you must use the XML Publisher Tag form of the XSL element. If you are using form fields, use either option.
Use this element to apply a template rule to the current element's child nodes.
XSL Syntax: <xsl:apply-templates select="name">
XML Publisher Tag: <?apply:name?>
This function applies to <xsl:template-match="n"> where n is the element name.
Use this element to create a copy of the current node.
XSL Syntax: <xsl:copy-of select="name">
XML Publisher Tag: <?copy-of:name?>
Use this element to call a named template to be inserted into or applied to the current template. For example, use this feature to render a table multiple times.
XSL Syntax: <xsl:call-template name="name">
XML Publisher Tag: <?call-template:name?>
Use this element to apply a set of rules when a specified node is matched.
XSL Syntax: <xsl:template name="name">
XML Publisher Tag: <?template:name?>
Use this element to declare a local or global variable.
XSL Syntax: <xsl:variable name="name">
XML Publisher Tag: <?variable:name?>
Example:
<xsl:variable name="color" select="'red'"/>
Assigns the value "red" to the "color" variable. The variable can then be referenced in the template.
Use this element to import the contents of one style sheet into another.
Note: An imported style sheet has lower precedence than the importing style sheet.
XSL Syntax: <xsl:import href="url">
XML Publisher Tag: <?import:url?>
This and the <xsl:stylesheet> element are completely synonymous elements. Both are used to define the root element of the style sheet.
Note: An included style sheet has the same precedence as the including style sheet.
XSL Syntax: <xsl:stylesheet xmlns:x="url">
XML Publisher Tag: <?namespace:x=url?>
Note: The namespace must be declared in the template. See Namespace Support.
The native XSL format-number function takes the basic format:
format-number(number,format,[decimalformat])
| Parameter | Description |
|---|---|
| number | Required. Specifies the number to be formatted. |
| format | Required. Specifies the format pattern. Use the following characters to specify the pattern:
|
| decimalformat | Optional. For more information on the decimal format please consult any basic XSLT manual. |
You can use the native FO syntax inside the Microsoft Word form fields.
For more information on XSL-FO see the W3C Website at http://www.w3.org/2002/08/XSLFOsummary.html
The full list of FO elements supported by XML Publisher can be found in the Appendix: Supported XSL-FO Elements.