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