| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private Stylesheet | |
| private ArrayList | |
| private QName | |
| private QName | |
| private boolean | |
| private Map | |
| private Map | |
| private Locator | |
| private Map | |
| private Output | |
| private boolean | |
| private Stack | _parentStack
SAX2 ContentHandler INTERFACE |
| private String | |
| private String | |
| private String | |
| private Map | |
| private Map | |
| private SyntaxTreeNode | |
| private boolean | |
| private SymbolTable | |
| private String | |
| private Template | |
| private int | |
| private QName | |
| private Map | |
| private ArrayList | |
| private XPathParser | |
| private XSLTC | |
| private static final String | |
| private boolean | versionIsOne
Creates a new node in the abstract syntax tree. |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| private void | |
| public void | characters(char[] ch, int start, int length)
Implements org. SAX2: Receive notification of character data. |
| private void | checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs)
checks the list of attributes against a list of allowed attributes for a particular element node. |
| public void | |
| public boolean | |
| public void | endDocument()
Implements org. SAX2: Receive notification of the end of a document. |
| public void | endElement(String uri, String localname, String qname)
Implements org. SAX2: Receive notification of the end of an element. |
| public void | endPrefixMapping(String prefix)
Implements org. SAX2: End the scope of a prefix-URI Namespace mapping. |
| public boolean | |
| private SyntaxTreeNode | findStylesheet(SyntaxTreeNode root, String href)
Find a Stylesheet element with a specific ID attribute value. |
| public boolean | |
| public int | |
| public Stylesheet | |
| public SyntaxTreeNode | |
| public ArrayList | |
| public QName | |
| public QName | |
| private int | |
| public int | |
| public Output | |
| public Properties | |
| public QName | |
| public QName | |
| private QName | |
| public QName | |
| public QName | |
| public QName | |
| public QName | |
| public QName | |
| private SyntaxTreeNode | |
| public SymbolTable | |
| public Template | |
| public int | |
| private String | |
| public Stylesheet | |
| public QName | |
| public ArrayList | |
| public XSLTC | |
| public void | ignorableWhitespace(char[] ch, int start, int length)
Implements org. IGNORED - all ignorable whitespace is ignored |
| public void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | initStdClasses()
Initialize the _instructionClasses map, which maps XSL element names to Java classes in this package. |
| private void | |
| private SyntaxTreeNode | loadExternalStylesheet(String location)
For embedded stylesheets: Load an external file with stylesheet |
| public VariableBase | |
| public SyntaxTreeNode | |
| public Stylesheet | makeStylesheet(SyntaxTreeNode element)
Create an instance of the |
| public SyntaxTreeNode | Returns: The root of the abstract syntax treeA SAX2 SAXReader (parser) reader, InputSource A SAX2 InputSource can be passed to a SAX reader input)Parses a stylesheet and builds the internal abstract syntax tree |
| public SyntaxTreeNode | Returns: The root of the abstract syntax treeA SAX2 InputSource can be passed to a SAX reader input)Parses a stylesheet and builds the internal abstract syntax tree |
| public Expression | parseExpression(SyntaxTreeNode
- XSL element where the expression occured parent, String - textual representation of the expression exp)Parse an XPath expression: |
| public Expression | parseExpression(SyntaxTreeNode
- XSL element where the expression occured parent, String - name of this element's attribute to get expression from attr, String - default expression (if the attribute was not found) def)Parse an XPath expression: |
| public Pattern | parsePattern(SyntaxTreeNode
- XSL element where the pattern occured parent, String - textual representation of the pattern pattern)Parse an XPath pattern: |
| public Pattern | parsePattern(SyntaxTreeNode
- XSL element where the pattern occured parent, String - name of this element's attribute to get pattern from attr, String - default pattern (if the attribute was not found) def)Parse an XPath pattern: |
| private SyntaxTreeNode | parseTopLevel(SyntaxTreeNode parent, String text, String expression)
Parse an XPath expression or pattern using the generated XPathParser The method will return a Dummy node if the XPath parser fails. |
| public void | |
| public void | |
| public void | processingInstruction(String name, String value)
Implements org. SAX2: Receive notification of a processing instruction. |
| public void | |
| public void | |
| public void | |
| public void | setDocumentLocator(Locator locator)
Implements org. Store the document locator to later retrieve line numbers of all elements from the stylesheet |
| public void | |
| protected void | setPIParameters(String
The media attribute to be matched. May be null, in which
case the prefered templates will be used (i.e. alternate = no). media, String The value of the title attribute to match. May be null. title, String The value of the charset attribute to match. May be null. charset)Set the parameters to use to locate the correct <?xml-stylesheet ...? |
| public void | |
| public void | |
| public void | skippedEntity(String name)
Implements org. IGNORED - we do not have to do anything with skipped entities |
| public void | startDocument()
Implements org. SAX2: Receive notification of the beginning of a document. |
| public void | startElement(String uri, String localname, String qname, Attributes attributes)
Implements org. SAX2: Receive notification of the beginning of an element. |
| public void | startPrefixMapping(String prefix, String uri)
Implements org. SAX2: Begin the scope of a prefix-URI Namespace mapping. |
| _currentImportPrecedence | back to summary |
|---|---|
| private int _currentImportPrecedence | |
| _currentStylesheet | back to summary |
|---|---|
| private Stylesheet _currentStylesheet | |
| _errors | back to summary |
|---|---|
| private ArrayList<ErrorMsg> _errors | |
| _excludeResultPrefixes | back to summary |
|---|---|
| private QName _excludeResultPrefixes | |
| _extensionElementPrefixes | back to summary |
|---|---|
| private QName _extensionElementPrefixes | |
| _hasUserErrListener | back to summary |
|---|---|
| private boolean _hasUserErrListener | |
| _instructionAttrs | back to summary |
|---|---|
| private Map<String, String[]> _instructionAttrs | |
| _instructionClasses | back to summary |
|---|---|
| private Map<String, String> _instructionClasses | |
| _locator | back to summary |
|---|---|
| private Locator _locator | |
| _namespaces | back to summary |
|---|---|
| private Map<String, Map<String, QName>> _namespaces | |
| _output | back to summary |
|---|---|
| private Output _output | |
| _overrideDefaultParser | back to summary |
|---|---|
| private boolean _overrideDefaultParser | |
| _parentStack | back to summary |
|---|---|
| private Stack<SyntaxTreeNode> _parentStack SAX2 ContentHandler INTERFACE | |
| _PIcharset | back to summary |
|---|---|
| private String _PIcharset | |
| _PImedia | back to summary |
|---|---|
| private String _PImedia | |
| _PItitle | back to summary |
|---|---|
| private String _PItitle | |
| _prefixMapping | back to summary |
|---|---|
| private Map<String, String> _prefixMapping | |
| _qNames | back to summary |
|---|---|
| private Map<String, QName> _qNames | |
| _root | back to summary |
|---|---|
| private SyntaxTreeNode _root | |
| _rootNamespaceDef | back to summary |
|---|---|
| private boolean _rootNamespaceDef | |
| _symbolTable | back to summary |
|---|---|
| private SymbolTable _symbolTable | |
| _target | back to summary |
|---|---|
| private String _target | |
| _template | back to summary |
|---|---|
| private Template _template | |
| _templateIndex | back to summary |
|---|---|
| private int _templateIndex | |
| _useAttributeSets | back to summary |
|---|---|
| private QName _useAttributeSets | |
| _variableScope | back to summary |
|---|---|
| private Map<String, Object> _variableScope | |
| _warnings | back to summary |
|---|---|
| private ArrayList<ErrorMsg> _warnings | |
| _xpathParser | back to summary |
|---|---|
| private XPathParser _xpathParser | |
| _xsltc | back to summary |
|---|---|
| private XSLTC _xsltc | |
| TRANSLET | back to summary |
|---|---|
| private static final String TRANSLET | |
| versionIsOne | back to summary |
|---|---|
| private boolean versionIsOne Creates a new node in the abstract syntax tree. This node can be o) a supported XSLT 1.0 element o) an unsupported XSLT element (post 1.0) o) a supported XSLT extension o) an unsupported XSLT extension o) a literal result element (not an XSLT element and not an extension) Unsupported elements do not directly generate an error. We have to wait until we have received all child elements of an unsupported element to see if any <xsl:fallback> elements exist. | |
| XSL | back to summary |
|---|---|
| private static final String XSL | |
| Parser | back to summary |
|---|---|
| public Parser(XSLTC xsltc, boolean useOverrideDefaultParser, boolean hasUserErrListener) | |
| addParameter | back to summary |
|---|---|
| public void addParameter(Param param) | |
| addVariable | back to summary |
|---|---|
| public void addVariable(Variable var) | |
| addVariableOrParam | back to summary |
|---|---|
| private void addVariableOrParam(VariableBase var) | |
| characters | back to summary |
|---|---|
| public void characters(char[] ch, int start, int length) Implements org. SAX2: Receive notification of character data. | |
| checkForSuperfluousAttributes | back to summary |
|---|---|
| private void checkForSuperfluousAttributes(SyntaxTreeNode node, Attributes attrs) checks the list of attributes against a list of allowed attributes for a particular element node. | |
| createAST | back to summary |
|---|---|
| public void createAST(Stylesheet stylesheet) Instanciates a SAX2 parser and generate the AST from the input. | |
| elementSupported | back to summary |
|---|---|
| public boolean elementSupported(String namespace, String localName) | |
| endDocument | back to summary |
|---|---|
| public void endDocument() Implements org. SAX2: Receive notification of the end of a document. | |
| endElement | back to summary |
|---|---|
| public void endElement(String uri, String localname, String qname) Implements org. SAX2: Receive notification of the end of an element. | |
| endPrefixMapping | back to summary |
|---|---|
| public void endPrefixMapping(String prefix) Implements org. SAX2: End the scope of a prefix-URI Namespace mapping. This has to be passed on to the symbol table! | |
| errorsFound | back to summary |
|---|---|
| public boolean errorsFound() Returns true if there were any errors during compilation | |
| findStylesheet | back to summary |
|---|---|
| private SyntaxTreeNode findStylesheet(SyntaxTreeNode root, String href) Find a Stylesheet element with a specific ID attribute value. This method is used to find a Stylesheet node that is referred in a <?xml-stylesheet ... ?> processing instruction. | |
| functionSupported | back to summary |
|---|---|
| public boolean functionSupported(String fname) | |
| getCurrentImportPrecedence | back to summary |
|---|---|
| public int getCurrentImportPrecedence() | |
| getCurrentStylesheet | back to summary |
|---|---|
| public Stylesheet getCurrentStylesheet() | |
| getDocumentRoot | back to summary |
|---|---|
| public SyntaxTreeNode getDocumentRoot() | |
| getErrors | back to summary |
|---|---|
| public ArrayList | |
| getExcludeResultPrefixes | back to summary |
|---|---|
| public QName getExcludeResultPrefixes() | |
| getExtensionElementPrefixes | back to summary |
|---|---|
| public QName getExtensionElementPrefixes() | |
| getLineNumber | back to summary |
|---|---|
| private int getLineNumber() Get the line number, or zero if there is no _locator. | |
| getNextImportPrecedence | back to summary |
|---|---|
| public int getNextImportPrecedence() | |
| getOutput | back to summary |
|---|---|
| public Output getOutput() | |
| getOutputProperties | back to summary |
|---|---|
| public Properties getOutputProperties() | |
| getQName | back to summary |
|---|---|
| public QName getQName(final String stringRep) | |
| getQName | back to summary |
|---|---|
| public QName getQName(final String stringRep, boolean reportError) | |
| getQName | back to summary |
|---|---|
| private QName getQName(final String stringRep, boolean reportError, boolean ignoreDefaultNs) | |
| getQName | back to summary |
|---|---|
| public QName getQName(String namespace, String prefix, String localname) | |
| getQName | back to summary |
|---|---|
| public QName getQName(String scope, String name) | |
| getQName | back to summary |
|---|---|
| public QName getQName(QName scope, QName name) | |
| getQNameIgnoreDefaultNs | back to summary |
|---|---|
| public QName getQNameIgnoreDefaultNs(final String stringRep) | |
| getQNameSafe | back to summary |
|---|---|
| public QName getQNameSafe(final String stringRep) | |
| getStylesheet | back to summary |
|---|---|
| private SyntaxTreeNode getStylesheet(SyntaxTreeNode root) throws CompilerException Extracts the DOM for the stylesheet. In the case of an embedded stylesheet, it extracts the DOM subtree corresponding to the embedded stylesheet that has an 'id' attribute whose value is the same as the value declared in the <?xml-stylesheet...?> processing instruction (P.I.). In the xml-stylesheet P.I. the value is labeled as the 'href' data of the P.I. The extracted DOM representing the stylesheet is returned as an Element object. | |
| getSymbolTable | back to summary |
|---|---|
| public SymbolTable getSymbolTable() | |
| getTemplate | back to summary |
|---|---|
| public Template getTemplate() | |
| getTemplateIndex | back to summary |
|---|---|
| public int getTemplateIndex() | |
| getTokenValue | back to summary |
|---|---|
| private String getTokenValue(String token) | |
| getTopLevelStylesheet | back to summary |
|---|---|
| public Stylesheet getTopLevelStylesheet() | |
| getUseAttributeSets | back to summary |
|---|---|
| public QName getUseAttributeSets() | |
| getWarnings | back to summary |
|---|---|
| public ArrayList | |
| getXSLTC | back to summary |
|---|---|
| public XSLTC getXSLTC() | |
| ignorableWhitespace | back to summary |
|---|---|
| public void ignorableWhitespace(char[] ch, int start, int length) Implements org. IGNORED - all ignorable whitespace is ignored | |
| init | back to summary |
|---|---|
| public void init() | |
| initAttrTable | back to summary |
|---|---|
| private void initAttrTable(String elementName, String[] attrs) | |
| initExtClass | back to summary |
|---|---|
| private void initExtClass(String elementName, String className) | |
| initExtClass | back to summary |
|---|---|
| private void initExtClass(String namespace, String elementName, String className) | |
| initExtClasses | back to summary |
|---|---|
| private void initExtClasses() | |
| initInstructionAttrs | back to summary |
|---|---|
| private void initInstructionAttrs() | |
| initStdClass | back to summary |
|---|---|
| private void initStdClass(String elementName, String className) | |
| initStdClasses | back to summary |
|---|---|
| private void initStdClasses() Initialize the _instructionClasses map, which maps XSL element names to Java classes in this package. | |
| initSymbolTable | back to summary |
|---|---|
| private void initSymbolTable() Add primops and base functions to the symbol table.
| |
| loadExternalStylesheet | back to summary |
|---|---|
| private SyntaxTreeNode loadExternalStylesheet(String location) throws CompilerException For embedded stylesheets: Load an external file with stylesheet | |
| lookupVariable | back to summary |
|---|---|
| public VariableBase lookupVariable(QName name) | |
| makeInstance | back to summary |
|---|---|
| public SyntaxTreeNode makeInstance(String uri, String prefix, String local, Attributes attributes) | |
| makeStylesheet | back to summary |
|---|---|
| public Stylesheet makeStylesheet(SyntaxTreeNode element) throws CompilerException Create an instance of the | |
| parse | back to summary |
|---|---|
| public SyntaxTreeNode parse(XMLReader reader, InputSource input) Parses a stylesheet and builds the internal abstract syntax tree
| |
| parse | back to summary |
|---|---|
| public SyntaxTreeNode parse(InputSource input) Parses a stylesheet and builds the internal abstract syntax tree
| |
| parseExpression | back to summary |
|---|---|
| public Expression parseExpression(SyntaxTreeNode parent, String exp) Parse an XPath expression:
| |
| parseExpression | back to summary |
|---|---|
| public Expression parseExpression(SyntaxTreeNode parent, String attr, String def) Parse an XPath expression:
| |
| parsePattern | back to summary |
|---|---|
| public Pattern parsePattern(SyntaxTreeNode parent, String pattern) Parse an XPath pattern:
| |
| parsePattern | back to summary |
|---|---|
| public Pattern parsePattern(SyntaxTreeNode parent, String attr, String def) Parse an XPath pattern:
| |
| parseTopLevel | back to summary |
|---|---|
| private SyntaxTreeNode parseTopLevel(SyntaxTreeNode parent, String text, String expression) Parse an XPath expression or pattern using the generated XPathParser The method will return a Dummy node if the XPath parser fails. | |
| printErrors | back to summary |
|---|---|
| public void printErrors() Prints all compile-time errors | |
| printWarnings | back to summary |
|---|---|
| public void printWarnings() Prints all compile-time warnings | |
| processingInstruction | back to summary |
|---|---|
| public void processingInstruction(String name, String value) Implements org. SAX2: Receive notification of a processing instruction. These require special handling for stylesheet PIs. | |
| removeVariable | back to summary |
|---|---|
| public void removeVariable(QName name) | |
| reportError | back to summary |
|---|---|
| public void reportError(final int category, final ErrorMsg error) Common error/warning message handler | |
| setCurrentStylesheet | back to summary |
|---|---|
| public void setCurrentStylesheet(Stylesheet stylesheet) | |
| setDocumentLocator | back to summary |
|---|---|
| public void setDocumentLocator(Locator locator) Implements org. Store the document locator to later retrieve line numbers of all elements from the stylesheet | |
| setOutput | back to summary |
|---|---|
| public void setOutput(Output output) | |
| setPIParameters | back to summary |
|---|---|
| protected void setPIParameters(String media, String title, String charset) Set the parameters to use to locate the correct <?xml-stylesheet ...?> processing instruction in the case where the input document is an XML document with one or more references to a stylesheet. | |
| setTemplate | back to summary |
|---|---|
| public void setTemplate(Template template) | |
| setXSLTC | back to summary |
|---|---|
| public void setXSLTC(XSLTC xsltc) | |
| skippedEntity | back to summary |
|---|---|
| public void skippedEntity(String name) Implements org. IGNORED - we do not have to do anything with skipped entities | |
| startDocument | back to summary |
|---|---|
| public void startDocument() Implements org. SAX2: Receive notification of the beginning of a document. | |
| startElement | back to summary |
|---|---|
| public void startElement(String uri, String localname, String qname, Attributes attributes) throws SAXException Implements org. 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 | back to summary |
|---|---|
| public void startPrefixMapping(String prefix, String uri) Implements org. SAX2: Begin the scope of a prefix-URI Namespace mapping. This has to be passed on to the symbol table! | |