Class KeyDeclaration

    • Constructor Detail

      • KeyDeclaration

        public KeyDeclaration​(Stylesheet parentNode,
                              int docOrderNumber)
        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 Detail

      • setName

        public void setName​(QName name)
        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

        public QName 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

        public java.lang.String getNodeName()
        Return the node name.
        Specified by:
        getNodeName in interface org.w3c.dom.Node
        Overrides:
        getNodeName in class ElemTemplateElement
        Returns:
        the element's name
      • setMatch

        public void setMatch​(XPath v)
        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:
        patterns in XSLT Specification
      • getMatch

        public XPath 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:
        patterns in XSLT Specification
      • setUse

        public void setUse​(XPath v)
        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

        public XPath 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 class ElemTemplateElement
        Returns:
        The token ID for this element
        See Also:
        Constants
      • compose

        public void compose​(StylesheetRoot sroot)
                     throws javax.xml.transform.TransformerException
        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 class ElemTemplateElement
        Throws:
        javax.xml.transform.TransformerException
      • recompose

        public void recompose​(StylesheetRoot root)
        This function is called during recomposition to control how this element is composed.
        Overrides:
        recompose in class ElemTemplateElement
        Parameters:
        root - The root stylesheet for this transformation.