com.jclark.xsl.trax
Class TemplatesHandlerImpl

java.lang.Object
  extended by org.xml.sax.helpers.XMLFilterImpl
      extended by com.jclark.xsl.trax.TemplatesHandlerImpl
All Implemented Interfaces:
javax.xml.transform.sax.TemplatesHandler, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader

 class TemplatesHandlerImpl
extends org.xml.sax.helpers.XMLFilterImpl
implements javax.xml.transform.sax.TemplatesHandler

An implementation of javax.xml.transform.sax.TemplatesHandler. Collects SAX events representing an XSLT stylesheet, and provides access to an object representing the "compiled" sheet


Constructor Summary
protected TemplatesHandlerImpl(TransformerFactoryImpl factory, XMLProcessor sheetModelBuilder)
          construct with a reference to the factory, and a processor which can construct an object model from the SAX events representing the stylesheet
 
Method Summary
 void endDocument()
          end of stylesheet SAX events, compile it
 java.lang.String getSystemId()
          qets the base URI associated with the stylesheet
 javax.xml.transform.Templates getTemplates()
          When a TemplatesHandler object is used as a ContentHandler for the parsing of transformation instructions, it creates a Templates object, which the caller can get once the SAX events have been completed.
 void setSystemId(java.lang.String systemId)
          sets the base URI we want to associate with the stylesheet
 void startDocument()
          SAX implementation: recieve notification of start of parse, redirect all subsequent SAX events to our embedded object model builder
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
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, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startElement, startPrefixMapping
 

Constructor Detail

TemplatesHandlerImpl

protected TemplatesHandlerImpl(TransformerFactoryImpl factory,
                               XMLProcessor sheetModelBuilder)
                        throws org.xml.sax.SAXException
construct with a reference to the factory, and a processor which can construct an object model from the SAX events representing the stylesheet

Throws:
org.xml.sax.SAXException
Method Detail

getTemplates

public javax.xml.transform.Templates getTemplates()
When a TemplatesHandler object is used as a ContentHandler for the parsing of transformation instructions, it creates a Templates object, which the caller can get once the SAX events have been completed.

Specified by:
getTemplates in interface javax.xml.transform.sax.TemplatesHandler

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
SAX implementation: recieve notification of start of parse, redirect all subsequent SAX events to our embedded object model builder

Specified by:
startDocument in interface org.xml.sax.ContentHandler
Overrides:
startDocument in class org.xml.sax.helpers.XMLFilterImpl
Throws:
org.xml.sax.SAXException

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
end of stylesheet SAX events, compile it

Specified by:
endDocument in interface org.xml.sax.ContentHandler
Overrides:
endDocument in class org.xml.sax.helpers.XMLFilterImpl
Throws:
org.xml.sax.SAXException

setSystemId

public void setSystemId(java.lang.String systemId)
sets the base URI we want to associate with the stylesheet

Specified by:
setSystemId in interface javax.xml.transform.sax.TemplatesHandler

getSystemId

public java.lang.String getSystemId()
qets the base URI associated with the stylesheet

Specified by:
getSystemId in interface javax.xml.transform.sax.TemplatesHandler