Package net.sf.saxon.jaxp
Class TemplatesHandlerImpl
java.lang.Object
net.sf.saxon.event.ReceivingContentHandler
net.sf.saxon.jaxp.TemplatesHandlerImpl
- All Implemented Interfaces:
TemplatesHandler
,ContentHandler
,DTDHandler
,LexicalHandler
TemplatesHandlerImpl implements the javax.xml.transform.sax.TemplatesHandler
interface. It acts as a ContentHandler which receives a stream of
SAX events representing a stylesheet, and returns a Templates object that
represents the compiled form of this stylesheet.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.saxon.event.ReceivingContentHandler
ReceivingContentHandler.LocalLocator
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TemplatesHandlerImpl
(TransformerFactory factory, Processor processor) Create a TemplatesHandlerImpl and initialise variables. -
Method Summary
Modifier and TypeMethodDescriptionGet the systemId of the documentGet the Templates object to be used for a transformationvoid
setDocumentLocator
(Locator locator) Callback interface for SAX: not for application usevoid
setSystemId
(String url) Set the SystemId of the document.Methods inherited from class net.sf.saxon.event.ReceivingContentHandler
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, getConfiguration, getPipelineConfiguration, getReceiver, ignorableWhitespace, isIgnoringIgnorableWhitespace, notationDecl, processingInstruction, reset, setIgnoreIgnorableWhitespace, setPipelineConfiguration, setReceiver, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping, unparsedEntityDecl
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
characters, declaration, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, skippedEntity, startDocument, startElement, startPrefixMapping
-
Constructor Details
-
TemplatesHandlerImpl
Create a TemplatesHandlerImpl and initialise variables. The constructor is protected, because the Filter should be created using newTemplatesHandler() in the SAXTransformerFactory class- Parameters:
factory
- the JAXP TransformerFactoryprocessor
- the Saxon s9api processor
-
-
Method Details
-
getTemplates
Get the Templates object to be used for a transformation- Specified by:
getTemplates
in interfaceTemplatesHandler
-
setSystemId
Set the SystemId of the document. Note that if this method is called, any locator supplied to the setDocumentLocator() method is ignored. This also means that no line number information will be available.- Specified by:
setSystemId
in interfaceTemplatesHandler
- Parameters:
url
- the system ID (base URI) of the stylesheet document, which will be used in any error reporting and also for resolving relative URIs in xsl:include and xsl:import. It will also form the static base URI in the static context of XPath expressions.
-
setDocumentLocator
Callback interface for SAX: not for application use- Specified by:
setDocumentLocator
in interfaceContentHandler
- Overrides:
setDocumentLocator
in classReceivingContentHandler
-
getSystemId
Get the systemId of the document- Specified by:
getSystemId
in interfaceTemplatesHandler
-