addParameter
public void addParameter(org.apache.xalan.xsltc.compiler.Param param)
addVariable
public void addVariable(org.apache.xalan.xsltc.compiler.Variable var)
characters
public void characters(char[] ch,
int start,
int length)
SAX2: Receive notification of character data.
createAST
public void createAST(Stylesheet stylesheet)
Instanciates a SAX2 parser and generate the AST from the input.
elementSupported
public boolean elementSupported(String namespace,
String localName)
endDocument
public void endDocument()
SAX2: Receive notification of the end of a document.
endElement
public void endElement(String uri,
String localname,
String qname)
SAX2: Receive notification of the end of an element.
endPrefixMapping
public void endPrefixMapping(String prefix)
SAX2: End the scope of a prefix-URI Namespace mapping.
This has to be passed on to the symbol table!
errorsFound
public boolean errorsFound()
Returns true if there were any errors during compilation
functionSupported
public boolean functionSupported(String fname)
getCurrentImportPrecedence
public int getCurrentImportPrecedence()
getCurrentStylesheet
public Stylesheet getCurrentStylesheet()
getErrors
public Vector getErrors()
getExcludeResultPrefixes
public org.apache.xalan.xsltc.compiler.QName getExcludeResultPrefixes()
getExtensionElementPrefixes
public org.apache.xalan.xsltc.compiler.QName getExtensionElementPrefixes()
getNextImportPrecedence
public int getNextImportPrecedence()
getOutput
public org.apache.xalan.xsltc.compiler.Output getOutput()
getOutputProperties
public Properties getOutputProperties()
getQName
public org.apache.xalan.xsltc.compiler.QName getQName(String stringRep)
getQName
public org.apache.xalan.xsltc.compiler.QName getQName(String scope,
String name)
getQName
public org.apache.xalan.xsltc.compiler.QName getQName(String namespace,
String prefix,
String localname)
getQName
public org.apache.xalan.xsltc.compiler.QName getQName(String stringRep,
boolean reportError)
getQName
public org.apache.xalan.xsltc.compiler.QName getQName(org.apache.xalan.xsltc.compiler.QName scope,
org.apache.xalan.xsltc.compiler.QName name)
getQNameIgnoreDefaultNs
public org.apache.xalan.xsltc.compiler.QName getQNameIgnoreDefaultNs(String stringRep)
getQNameSafe
public org.apache.xalan.xsltc.compiler.QName getQNameSafe(String stringRep)
getSymbolTable
public org.apache.xalan.xsltc.compiler.SymbolTable getSymbolTable()
getTemplate
public Template getTemplate()
getTemplateIndex
public int getTemplateIndex()
getTopLevelStylesheet
public Stylesheet getTopLevelStylesheet()
getUseAttributeSets
public org.apache.xalan.xsltc.compiler.QName getUseAttributeSets()
getWarnings
public Vector getWarnings()
getXSLTC
public XSLTC getXSLTC()
ignorableWhitespace
public void ignorableWhitespace(char[] ch,
int start,
int length)
IGNORED - all ignorable whitespace is ignored
lookupVariable
public org.apache.xalan.xsltc.compiler.VariableBase lookupVariable(org.apache.xalan.xsltc.compiler.QName name)
makeInstance
public SyntaxTreeNode makeInstance(String uri,
String prefix,
String local,
Attributes attributes)
makeStylesheet
public Stylesheet makeStylesheet(SyntaxTreeNode element)
throws CompilerException
Create an instance of the Stylesheet
class,
and then parse, typecheck and compile the instance.
Must be called after parse()
.
parse
public SyntaxTreeNode parse(InputSource input)
Parses a stylesheet and builds the internal abstract syntax tree
input
- A SAX2 InputSource can be passed to a SAX reader
- The root of the abstract syntax tree
parse
public SyntaxTreeNode parse(XMLReader reader,
InputSource input)
Parses a stylesheet and builds the internal abstract syntax tree
reader
- A SAX2 SAXReader (parser)input
- A SAX2 InputSource can be passed to a SAX reader
- The root of the abstract syntax tree
parseExpression
public org.apache.xalan.xsltc.compiler.Expression parseExpression(SyntaxTreeNode parent,
String exp)
Parse an XPath expression:
parseExpression
public org.apache.xalan.xsltc.compiler.Expression parseExpression(SyntaxTreeNode parent,
String attr,
String def)
Parse an XPath expression:
parsePattern
public Pattern parsePattern(SyntaxTreeNode parent,
String attr,
String def)
Parse an XPath pattern:
printErrors
public void printErrors()
Prints all compile-time errors
printWarnings
public void printWarnings()
Prints all compile-time warnings
processingInstruction
public void processingInstruction(String name,
String value)
SAX2: Receive notification of a processing instruction.
These require special handling for stylesheet PIs.
removeVariable
public void removeVariable(org.apache.xalan.xsltc.compiler.QName name)
reportError
public void reportError(int category,
ErrorMsg error)
Common error/warning message handler
setCurrentStylesheet
public void setCurrentStylesheet(Stylesheet stylesheet)
setDocumentLocator
public void setDocumentLocator(Locator locator)
Store the document locator to later retrieve line numbers of all
elements from the stylesheet
setOutput
public void setOutput(org.apache.xalan.xsltc.compiler.Output output)
setTemplate
public void setTemplate(Template template)
setXSLTC
public void setXSLTC(XSLTC xsltc)
skippedEntity
public void skippedEntity(String name)
IGNORED - we do not have to do anything with skipped entities
startDocument
public void startDocument()
SAX2: Receive notification of the beginning of a document.
startElement
public void startElement(String uri,
String localname,
String qname,
Attributes attributes)
throws SAXException
SAX2: Receive notification of the beginning of an element.
The parser may re-use the attribute list that we're passed so
we clone the attributes in our own Attributes implementation
startPrefixMapping
public void startPrefixMapping(String prefix,
String uri)
SAX2: Begin the scope of a prefix-URI Namespace mapping.
This has to be passed on to the symbol table!