org.apache.xalan.xsltc.trax
Class TemplatesHandlerImpl

java.lang.Object
  |
  +--org.apache.xalan.xsltc.compiler.Parser
        |
        +--org.apache.xalan.xsltc.trax.TemplatesHandlerImpl

public class TemplatesHandlerImpl
extends Parser
implements TemplatesHandler, SourceLoader

Implementation of a JAXP1.1 TemplatesHandler


Method Summary
 java.lang.String getSystemId()
          Implements javax.xml.transform.sax.TemplatesHandler.getSystemId() Get the base ID (URI or system ID) from where relative URLs will be resolved.
 Templates getTemplates()
          Implements javax.xml.transform.sax.TemplatesHandler.getTemplates() When a TemplatesHandler object is used as a ContentHandler or DocumentHandler for the parsing of transformation instructions, it creates a Templates object, which the caller can get once the SAX events have been completed.
 void init()
          Internal initialization
 InputSource loadSource(java.lang.String href, java.lang.String context, XSLTC xsltc)
          This method implements XSLTC's SourceLoader interface.
 void setDocumentLocator(Locator locator)
          Recieve an object for locating the origin of SAX document events.
 void setSystemId(java.lang.String id)
          Implements javax.xml.transform.sax.TemplatesHandler.setSystemId() Get the base ID (URI or system ID) from where relative URLs will be resolved.
 void setURIResolver(URIResolver resolver)
          Store URIResolver needed for Transformers.
 
Methods inherited from class org.apache.xalan.xsltc.compiler.Parser
addParameter, addVariable, characters, createAST, elementSupported, endDocument, endElement, endPrefixMapping, errorsFound, functionSupported, getCurrentImportPrecedence, getCurrentStylesheet, getDocumentRoot, getErrors, getExcludeResultPrefixes, getExtensionElementPrefixes, getNextImportPrecedence, getOutput, getOutputProperties, getQName, getQName, getQName, getQName, getQName, getQNameIgnoreDefaultNs, getQNameSafe, getSymbolTable, getTemplate, getTemplateIndex, getTopLevelStylesheet, getUseAttributeSets, getWarnings, getXSLTC, ignorableWhitespace, lookupVariable, makeInstance, makeStylesheet, parse, parse, parseExpression, parseExpression, parsePattern, parsePattern, printErrors, printWarnings, processingInstruction, removeVariable, reportError, setCurrentStylesheet, setOutput, setTemplate, setXSLTC, skippedEntity, startDocument, startElement, startPrefixMapping
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

public void init()
Internal initialization
Overrides:
init in class Parser

getSystemId

public java.lang.String getSystemId()
Implements javax.xml.transform.sax.TemplatesHandler.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 setSystemId(String id)

setSystemId

public void setSystemId(java.lang.String id)
Implements javax.xml.transform.sax.TemplatesHandler.setSystemId() Get the base ID (URI or system ID) from where relative URLs will be resolved.
Specified by:
setSystemId in interface TemplatesHandler
Parameters:
id - Base URI for this stylesheet

setURIResolver

public void setURIResolver(URIResolver resolver)
Store URIResolver needed for Transformers.

getTemplates

public Templates getTemplates()
Implements javax.xml.transform.sax.TemplatesHandler.getTemplates() When a TemplatesHandler object is used as a ContentHandler or DocumentHandler 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:
The Templates object that was created during the SAX event process, or null if no Templates object has been created.

setDocumentLocator

public void setDocumentLocator(Locator locator)
Recieve an object for locating the origin of SAX document events. Most SAX parsers will use this method to inform content handler of the location of the parsed document.
Overrides:
setDocumentLocator in class Parser

loadSource

public InputSource loadSource(java.lang.String href,
                              java.lang.String context,
                              XSLTC xsltc)
This method implements XSLTC's SourceLoader interface. It is used to glue a TrAX URIResolver to the XSLTC compiler's Input and Import classes.
Specified by:
loadSource in interface SourceLoader
Parameters:
href - The URI of the document to load
context - The URI of the currently loaded document
xsltc - The compiler that resuests the document
Returns:
An InputSource with the loaded document


Copyright © 2002 Apache XML Project. All Rights Reserved.