com.icl.saxon
Class PreparedStyleSheet

java.lang.Object
  |
  +--com.icl.saxon.PreparedStyleSheet
All Implemented Interfaces:
Templates

public class PreparedStyleSheet
extends java.lang.Object
implements Templates

This PreparedStyleSheet class represents a StyleSheet that has been prepared for execution (or "compiled").


Constructor Summary
PreparedStyleSheet()
          Default Constructor
 
Method Summary
 java.lang.String getMediaType()
          Determine the media type of the output of this stylesheet.
 NamePool getNamePool()
          Get the name pool in use
 OutputDetails getOutputDetails()
          Determine details of the output format of this stylesheet, as defined in its <xsl:output> element(s).
 OutputFormat getOutputFormat()
          Get the properties for xsl:output.
 StyleNodeFactory getStyleNodeFactory()
          Get the StyleNodeFactory in use
 DocumentInfo getStyleSheetDocument()
          Get the root node of the stylesheet document
 URIResolver getURIResolver()
          Get the URIResolver in use
 org.xml.sax.XMLReader getXMLReader()
          Get the XML parser used for parsing this stylesheet.
 Transformer newTransformer()
          TRAX method: make a Transformer from this Templates object.
 void prepare(org.xml.sax.InputSource styleSource)
          Prepare a stylesheet from an InputSource
 void setNamePool(NamePool pool)
          Set the name pool to be used
 void setParser(org.xml.sax.Parser parser)
          Deprecated. in Saxon 5.2: use setXMLReader() instead.
 void setStyleSheetDocument(DocumentInfo doc)
          Create a PreparedStyleSheet from a supplied DocumentInfo Note: the document must have been built using the StyleNodeFactory
 void setURIResolver(URIResolver resolver)
          Set the URI resolver to be used
 void setXMLReader(org.xml.sax.XMLReader parser)
          Set the parser to be used for parsing the stylesheet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreparedStyleSheet

public PreparedStyleSheet()
Default Constructor
Method Detail

setParser

public void setParser(org.xml.sax.Parser parser)
Deprecated. in Saxon 5.2: use setXMLReader() instead.

Set the parser to be used for parsing the stylesheet

setXMLReader

public void setXMLReader(org.xml.sax.XMLReader parser)
Set the parser to be used for parsing the stylesheet

getXMLReader

public org.xml.sax.XMLReader getXMLReader()
Get the XML parser used for parsing this stylesheet. Returns null unless a parser has been set using setXMLReader(),

setNamePool

public void setNamePool(NamePool pool)
Set the name pool to be used

getNamePool

public NamePool getNamePool()
Get the name pool in use

getStyleNodeFactory

public StyleNodeFactory getStyleNodeFactory()
Get the StyleNodeFactory in use

setURIResolver

public void setURIResolver(URIResolver resolver)
Set the URI resolver to be used

getURIResolver

public URIResolver getURIResolver()
Get the URIResolver in use

prepare

public void prepare(org.xml.sax.InputSource styleSource)
             throws org.xml.sax.SAXException
Prepare a stylesheet from an InputSource

setStyleSheetDocument

public void setStyleSheetDocument(DocumentInfo doc)
                           throws org.xml.sax.SAXException
Create a PreparedStyleSheet from a supplied DocumentInfo Note: the document must have been built using the StyleNodeFactory

newTransformer

public Transformer newTransformer()

TRAX method: make a Transformer from this Templates object.

Equivalent to makeStyleSheetInstance()

Specified by:
newTransformer in interface Templates

getStyleSheetDocument

public DocumentInfo getStyleSheetDocument()
Get the root node of the stylesheet document

getOutputFormat

public OutputFormat getOutputFormat()
Get the properties for xsl:output. TRAX method. The object returned will be a clone of the internal values, and thus it can be mutated without mutating the Templates object, and then handed in to the process method.
Specified by:
getOutputFormat in interface Templates
Returns:
A OutputProperties object that may be mutated.
See Also:
OutputFormat

getOutputDetails

public OutputDetails getOutputDetails()
                               throws org.xml.sax.SAXException
Determine details of the output format of this stylesheet, as defined in its <xsl:output> element(s). This is a Saxon native method functionally equivalent to the TRAX method getOutputFormat().
Returns:
an OutputDetails object giving information about the output format requested

getMediaType

public java.lang.String getMediaType()
                              throws org.xml.sax.SAXException
Determine the media type of the output of this stylesheet. Convenience method retained for compatibility: no longer necessary since getOutputDetails() is available.
Returns:
the media-type defined explicitly via xsl:output, or the media-type deduced from the method defined in xsl:output, or "application/xml" by default