NodeInfo
, javax.xml.transform.Source
, org.xml.sax.Locator
AbsentExtensionElement
, LiteralResultElement
, SAXONDoctype
, SAXONEntityRef
, SAXONFunction
, SAXONItem
, SAXONPreview
, SAXONWhile
, SQLClose
, SQLConnect
, SQLInsert
, XSLApplyImports
, XSLApplyTemplates
, XSLAttributeSet
, XSLCallTemplate
, XSLChoose
, XSLCopy
, XSLCopyOf
, XSLDecimalFormat
, XSLDocument
, XSLElement
, XSLFallback
, XSLForEach
, XSLGeneralIncorporate
, XSLGeneralVariable
, XSLIf
, XSLKey
, XSLMessage
, XSLNamespaceAlias
, XSLNumber
, XSLOtherwise
, XSLOutput
, XSLPreserveSpace
, XSLScript
, XSLSort
, XSLStringConstructor
, XSLStyleSheet
, XSLTemplate
, XSLText
, XSLValueOf
, XSLWhen
public abstract class StyleElement extends ElementWithAttributes implements org.xml.sax.Locator
Modifier and Type | Field | 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 int |
sequence |
|
protected StaticContext |
staticContext |
|
protected javax.xml.transform.TransformerConfigurationException |
validationError |
|
protected java.lang.String |
version |
NODE_LETTER
nameCode, root
attributeList, namespaceList
ATTRIBUTE_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
emptyArray, index, parent
Constructor | Description |
---|---|
StyleElement() |
Constructor
|
Modifier and Type | Method | Description |
---|---|---|
void |
addChild(NodeImpl node,
int index) |
Add a child node to this node.
|
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
|
void |
compact(int size) |
Compact the space used by this node
|
protected void |
compileError(java.lang.String message) |
|
protected void |
compileError(javax.xml.transform.TransformerException error) |
Construct an exception with diagnostic information
|
void |
copyStringValue(Outputter out) |
Copy the string-value of this node to a given outputter
|
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.
|
void |
dropChildren() |
Drop a branch of the tree.
|
AxisEnumeration |
enumerateChildren(NodeTest test) |
Get an enumeration of the children of this node
|
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
|
org.w3c.dom.NodeList |
getChildNodes() |
Return a
NodeList that contains all children of this node. |
XSLStyleSheet |
getContainingStyleSheet() |
Get the containing XSLStyleSheet element
|
org.w3c.dom.Node |
getFirstChild() |
Get the first child node of the element
|
org.w3c.dom.Node |
getLastChild() |
Get the last child node of the element
|
java.lang.String |
getNodeValue() |
Get the node value as defined in the DOM.
|
protected NodeImpl |
getNthChild(int n) |
Get the nth child node of the element (numbering from 0)
|
int |
getPrecedence() |
Get the import precedence of this stylesheet element.
|
PreparedStyleSheet |
getPreparedStyleSheet() |
Get the PreparedStyleSheet object.
|
protected XSLStyleSheet |
getPrincipalStyleSheet() |
Get the principal XSLStyleSheet node.
|
protected long |
getSequenceNumber() |
Get the node sequence number (in document order).
|
StandardNames |
getStandardNames() |
Get the StandardNames object
|
java.lang.String |
getStringValue() |
Return the string-value of the node, that is, the concatenation
of the character content of all descendent elements and text nodes.
|
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 |
hasChildNodes() |
Determine if the node has any children.
|
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 |
removeChild(int index) |
Remove node at given index.
|
void |
renumberChildren() |
Renumber the children of a given parent node.
|
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 |
useChildrenArray(NodeImpl[] array) |
Supply an array to be used for the array of children.
|
void |
validate() |
Check that the element is valid.
|
protected void |
validateChildren() |
|
void |
validateSubtree() |
Recursive walk through the stylesheet to validate all nodes
|
appendChild, 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, supports
getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, setIdAttribute, setIdAttributeNode, setIdAttributeNS
copy, generateId, getBaseURI, getDocumentRoot, getLineNumber, getNameCode, getNodeType, getSystemId, makeNameCode, setLineNumber, setNameCode, setSystemId
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, setNamespaceDeclarations
getColumnNumber, getLineNumber, getPublicId, getSystemId
appendChild, 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, setUserData
compareOrder, getDisplayName, getDocumentElement, getEnumeration, getFingerprint, getLocalName, getNamePool, getNextInDocument, getNextSibling, getOriginatingNode, getParent, getPrefix, getPreviousInDocument, getPreviousSibling, getURI, isSameNodeInfo, removeNode
protected 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
protected int sequence
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.TransformerConfigurationException
public final void processAttributes() throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
protected void checkUnknownAttribute(int nc) throws javax.xml.transform.TransformerConfigurationException
nc
- The name code of the attribute namejavax.xml.transform.TransformerConfigurationException
public abstract void prepareAttributes() throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
public Expression makeExpression(java.lang.String expression) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
public Pattern makePattern(java.lang.String pattern) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
public Expression makeAttributeValueTemplate(java.lang.String expression) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
protected void processExtensionElementAttribute(int nc) throws javax.xml.transform.TransformerConfigurationException
nc
- the name code of the attribute requiredjavax.xml.transform.TransformerConfigurationException
protected void processExcludedNamespaces(int nc) throws javax.xml.transform.TransformerConfigurationException
nc
- the name code of the attribute requiredjavax.xml.transform.TransformerConfigurationException
protected 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.TransformerConfigurationException
public void preprocess() throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
public void validateSubtree() throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
protected void validateChildren() throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
protected 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.TransformerException
public 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.TransformerException
protected void fallbackProcessing(StyleElement instruction, Context context) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
protected Expression handleSortKeys(Expression select) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
protected void findAttributeSets(java.lang.String use) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
protected void processAttributeSets(Context context) throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
protected 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.TransformerConfigurationException
protected void compileError(java.lang.String message) throws javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerConfigurationException
public 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 functionprotected final long getSequenceNumber()
getSequenceNumber
in class NodeImpl
public final boolean hasChildNodes()
hasChildNodes
in interface NodeInfo
hasChildNodes
in class NodeImpl
true
if the node has any children,
false
if the node has no children.public final AxisEnumeration enumerateChildren(NodeTest test)
public final org.w3c.dom.Node getFirstChild()
getFirstChild
in class NodeImpl
public final org.w3c.dom.Node getLastChild()
getLastChild
in class NodeImpl
public final org.w3c.dom.NodeList getChildNodes()
NodeList
that contains all children of this node. If
there are no children, this is a NodeList
containing no
nodes.getChildNodes
in class NodeImpl
protected final NodeImpl getNthChild(int n)
public java.lang.String getStringValue()
public void copyStringValue(Outputter out) throws javax.xml.transform.TransformerException
copyStringValue
in interface NodeInfo
copyStringValue
in class AbstractNode
javax.xml.transform.TransformerException
public void useChildrenArray(NodeImpl[] array)
public void addChild(NodeImpl node, int index)
public void removeChild(int index)
public void renumberChildren()
public void dropChildren()
public void compact(int size)
public java.lang.String getNodeValue()
getNodeValue
in class AbstractNode