Class ElemAttribute

All Implemented Interfaces:
Serializable, SourceLocator, XSLTVisitable, PrefixResolver, ExpressionNode, WhitespaceStrippingElementMatcher, Document, Element, Node, NodeList

public class ElemAttribute
extends ElemElement
Implement xsl:attribute.
 &!ELEMENT xsl:attribute %char-template;>
 &!ATTLIST xsl:attribute
   name %avt; #REQUIRED
   namespace %avt; #IMPLIED
   %space-att;
 &
 
See Also:
creating-attributes in XSLT Specification, Serialized Form
  • Constructor Details

    • ElemAttribute

      public ElemAttribute()
  • Method Details

    • getXSLToken

      public int getXSLToken()
      Get an int constant identifying the type of element.
      Overrides:
      getXSLToken in class ElemElement
      Returns:
      The token ID for this element
      See Also:
      Constants
    • getNodeName

      public String getNodeName()
      Return the node name.
      Specified by:
      getNodeName in interface Node
      Overrides:
      getNodeName in class ElemElement
      Returns:
      The element name
    • resolvePrefix

      protected String resolvePrefix​(SerializationHandler rhandler, String prefix, String nodeNamespace) throws TransformerException
      Resolve the namespace into a prefix. At this level, if no prefix exists, then return a manufactured prefix.
      Overrides:
      resolvePrefix in class ElemElement
      Parameters:
      rhandler - The current result tree handler.
      prefix - The probable prefix if already known.
      nodeNamespace - The namespace, which should not be null.
      Returns:
      The prefix to be used.
      Throws:
      TransformerException
    • validateNodeName

      protected boolean validateNodeName​(String nodeName)
      Validate that the node name is good.
      Parameters:
      nodeName - Name of the node being constructed, which may be null.
      Returns:
      true if the node name is valid, false otherwise.
    • appendChild

      public ElemTemplateElement appendChild​(ElemTemplateElement newChild)
      Add a child to the child list.
      Overrides:
      appendChild in class ElemTemplateElement
      Parameters:
      newChild - Child to append to the list of this node's children
      Returns:
      The node we just appended to the children list
      Throws:
      DOMException
    • setName

      public void setName​(AVT v)
      Description copied from class: ElemElement
      Set the "name" attribute. The name attribute is interpreted as an attribute value template. It is an error if the string that results from instantiating the attribute value template is not a QName.
      Overrides:
      setName in class ElemElement
      Parameters:
      v - Name attribute to set for this element
      See Also:
      ElemElement.setName(AVT)