com.icl.saxon

Class PreparedStyleSheet

public class PreparedStyleSheet extends Object implements Templates

This PreparedStyleSheet class represents a StyleSheet that has been prepared for execution (or "compiled").
Constructor Summary
protected PreparedStyleSheet(TransformerFactoryImpl factory)
Constructor: deliberately protected
Method Summary
NamePoolgetNamePool()
Get the name pool in use
PropertiesgetOutputProperties()
Get the properties for xsl:output.
StyleNodeFactorygetStyleNodeFactory()
Get the StyleNodeFactory in use
DocumentImplgetStyleSheetDocument()
Get the root node of the principal stylesheet document
TransformerFactoryImplgetTransformerFactory()
Get the TransformerFactory used to create this PreparedStyleSheet
TransformernewTransformer()
Make a Transformer from this Templates object.
protected voidprepare(SAXSource styleSource)
Prepare a stylesheet from an InputSource
voidreportError(TransformerException err)
Report a compile time error.
voidsetNamePool(NamePool pool)
Set the name pool to be used
protected voidsetStyleSheetDocument(DocumentImpl doc)
Create a PreparedStyleSheet from a supplied DocumentInfo Note: the document must have been built using the StyleNodeFactory
DocumentInfostripWhitespace(Document doc)
Use the xsl:strip-space directives in this stylesheet to strip spaces from a source document.

Constructor Detail

PreparedStyleSheet

protected PreparedStyleSheet(TransformerFactoryImpl factory)
Constructor: deliberately protected

Method Detail

getNamePool

public NamePool getNamePool()
Get the name pool in use

getOutputProperties

public Properties getOutputProperties()
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.

Returns: A OutputProperties object that may be mutated. Note that if any attributes of xsl:output are written as attribute value templates, the values returned will be unexpanded.

getStyleNodeFactory

public StyleNodeFactory getStyleNodeFactory()
Get the StyleNodeFactory in use

getStyleSheetDocument

public DocumentImpl getStyleSheetDocument()
Get the root node of the principal stylesheet document

getTransformerFactory

public TransformerFactoryImpl getTransformerFactory()
Get the TransformerFactory used to create this PreparedStyleSheet

newTransformer

public Transformer newTransformer()
Make a Transformer from this Templates object.

prepare

protected void prepare(SAXSource styleSource)
Prepare a stylesheet from an InputSource

reportError

public void reportError(TransformerException err)
Report a compile time error. This calls the errorListener to output details of the error, and increments an error count.

setNamePool

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

setStyleSheetDocument

protected void setStyleSheetDocument(DocumentImpl doc)
Create a PreparedStyleSheet from a supplied DocumentInfo Note: the document must have been built using the StyleNodeFactory

stripWhitespace

public DocumentInfo stripWhitespace(Document doc)
Use the xsl:strip-space directives in this stylesheet to strip spaces from a source document. The rest of the stylesheet is ignored.