Class XSLPackage

  • All Implemented Interfaces:
    javax.xml.transform.Source, javax.xml.transform.SourceLocator, ActiveSource, GroundedValue, Item, MutableNodeInfo, NamespaceResolver, NodeInfo, Sequence, Location, SteppingNode, SiblingCountingNode, org.xml.sax.Locator

    public class XSLPackage
    extends XSLModuleRoot
    Handler for xsl:package elements. Explicit xsl:package elements are not permitted in Saxon-HE, but implicit packages are created, so the class is present in HE. The top-level module of a stylesheet/package will always be represented by an XSLPackage object, but if the original name was xsl:stylesheet or xsl:transform then this original name will be present as the name of the element.
    • Constructor Detail

      • XSLPackage

        public XSLPackage()
    • Method Detail

      • initialise

        public void initialise​(NodeName elemName,
                               SchemaType elementType,
                               AttributeMap atts,
                               NodeInfo parent,
                               int sequenceNumber)
        Initialise a new ElementImpl with an element name
        Overrides:
        initialise in class ElementImpl
        Parameters:
        elemName - Integer representing the element name, with namespaces resolved
        elementType - the schema type of the element node
        atts - The attribute list: always null
        parent - The parent node
        sequenceNumber - Integer identifying this element within the document
      • getName

        public java.lang.String getName()
        Get the name of the package (the value of its @name attribute)
        Returns:
        the name of the package, or null if the @name attribute is omitted
      • getVersion

        public int getVersion()
        Get the requested XSLT version (the value of the @version attribute)
        Returns:
        the value of the @version attribute, times ten as an integer
      • getPackageVersion

        public PackageVersion getPackageVersion()
        Get the package version (the value of the @package-version attribute)
        Returns:
        the value of the @package-version attribute, defaulting to "1.0"
      • 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
      • isDeclaredModes

        public boolean isDeclaredModes()
        Ask whether it is required that modes be explicitly declared
        Overrides:
        isDeclaredModes in class XSLModuleRoot
        Returns:
        true if modes referenced within this package must be explicitly declared