public abstract class StyleElement extends ElementWithAttributes implements org.xml.sax.Locator
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Vector |
attributeSets |
protected short[] |
extensionNamespaces |
static int |
REPORT_ALWAYS |
static int |
REPORT_IF_INSTANTIATED |
static int |
REPORT_UNLESS_FORWARDS_COMPATIBLE |
protected int |
reportingCircumstances |
protected StaticContext |
staticContext |
protected javax.xml.transform.TransformerConfigurationException |
validationError |
protected java.lang.String |
version |
attributeList, namespaceListnameCode, rootsequenceemptyArray, index, parentNODE_LETTERATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE| Constructor and Description |
|---|
StyleElement()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Binding |
bindVariable(int fingerprint)
Bind a variable used in this element to the XSLVariable element in which it is declared
|
void |
checkEmpty()
Convenience method to check that the stylesheet element is empty
|
void |
checkNotTopLevel()
Convenience method to check that the stylesheet element is not at the top level
|
void |
checkTopLevel()
Convenience method to check that the stylesheet element is at the top level
|
protected void |
checkUnknownAttribute(int nc)
Check whether an unknown attribute is permitted.
|
void |
checkWithinTemplate()
Check that the stylesheet element is within a template body
|
protected void |
compileError(java.lang.String message) |
protected void |
compileError(javax.xml.transform.TransformerException error)
Construct an exception with diagnostic information
|
protected boolean |
definesExcludedNamespace(short uriCode)
Check whether this node excludes a particular namespace from the result.
|
protected boolean |
definesExtensionElement(short uriCode)
Check whether a particular extension element namespace is defined on this node.
|
boolean |
doesPostProcessing()
Determine whether this element does any processing after instantiating any children.
|
protected void |
fallbackProcessing(StyleElement instruction,
Context context)
Perform fallback processing
|
protected void |
findAttributeSets(java.lang.String use)
Determine the list of attribute-sets associated with this element.
|
boolean |
forwardsCompatibleModeIsEnabled()
Determine whether forwards-compatible mode is enabled for this element
|
XSLStyleSheet |
getContainingStyleSheet()
Get the containing XSLStyleSheet element
|
int |
getPrecedence()
Get the import precedence of this stylesheet element.
|
PreparedStyleSheet |
getPreparedStyleSheet()
Get the PreparedStyleSheet object.
|
protected XSLStyleSheet |
getPrincipalStyleSheet()
Get the principal XSLStyleSheet node.
|
StandardNames |
getStandardNames()
Get the StandardNames object
|
Function |
getStyleSheetFunction(int fingerprint)
Get a Function declared using a saxon:function element in the stylesheet
|
Binding |
getVariableBinding(int fprint)
Bind a variable used in this element to the XSLVariable element in which it is declared
|
java.util.Enumeration[] |
getVariableNames()
List the variables that are in scope for this stylesheet element.
|
java.lang.String |
getVersion()
Get the version number on this element, or inherited from its ancestors
|
protected Expression |
handleSortKeys(Expression select)
Modify the "select" expression to include any sort keys specified.
|
boolean |
isExcludedNamespace(short uriCode)
Check whether a namespace uri defines an namespace excluded from the result.
|
boolean |
isExtensionNamespace(short uriCode)
Check whether a namespace uri defines an extension element.
|
boolean |
isInstruction()
Determine whether this node is an instruction.
|
boolean |
isTopLevel()
Test whether this is a top-level element
|
Expression |
makeAttributeValueTemplate(java.lang.String expression)
Make an attribute value template in the context of this stylesheet element
|
Expression |
makeExpression(java.lang.String expression)
Make an expression in the context of this stylesheet element
|
Pattern |
makePattern(java.lang.String pattern)
Make a pattern in the context of this stylesheet element
|
boolean |
mayContainTemplateBody()
Determine whether this type of element is allowed to contain a template-body
|
abstract void |
prepareAttributes()
Set the attribute list for the element.
|
void |
preprocess()
Default preprocessing method does nothing.
|
abstract void |
process(Context context)
Process: called to do the real work of this stylesheet element.
|
void |
processAllAttributes()
Process the attributes of this element and all its children
|
void |
processAttributes()
Process the attribute list for the element.
|
protected void |
processAttributeSets(Context context)
Expand the attribute sets referenced in this element's use-attribute-sets attribute
|
void |
processChildren(Context context)
Process the children of this node in the stylesheet
|
protected void |
processExcludedNamespaces(int nc)
Process the [xsl:]exclude-result-prefixes attribute if there is one
|
protected void |
processExtensionElementAttribute(int nc)
Process the [xsl:]extension-element-prefixes attribute if there is one
|
protected void |
processVersionAttribute(int nc)
Process the [xsl:]version attribute if there is one
|
void |
reportAbsence(java.lang.String attribute)
Convenience method to report the absence of a mandatory attribute
|
protected void |
setValidationError(javax.xml.transform.TransformerException reason,
int circumstances)
Set a validation error
|
protected javax.xml.transform.TransformerException |
styleError(java.lang.String message) |
protected javax.xml.transform.TransformerException |
styleError(javax.xml.transform.TransformerException error)
Construct an exception with diagnostic information
|
void |
substituteFor(StyleElement temp)
Make this node a substitute for a temporary one previously added to the tree.
|
void |
validate()
Check that the element is valid.
|
protected void |
validateChildren() |
void |
validateSubtree()
Recursive walk through the stylesheet to validate all nodes
|
addNamespaceNodes, copy, getAttribute, getAttributeList, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getLength, getNamedItem, getNamedItemNS, getNamespaceCodes, getPrefixForURI, getURICodeForPrefix, hasAttribute, hasAttributeNS, hasAttributes, initialise, item, outputNamespaceNodes, removeAttribute, removeAttributeNode, removeAttributeNS, removeNamedItem, removeNamedItemNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setNamedItem, setNamedItemNS, setNamespaceDeclarationscopy, generateId, getBaseURI, getDocumentRoot, getLineNumber, getNameCode, getNodeType, getSystemId, makeNameCode, setLineNumber, setNameCode, setSystemIdaddChild, compact, copyStringValue, dropChildren, enumerateChildren, getChildNodes, getFirstChild, getLastChild, getNodeValue, getNthChild, getSequenceNumber, getStringValue, hasChildNodes, removeChild, renumberChildren, useChildrenArraycompareOrder, getDisplayName, getDocumentElement, getEnumeration, getFingerprint, getLocalName, getNamePool, getNextInDocument, getNextSibling, getOriginatingNode, getParent, getPrefix, getPreviousInDocument, getPreviousSibling, getURI, isSameNodeInfo, removeNodeappendChild, appendData, cloneNode, compareDocumentPosition, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, disallowUpdate, getColumnNumber, getData, getDoctype, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getImplementation, getName, getNamespaceURI, getNodeName, getOwnerDocument, getOwnerElement, getParentNode, getPublicId, getSchemaTypeInfo, getSpecified, getTagName, getTextContent, getUserData, getValue, getWholeText, importNode, insertBefore, insertData, isDefaultNamespace, isElementContentWhitespace, isEqualNode, isId, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, replaceData, replaceWholeText, setData, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setNodeValue, setPrefix, setTextContent, setUserData, setValue, splitText, substringData, supportsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetColumnNumber, getLineNumber, getPublicId, getSystemIdgetElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, setIdAttribute, setIdAttributeNode, setIdAttributeNSappendChild, cloneNode, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserDataprotected java.util.Vector attributeSets
protected short[] extensionNamespaces
protected java.lang.String version
protected StaticContext staticContext
protected javax.xml.transform.TransformerConfigurationException validationError
protected int reportingCircumstances
public static final int REPORT_ALWAYS
public static final int REPORT_UNLESS_FORWARDS_COMPATIBLE
public static final int REPORT_IF_INSTANTIATED
public void substituteFor(StyleElement temp)
protected void setValidationError(javax.xml.transform.TransformerException reason,
int circumstances)
public boolean isInstruction()
public boolean doesPostProcessing()
public boolean mayContainTemplateBody()
public XSLStyleSheet getContainingStyleSheet()
public int getPrecedence()
public final StandardNames getStandardNames()
public void processAllAttributes()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionpublic final void processAttributes()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionprotected void checkUnknownAttribute(int nc)
throws javax.xml.transform.TransformerConfigurationException
nc - The name code of the attribute namejavax.xml.transform.TransformerConfigurationExceptionpublic abstract void prepareAttributes()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionpublic Expression makeExpression(java.lang.String expression) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionpublic Pattern makePattern(java.lang.String pattern) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionpublic Expression makeAttributeValueTemplate(java.lang.String expression) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionprotected void processExtensionElementAttribute(int nc)
throws javax.xml.transform.TransformerConfigurationException
nc - the name code of the attribute requiredjavax.xml.transform.TransformerConfigurationExceptionprotected void processExcludedNamespaces(int nc)
throws javax.xml.transform.TransformerConfigurationException
nc - the name code of the attribute requiredjavax.xml.transform.TransformerConfigurationExceptionprotected void processVersionAttribute(int nc)
nc - the name code of the attribute requiredpublic java.lang.String getVersion()
public boolean forwardsCompatibleModeIsEnabled()
protected boolean definesExtensionElement(short uriCode)
uriCode - the namespace URI code being testedpublic boolean isExtensionNamespace(short uriCode)
uriCode - the namespace URI code being testedprotected boolean definesExcludedNamespace(short uriCode)
uriCode - the code of the namespace URI being testedpublic boolean isExcludedNamespace(short uriCode)
uriCode - the code of the namespace URI being testedpublic void validate()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionpublic void preprocess()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionpublic void validateSubtree()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionprotected void validateChildren()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionprotected XSLStyleSheet getPrincipalStyleSheet()
public PreparedStyleSheet getPreparedStyleSheet()
public void checkWithinTemplate()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException - if not within a template bodypublic void checkTopLevel()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException - if not at top levelpublic void checkNotTopLevel()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException - if it is at the top levelpublic void checkEmpty()
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException - if it is not emptypublic void reportAbsence(java.lang.String attribute)
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException - if the attribute is missingpublic abstract void process(Context context) throws javax.xml.transform.TransformerException
context - The context in the source XML document, giving access to the current node,
the current variables, etc.javax.xml.transform.TransformerExceptionpublic void processChildren(Context context) throws javax.xml.transform.TransformerException
context - The context in the source XML document, giving access to the current node,
the current variables, etc.javax.xml.transform.TransformerExceptionprotected void fallbackProcessing(StyleElement instruction, Context context) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerExceptionprotected Expression handleSortKeys(Expression select) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionprotected void findAttributeSets(java.lang.String use)
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionprotected void processAttributeSets(Context context) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerExceptionprotected javax.xml.transform.TransformerException styleError(javax.xml.transform.TransformerException error)
protected javax.xml.transform.TransformerException styleError(java.lang.String message)
protected void compileError(javax.xml.transform.TransformerException error)
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionprotected void compileError(java.lang.String message)
throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationExceptionpublic boolean isTopLevel()
public Binding bindVariable(int fingerprint) throws XPathException
fingerprint - The fingerprint of the name of the variableXPathException - if the variable has not been declaredpublic Binding getVariableBinding(int fprint)
fprint - The absolute name of the variable (as a namepool fingerprint)public java.util.Enumeration[] getVariableNames()
public Function getStyleSheetFunction(int fingerprint)
fingerprint - the fingerprint of the name of the function