net.sf.joost.trax
Class TemplatesHandlerImpl

java.lang.Object
  extended by net.sf.joost.trax.TemplatesHandlerImpl
All Implemented Interfaces:
TemplatesHandler, Constants, ContentHandler

public class TemplatesHandlerImpl
extends Object
implements TemplatesHandler, Constants

A SAX ContentHandler that may be used to process SAX parse events (parsing transformation instructions) into a Templates object. TemplatesHandlerImpl acts as a proxy to Parser

Author:
Zubow

Field Summary
private static org.apache.commons.logging.Log log
           
private  Parser stxparser
           
private  String systemId
           
private  TransformerFactoryImpl tfactory
           
 
Fields inherited from interface net.sf.joost.Constants
DEBUG, DEFAULT_ENCODING, FEAT_NS, FEAT_NSPREFIX, FEATURE_URI_PREFIX, FUNC_NS, JOOST_EXT_NS, PR_ATTRIBUTES, PR_BUFFER, PR_CHILDREN, PR_CONTINUE, PR_ERROR, PR_SELF, PR_SIBLINGS, STX_NS
 
Constructor Summary
protected TemplatesHandlerImpl(TransformerFactoryImpl tfactory)
          Constructor
 
Method Summary
 void characters(char[] parm1, int parm2, int parm3)
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 void endDocument()
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 void endElement(String parm1, String parm2, String parm3)
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 void endPrefixMapping(String parm)
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 String getSystemId()
          Get the base ID (URI or system ID) from where relative URLs will be resolved
 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 ignorableWhitespace(char[] parm1, int parm2, int parm3)
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 void processingInstruction(String parm1, String parm2)
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 void setDocumentLocator(Locator locator)
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 void setSystemId(String systemId)
          Set the base ID (URI or system ID) from the Templates object created by this builder.
 void skippedEntity(String parm1)
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 void startDocument()
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 void startElement(String parm1, String parm2, String parm3, Attributes parm4)
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 void startPrefixMapping(String parm1, String parm2)
          SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log

stxparser

private Parser stxparser

systemId

private String systemId

tfactory

private TransformerFactoryImpl tfactory
Constructor Detail

TemplatesHandlerImpl

protected TemplatesHandlerImpl(TransformerFactoryImpl tfactory)
Constructor

Parameters:
tfactory - A Reference to TransformerFactoryImpl
Method Detail

getSystemId

public String getSystemId()
Get the base ID (URI or system ID) from where relative URLs will be resolved

Specified by:
getSystemId in interface TemplatesHandler
Returns:
The systemID that was set with {link setSystemId(String)}

getTemplates

public 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 TemplatesHandler
Returns:
Templates The Templates object that was created during the SAX event process, or null if no Templates object has been created.

setSystemId

public void setSystemId(String systemId)
Set the base ID (URI or system ID) from the Templates object created by this builder. This must be set in order to resolve relative URIs in the stylesheet. This must be called before the startDocument event.

Specified by:
setSystemId in interface TemplatesHandler
Parameters:
systemId - Necessary for document root.

setDocumentLocator

public void setDocumentLocator(Locator locator)
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
setDocumentLocator in interface ContentHandler

startDocument

public void startDocument()
                   throws SAXException
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
startDocument in interface ContentHandler
Throws:
SAXException

endDocument

public void endDocument()
                 throws SAXException
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
endDocument in interface ContentHandler
Throws:
SAXException

startPrefixMapping

public void startPrefixMapping(String parm1,
                               String parm2)
                        throws SAXException
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
startPrefixMapping in interface ContentHandler
Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(String parm)
                      throws SAXException
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
endPrefixMapping in interface ContentHandler
Throws:
SAXException

startElement

public void startElement(String parm1,
                         String parm2,
                         String parm3,
                         Attributes parm4)
                  throws SAXException
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
startElement in interface ContentHandler
Throws:
SAXException

endElement

public void endElement(String parm1,
                       String parm2,
                       String parm3)
                throws SAXException
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
endElement in interface ContentHandler
Throws:
SAXException

characters

public void characters(char[] parm1,
                       int parm2,
                       int parm3)
                throws SAXException
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
characters in interface ContentHandler
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] parm1,
                                int parm2,
                                int parm3)
                         throws SAXException
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
ignorableWhitespace in interface ContentHandler
Throws:
SAXException

processingInstruction

public void processingInstruction(String parm1,
                                  String parm2)
                           throws SAXException
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
processingInstruction in interface ContentHandler
Throws:
SAXException

skippedEntity

public void skippedEntity(String parm1)
                   throws SAXException
SAX2-Callback - Simply propagates the Call to the registered Parser - here the stxparser

Specified by:
skippedEntity in interface ContentHandler
Throws:
SAXException