Package org.apache.xalan.templates
Class KeyDeclaration
java.lang.Object
org.apache.xml.utils.UnImplNode
org.apache.xalan.templates.ElemTemplateElement
org.apache.xalan.templates.KeyDeclaration
- All Implemented Interfaces:
Serializable
,SourceLocator
,XSLTVisitable
,PrefixResolver
,ExpressionNode
,WhitespaceStrippingElementMatcher
,Document
,Element
,Node
,NodeList
Holds the attribute declarations for the xsl:keys element.
A stylesheet declares a set of keys for each document using
the xsl:key element. When this set of keys contains a member
with node x, name y and value z, we say that node x has a key
with name y and value z.
- See Also:
-
Field Summary
Fields inherited from interface org.w3c.dom.Node
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
-
Constructor Summary
ConstructorsConstructorDescriptionKeyDeclaration
(Stylesheet parentNode, int docOrderNumber) Constructs a new element representing the xsl:key. -
Method Summary
Modifier and TypeMethodDescriptionvoid
compose
(StylesheetRoot sroot) This function is called after everything else has been recomposed, and allows the template to set remaining values that may be based on some other property that depends on recomposition.getMatch()
Get the "match" attribute.getName()
Get the "name" attribute.Return the node name.getUse()
Get the "use" attribute.int
Get an int constant identifying the type of element.void
recompose
(StylesheetRoot root) This function is called during recomposition to control how this element is composed.void
Set the "match" attribute.void
Set the "name" attribute.void
Set the "use" attribute.Methods inherited from class org.apache.xalan.templates.ElemTemplateElement
appendChild, appendChild, callVisitors, canAcceptVariables, canStripWhiteSpace, compareTo, containsExcludeResultPrefix, endCompose, error, error, execute, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getBaseIdentifier, getChildNodes, getColumnNumber, getDeclaredPrefixes, getDOMBackPointer, getEndColumnNumber, getEndLineNumber, getFirstChild, getFirstChildElem, getLastChild, getLastChildElem, getLength, getLineNumber, getLocalName, getNamespaceForPrefix, getNamespaceForPrefix, getNextSibling, getNextSiblingElem, getNodeType, getOwnerDocument, getOwnerXSLTemplate, getParentElem, getParentNode, getParentNodeElem, getPreviousSibling, getPreviousSiblingElem, getPublicId, getStylesheet, getStylesheetComposed, getStylesheetRoot, getSystemId, getTagName, getUid, getXmlSpace, handlesNullPrefixes, hasChildNodes, hasTextLitOnly, hasVariableDecl, insertBefore, isCompiledTemplate, item, removeChild, replaceChild, replaceChild, resolvePrefixTables, runtimeInit, setDOMBackPointer, setEndLocaterInfo, setLocaterInfo, setParentElem, setPrefixes, setPrefixes, setUid, setXmlSpace, shouldStripWhiteSpace
Methods inherited from class org.apache.xml.utils.UnImplNode
adoptNode, appendData, cloneNode, compareDocumentPosition, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, deleteData, getActualEncoding, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getImplementation, getInputEncoding, getNamespaceURI, getNodeValue, getOwnerElement, getPrefix, getSchemaTypeInfo, getSpecified, getStrictErrorChecking, getTextContent, getUserData, getWholeText, getXmlEncoding, getXmlStandalone, getXmlVersion, hasAttribute, hasAttributeNS, hasAttributes, importNode, insertData, isDefaultNamespace, isEqualNode, isId, isSameNode, isSupported, isWhitespaceInElementContent, lookupNamespaceURI, lookupPrefix, normalize, normalizeDocument, removeAttribute, removeAttributeNode, removeAttributeNS, removeChild, renameNode, replaceData, replaceWholeText, setActualEncoding, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setData, setDocumentURI, setIdAttribute, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setInputEncoding, setNodeValue, setPrefix, setStrictErrorChecking, setTextContent, setUserData, setValue, setXmlEncoding, setXmlStandalone, setXmlVersion, splitText, substringData
-
Constructor Details
-
KeyDeclaration
Constructs a new element representing the xsl:key. The parameters are needed to prioritize this key element as part of the recomposing process. For this element, they are not automatically created because the element is never added on to the stylesheet parent.
-
-
Method Details
-
setName
Set the "name" attribute. The name attribute specifies the name of the key. The value of the name attribute is a QName, which is expanded as described in [2.4 Qualified Names].- Parameters:
name
- Value to set for the "name" attribute.
-
getName
Get the "name" attribute. The name attribute specifies the name of the key. The value of the name attribute is a QName, which is expanded as described in [2.4 Qualified Names].- Returns:
- Value of the "name" attribute.
-
getNodeName
Return the node name.- Specified by:
getNodeName
in interfaceNode
- Overrides:
getNodeName
in classElemTemplateElement
- Returns:
- the element's name
-
setMatch
Set the "match" attribute. The match attribute is a Pattern; an xsl:key element gives information about the keys of any node that matches the pattern specified in the match attribute.- Parameters:
v
- Value to set for the "match" attribute.- See Also:
-
getMatch
Get the "match" attribute. The match attribute is a Pattern; an xsl:key element gives information about the keys of any node that matches the pattern specified in the match attribute.- Returns:
- Value of the "match" attribute.
- See Also:
-
setUse
Set the "use" attribute. The use attribute is an expression specifying the values of the key; the expression is evaluated once for each node that matches the pattern.- Parameters:
v
- Value to set for the "use" attribute.
-
getUse
Get the "use" attribute. The use attribute is an expression specifying the values of the key; the expression is evaluated once for each node that matches the pattern.- Returns:
- Value of the "use" attribute.
-
getXSLToken
public int getXSLToken()Get an int constant identifying the type of element.- Overrides:
getXSLToken
in classElemTemplateElement
- Returns:
- The token ID for this element
- See Also:
-
compose
This function is called after everything else has been recomposed, and allows the template to set remaining values that may be based on some other property that depends on recomposition.- Overrides:
compose
in classElemTemplateElement
- Throws:
TransformerException
-
recompose
This function is called during recomposition to control how this element is composed.- Overrides:
recompose
in classElemTemplateElement
- Parameters:
root
- The root stylesheet for this transformation.
-