swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
    Other Library Functions  
data type  

xslt.stylesheet

 
 

Library: XSLT support (OMXSLT)
Import: omxslt.xmd


Purpose

The stylesheet opaque data type encapsulates an XSLT stylesheet. Once a instance of the stylesheet opaque data type has been created, it can be used to transform input data.

Usage Notes

Within your program, you can create as many instances of the stylesheet data type as you require by declaring local and global shelves of type stylesheet. To use the stylesheet opaque data type in your program, you must import it into your program using a statement like this:

  import "omxslt.xmd" prefixed by xslt.
            

In practice, it is not necessary to directly manipulate shelves of type stylesheet: OmniMark will convert a string representation of an XSLT stylesheet into the correct representation when it is required.

Example

By declaring a shelf of type stylesheet and using it when applying a stylesheet to multiple sets of input data, you can avoid having to recompile the stylesheet for every iteration.

  import "omxslt.xmd" prefixed by xslt.
  
  process
     local stream          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 from file filename
           suppress
        done
     again
  
  
  element #implied
     suppress
            

      Other Library Functions
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:38:10 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.