JDOMFile provides methods to query, transform and output the XML from within a template (see Sportwire JDOMFile API Docs) and uses the TTL cache to temporarily store parsed documents.
#set ($dom = $xml.dom( $path ))
The transform(xslfile) method creates a new JDOMFile object:
#set ($d = $dom.transform( "/path/to/transform.xsl" ))
You can then insert the result via the XML method to include the XML text inline:
$d.xml
If you want to save space, this can be collapsed into
$xml.dom( $path ).transform( "/path/to/transform.xsl" ).xml
![]() | Note |
---|---|
Since transform returns the newly transformed document, you can chain calls, appling each XSL file to the result of the previous transform. |
$xml.dom( $path ).xml