|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--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 org.xml.sax.SAXException |
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 |
emptyArray, emptyEnumeration, index, nameCode, parent, root, sequence |
Fields inherited from interface com.icl.saxon.om.NodeInfo |
ATTRIBUTE, COMMENT, ELEMENT, NAMESPACE, NODE, NODE_TYPE_NAMES, NONE, NUMBER_OF_TYPES, PI, ROOT, TEXT |
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 |
Constructor Summary | |
StyleElement()
Constructor creates an empty attribute list |
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 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. |
java.lang.String |
expandChildren(Context context)
Expand the stylesheet elements subordinate to this one, returning the result as a string. |
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 |
int |
getColumnNumber()
needed to satisfy Locator interface |
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(org.xml.sax.SAXException reason)
Set a validation error |
protected org.xml.sax.SAXException |
styleError(org.xml.sax.SAXException error)
Construct an exception with diagnostic information |
protected org.xml.sax.SAXException |
styleError(java.lang.String message)
|
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. |
void |
validateSubtree()
Recursive walk through the stylesheet to validate all nodes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.xml.sax.Locator |
getLineNumber, getPublicId, getSystemId |
Methods inherited from interface com.icl.saxon.om.NodeInfo |
copy, copyStringValue, defaultAction, enumerateChildren, getAllChildNodes, getDisplayName, getDocumentElement, getDocumentRoot, getFingerprint, getIndex, getLineNumber, getLocalName, getNameCode, getNextInDocument, getNodeName, getNodeType, getNumberOfChildren, getPath, getPrefix, getPreviousInDocument, getSequenceNumber, getSequentialKey, getSystemId, getURI, getURICode, getValue, isDocumentElement, isSameNode |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getChildNodes, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
Methods inherited from interface org.w3c.dom.Element |
getElementsByTagName, getElementsByTagNameNS, getTagName |
Field Detail |
protected java.util.Vector attributeSets
protected java.lang.String version
protected org.xml.sax.SAXException validationError
Constructor Detail |
public StyleElement()
Method Detail |
public void substituteFor(StyleElement temp) throws org.xml.sax.SAXException
protected void setValidationError(org.xml.sax.SAXException reason)
public boolean isInstruction()
public boolean mayContainTemplateBody()
public XSLStyleSheet getContainingStyleSheet()
public int getPrecedence() throws org.xml.sax.SAXException
public final StandardNames getStandardNames() throws org.xml.sax.SAXException
public void processAllAttributes() throws org.xml.sax.SAXException
public final void processAttributes() throws org.xml.sax.SAXException
protected void checkUnknownAttribute(int nc) throws org.xml.sax.SAXException
nc
- The name code of the attribute namepublic abstract void prepareAttributes() throws org.xml.sax.SAXException
public Expression makeExpression(java.lang.String expression) throws org.xml.sax.SAXException
public Pattern makePattern(java.lang.String pattern) throws org.xml.sax.SAXException
public Expression makeAttributeValueTemplate(java.lang.String expression) throws org.xml.sax.SAXException
protected void processExtensionElementAttribute(int nc) throws org.xml.sax.SAXException
nc
- the name code of the attribute requiredprotected void processExcludedNamespaces(int nc) throws org.xml.sax.SAXException
nc
- the name code of the attribute requiredprotected void processVersionAttribute(int nc) throws org.xml.sax.SAXException
nc
- the name code of the attribute requiredpublic java.lang.String getVersion() throws org.xml.sax.SAXException
public boolean forwardsCompatibleModeIsEnabled() throws org.xml.sax.SAXException
protected boolean definesExtensionElement(short uriCode) throws org.xml.sax.SAXException
uriCode
- the namespace URI code being testedpublic boolean isExtensionNamespace(short uriCode) throws org.xml.sax.SAXException
uriCode
- the namespace URI code being testedprotected boolean definesExcludedNamespace(short uriCode) throws org.xml.sax.SAXException
uriCode
- the code of the namespace URI being testedpublic boolean isExcludedNamespace(short uriCode) throws org.xml.sax.SAXException
uriCode
- the code of the namespace URI being testedpublic void validate() throws org.xml.sax.SAXException
public void preprocess() throws org.xml.sax.SAXException
public void validateSubtree() throws org.xml.sax.SAXException
protected XSLStyleSheet getPrincipalStyleSheet() throws org.xml.sax.SAXException
public PreparedStyleSheet getPreparedStyleSheet() throws org.xml.sax.SAXException
public void checkWithinTemplate() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- if not within a template bodypublic void checkTopLevel() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- if not at top levelpublic void checkNotTopLevel() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- if it is at the top levelpublic void checkEmpty() throws org.xml.sax.SAXException
org.xml.sax.SAXException
- if it is not emptypublic void reportAbsence(java.lang.String attribute) throws org.xml.sax.SAXException
org.xml.sax.SAXException
- if the attribute is missingpublic abstract void process(Context context) throws org.xml.sax.SAXException
context
- The context in the source XML document, giving access to the current node,
the current variables, etc.public void processChildren(Context context) throws org.xml.sax.SAXException
context
- The context in the source XML document, giving access to the current node,
the current variables, etc.protected void fallbackProcessing(StyleElement instruction, Context context) throws org.xml.sax.SAXException
protected Expression handleSortKeys(Expression select) throws org.xml.sax.SAXException
public java.lang.String expandChildren(Context context) throws org.xml.sax.SAXException
context
- The context in the source documentprotected void findAttributeSets(java.lang.String use) throws org.xml.sax.SAXException
protected void processAttributeSets(Context context) throws org.xml.sax.SAXException
protected org.xml.sax.SAXException styleError(org.xml.sax.SAXException error)
protected org.xml.sax.SAXException styleError(java.lang.String message)
public boolean isTopLevel() throws org.xml.sax.SAXException
public Binding bindVariable(int fingerprint) throws org.xml.sax.SAXException
fingerprint
- The fingerprint of the name of the variablepublic Binding getVariableBinding(int fprint) throws org.xml.sax.SAXException
public java.util.Enumeration[] getVariableNames() throws org.xml.sax.SAXException
public Function getStyleSheetFunction(int fingerprint) throws org.xml.sax.SAXException
fingerprint
- the fingerprint of the name of the functionpublic int getColumnNumber()
getColumnNumber
in interface org.xml.sax.Locator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |