|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.icl.saxon.om.AbstractNode com.icl.saxon.tree.NodeImpl com.icl.saxon.tree.ParentNodeImpl com.icl.saxon.tree.ElementImpl com.icl.saxon.tree.ElementWithAttributes com.icl.saxon.style.StyleElement
Abstract superclass for all element nodes in the stylesheet.
Note: this class implements Locator. The element
retains information about its own location in the stylesheet, which is useful when
an XSL error is found.
Field Summary | |
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 TransformerConfigurationException |
validationError
|
protected java.lang.String |
version
|
Fields inherited from class com.icl.saxon.tree.ElementWithAttributes |
attributeList, namespaceList |
Fields inherited from class com.icl.saxon.tree.ElementImpl |
nameCode, root, sequence |
Fields inherited from class com.icl.saxon.tree.NodeImpl |
emptyArray, index, parent |
Fields inherited from class com.icl.saxon.om.AbstractNode |
NODE_LETTER |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Fields inherited from interface com.icl.saxon.om.NodeInfo |
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT |
Constructor Summary | |
StyleElement()
Constructor |
Method Summary | |
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(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(TransformerException reason,
int circumstances)
Set a validation error |
protected TransformerException |
styleError(java.lang.String message)
|
protected TransformerException |
styleError(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 |
Methods inherited from class com.icl.saxon.tree.ElementImpl |
addChild, compact, copy, copyStringValue, dropChildren, enumerateChildren, generateId, getBaseURI, getChildNodes, getDocumentRoot, getFirstChild, getLastChild, getLineNumber, getNameCode, getNodeType, getNodeValue, getNthChild, getSequenceNumber, getStringValue, getSystemId, hasChildNodes, makeNameCode, removeChild, renumberChildren, setLineNumber, setNameCode, setSystemId, useChildrenArray |
Methods inherited from class com.icl.saxon.tree.NodeImpl |
compareOrder, getDisplayName, getDocumentElement, getEnumeration, getFingerprint, getLocalName, getNamePool, getNextInDocument, getNextSibling, getOriginatingNode, getParent, getPrefix, getPreviousInDocument, getPreviousSibling, getURI, isSameNodeInfo, removeNode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.Locator |
getColumnNumber, getLineNumber, getPublicId, getSystemId |
Methods inherited from interface org.w3c.dom.Element |
getElementsByTagName, getElementsByTagNameNS, getTagName |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Field Detail |
protected java.util.Vector attributeSets
protected short[] extensionNamespaces
protected java.lang.String version
protected StaticContext staticContext
protected 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
Constructor Detail |
public StyleElement()
Method Detail |
public void substituteFor(StyleElement temp)
protected void setValidationError(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 TransformerConfigurationException
TransformerConfigurationException
public final void processAttributes() throws TransformerConfigurationException
TransformerConfigurationException
protected void checkUnknownAttribute(int nc) throws TransformerConfigurationException
nc
- The name code of the attribute name
TransformerConfigurationException
public abstract void prepareAttributes() throws TransformerConfigurationException
TransformerConfigurationException
public Expression makeExpression(java.lang.String expression) throws TransformerConfigurationException
TransformerConfigurationException
public Pattern makePattern(java.lang.String pattern) throws TransformerConfigurationException
TransformerConfigurationException
public Expression makeAttributeValueTemplate(java.lang.String expression) throws TransformerConfigurationException
TransformerConfigurationException
protected void processExtensionElementAttribute(int nc) throws TransformerConfigurationException
nc
- the name code of the attribute required
TransformerConfigurationException
protected void processExcludedNamespaces(int nc) throws TransformerConfigurationException
nc
- the name code of the attribute required
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 TransformerConfigurationException
TransformerConfigurationException
public void preprocess() throws TransformerConfigurationException
TransformerConfigurationException
public void validateSubtree() throws TransformerConfigurationException
TransformerConfigurationException
protected void validateChildren() throws TransformerConfigurationException
TransformerConfigurationException
protected XSLStyleSheet getPrincipalStyleSheet()
public PreparedStyleSheet getPreparedStyleSheet()
public void checkWithinTemplate() throws TransformerConfigurationException
TransformerConfigurationException
- if not within a template bodypublic void checkTopLevel() throws TransformerConfigurationException
TransformerConfigurationException
- if not at top levelpublic void checkNotTopLevel() throws TransformerConfigurationException
TransformerConfigurationException
- if it is at the top levelpublic void checkEmpty() throws TransformerConfigurationException
TransformerConfigurationException
- if it is not emptypublic void reportAbsence(java.lang.String attribute) throws TransformerConfigurationException
TransformerConfigurationException
- if the attribute is missingpublic abstract void process(Context context) throws TransformerException
context
- The context in the source XML document, giving access to the current node,
the current variables, etc.
TransformerException
public void processChildren(Context context) throws TransformerException
context
- The context in the source XML document, giving access to the current node,
the current variables, etc.
TransformerException
protected void fallbackProcessing(StyleElement instruction, Context context) throws TransformerException
TransformerException
protected Expression handleSortKeys(Expression select) throws TransformerConfigurationException
TransformerConfigurationException
protected void findAttributeSets(java.lang.String use) throws TransformerConfigurationException
TransformerConfigurationException
protected void processAttributeSets(Context context) throws TransformerException
TransformerException
protected TransformerException styleError(TransformerException error)
protected TransformerException styleError(java.lang.String message)
protected void compileError(TransformerException error) throws TransformerConfigurationException
TransformerConfigurationException
protected void compileError(java.lang.String message) throws TransformerConfigurationException
TransformerConfigurationException
public boolean isTopLevel()
public Binding bindVariable(int fingerprint) throws XPathException
fingerprint
- The fingerprint of the name of the variable
XPathException
- 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |