Class XSLItemType

All Implemented Interfaces:
Source, SourceLocator, ActiveSource, GroundedValue, Item, MutableNodeInfo, NamespaceResolver, NodeInfo, Sequence, Location, SteppingNode, SiblingCountingNode, Locator

public class XSLItemType extends StyleElement
The class implements a xsl:item-type declaration in a stylesheet. This declaration associates a name with an item type, allowing the name (say N) to be used in an itemType with the syntax type(N).
  • Constructor Details

    • XSLItemType

      public XSLItemType()
  • Method Details

    • isDeclaration

      public boolean isDeclaration()
      Description copied from class: StyleElement
      Ask whether this node is a declaration, that is, a permitted child of xsl:stylesheet (including xsl:include and xsl:import). The default implementation returns false
      Overrides:
      isDeclaration in class StyleElement
      Returns:
      true if the element is a permitted child of xsl:stylesheet or xsl:transform
    • prepareAttributes

      protected void prepareAttributes()
      Description copied from class: StyleElement
      Set the attribute list for the element. This is called to process the attributes (note the distinction from processAttributes in the superclass). Must be supplied in a subclass
      Specified by:
      prepareAttributes in class StyleElement
    • getObjectName

      public StructuredQName getObjectName()
      Description copied from class: StyleElement
      Get a name identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc. This is used only where the name is known statically. If there is no name, the value will be null.
      Overrides:
      getObjectName in class StyleElement
      Returns:
      the name of the object declared in this element, if any
    • indexTypeAlias

      public void indexTypeAlias(ComponentDeclaration decl, PrincipalStylesheetModule top) throws XPathException
      Throws:
      XPathException
    • validate

      public void validate(ComponentDeclaration decl) throws XPathException
      Description copied from class: StyleElement
      Check that the stylesheet element is valid. This is called once for each element, after the entire tree has been built. As well as validation, it can perform first-time initialisation. The default implementation does nothing; it is normally overriden in subclasses.
      Overrides:
      validate in class StyleElement
      Parameters:
      decl - the declaration to be validated
      Throws:
      XPathException - if any error is found during validation
    • tryToResolve

      public ItemType tryToResolve() throws XPathException
      Throws:
      XPathException
    • compile

      public Expression compile(Compilation exec, ComponentDeclaration decl) throws XPathException
      Compile this XSLT declaration. This always fails for this class.
      Overrides:
      compile in class StyleElement
      Parameters:
      exec - the Executable
      decl - the containing top-level declaration, for example xsl:function or xsl:template
      Returns:
      a compiled expression or null.
      Throws:
      XPathException - (always)