function
Library: XSLT support (OMXSLT)
Import : omxslt.xmd |
Returns: a compiled XSLT stylesheet |
export external stylesheet function compile value string source stylesheet
Argument definitions
Use compile
to generate a pre-compiled form of the XSLT stylesheet. In situations where a stylesheet
will be used many times on multiple inputs, this will likely reduce processing time.
import "omxslt.xmd" prefixed by xslt. process local string filenames initial { "input1.xml", "input2.xml" } local xslt.stylesheet stylesheet initial { xslt.compile file "stylesheet1.xsl" } repeat over filenames as filename do xml-parse scan xslt.reader with stylesheet into file filename suppress done again element #implied suppress
It is typically not necessary to use compile
, as OmniMark can automatically compile an XSLT
stylesheet from source form to compiled form when the need arises. However, should the same transformation be
required for multiple inputs, compiling the stylesheet should improve performance.