| java.lang.Object net.sf.saxon.PreparedStylesheet
PreparedStylesheet | public class PreparedStylesheet implements Templates,Serializable(Code) | | This PreparedStylesheet class represents a Stylesheet that has been
prepared for execution (or "compiled").
|
PreparedStylesheet | protected PreparedStylesheet(Configuration config)(Code) | | Constructor: deliberately protected
Parameters: config - The Configuration set up by the TransformerFactory |
getErrorCount | public int getErrorCount()(Code) | | Get the number of errors reported so far
the number of errors reported |
getExecutable | public Executable getExecutable()(Code) | | Get the associated executable
the Executable for this stylesheet |
getOutputProperties | public Properties getOutputProperties()(Code) | | Get the properties for xsl:output. JAXP 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.
In Saxon, the properties object is a new, empty, Properties object that is
backed by the live properties to supply default values for missing properties.
This means that the property values must be read using the getProperty() method.
Calling the get() method on the underlying Hashtable will return null.
In Saxon 8.x, this method gets the output properties for the unnamed output
format in the stylesheet.
See Also: javax.xml.transform.Transformer.setOutputProperties A Properties object reflecting the output properties definedfor the default (unnamed) output format in the stylesheet. It maybe mutated and supplied to the setOutputProperties() method of theTransformer, without affecting other transformations that use thesame stylesheet. |
getStyleNodeFactory | public StyleNodeFactory getStyleNodeFactory()(Code) | | Get the StyleNodeFactory in use. The StyleNodeFactory determines which subclass of StyleElement
to use for each element node in the stylesheet tree.
the StyleNodeFactory |
getTargetNamePool | public NamePool getTargetNamePool()(Code) | | Get the name pool in use. This is the namepool used for names that need to be accessible
at runtime, notably the names used in XPath expressions in the stylesheet.
the name pool in use |
loadCompiledStylesheet | public static PreparedStylesheet loadCompiledStylesheet(Configuration config, String fileName) throws IOException, ClassNotFoundException(Code) | | Load a PreparedStylesheet from a compiled stylesheet stored in a file.
Parameters: config - The Configuration. This method changes the NamePool used by this configurationto be the NamePool that was stored with the compiled stylesheet. The method must therefore notbe used in a multi-threaded environment where the Configuration (and NamePool) are shared betweenmultiple concurrent transformations. Parameters: fileName - The name of the file containing the compiled stylesheet (which is just the Java serializationof a PreparedStylesheet object). the PreparedStylesheet, which can be used in JAXP interfaces as the Templates object |
loadCompiledStylesheet | public static PreparedStylesheet loadCompiledStylesheet(Configuration config, ObjectInputStream ois) throws IOException, ClassNotFoundException(Code) | | Load a PreparedStylesheet from a compiled stylesheet stored in a file.
Parameters: config - The Configuration. This method changes the NamePool used by this configurationto be the NamePool that was stored with the compiled stylesheet. The method must therefore notbe used in a multi-threaded environment where the Configuration (and NamePool) are shared betweenmultiple concurrent transformations. Parameters: ois - The ObjectInputStream containing the compiled stylesheet (which is just the Java serializationof a PreparedStylesheet object). the PreparedStylesheet, which can be used in JAXP interfaces as the Templates object |
loadStylesheetModule | public static DocumentImpl loadStylesheetModule(Source styleSource, Configuration config, NamePool localNamePool, StyleNodeFactory nodeFactory) throws XPathException(Code) | | Build the tree representation of a stylesheet module
Parameters: styleSource - the source of the module Parameters: config - the Configuration of the transformation factory Parameters: localNamePool - the namepool used during compilation Parameters: nodeFactory - the StyleNodeFactory used for creatingelement nodes in the tree exception: XPathException - if XML parsing or treeconstruction fails the root Document node of the tree containing the stylesheetmodule |
reportError | public void reportError(TransformerException err) throws TransformerException(Code) | | Report a compile time error. This calls the errorListener to output details
of the error, and increments an error count.
Parameters: err - the exception containing details of the error exception: TransformerException - if the ErrorListener decides that theerror should be reported |
reportWarning | public void reportWarning(TransformerException err)(Code) | | Report a compile time warning. This calls the errorListener to output details
of the warning.
Parameters: err - an exception holding details of the warning condition to bereported |
setStylesheetDocument | protected void setStylesheetDocument(DocumentImpl doc, StyleNodeFactory snFactory) throws XPathException(Code) | | Create a PreparedStylesheet from a supplied DocumentInfo
Note: the document must have been built using the StyleNodeFactory
Parameters: doc - the document containing the stylesheet module Parameters: snFactory - the StyleNodeFactory used to build the tree exception: XPathException - if the document suppliedis not a stylesheet |
setTargetNamePool | public void setTargetNamePool(NamePool pool)(Code) | | Set the name pool
|
|
|