Class StyleNodeFactoryPE

  • All Implemented Interfaces:
    NodeFactory
    Direct Known Subclasses:
    StyleNodeFactoryEE

    public class StyleNodeFactoryPE
    extends StyleNodeFactory
    implements NodeFactory
    Class StyleNodeFactoryPE: Subclass of StyleNodeFactory used for Saxon-PE.
    A Factory for nodes in the stylesheet tree.
    This version differs from the parent class in allowing extension elements to be constructed if the URI corresponds to an extension element factory registered in the Configuration
    • Field Detail

      • allowExtensions

        protected boolean allowExtensions
    • Constructor Detail

      • StyleNodeFactoryPE

        public StyleNodeFactoryPE​(Configuration config,
                                  Compilation compilation)
        Create the node factory for representing an XSLT stylesheet as a tree structure
        Parameters:
        config - the Saxon configuration
        compilation - the compilation episode (compiling one package)
    • Method Detail

      • makeElementNode

        public ElementImpl makeElementNode​(NodeInfo parent,
                                           NodeName elementName,
                                           SchemaType elementType,
                                           boolean isNilled,
                                           AttributeMap attlist,
                                           NamespaceMap namespaces,
                                           PipelineConfiguration pipe,
                                           Location location,
                                           int sequence)
        Create an Element node. Note, if there is an error detected while constructing the Element, we add the element anyway, and return success, but flag the element with a validation error. This allows us to report more than one error from a single compilation.
        Specified by:
        makeElementNode in interface NodeFactory
        Overrides:
        makeElementNode in class StyleNodeFactory
        Parameters:
        parent - The parent element
        elementName - The element name
        elementType - The type annotation of the element
        isNilled - true if the element is to be marked as nilled
        attlist - The attribute collection, excluding any namespace attributes
        namespaces - in-scope namespace declarations for this element
        pipe - The pipeline configuration (provides access to the error listener and the location provider)
        location - Indicates the source document and line number containing the node
        sequence - Sequence number to be assigned to represent document order.
        Returns:
        the element node
      • makeXSLElement

        protected StyleElement makeXSLElement​(int f,
                                              NodeImpl parent)
        Make an XSL element node
        Overrides:
        makeXSLElement in class StyleNodeFactory
        Parameters:
        f - the fingerprint of the node name
        parent - the parent node
        Returns:
        the constructed element node
      • isElementAvailable

        public boolean isElementAvailable​(NamespaceUri uri,
                                          java.lang.String localName,
                                          boolean instructionsOnly)
        Method to support the element-available() function
        Overrides:
        isElementAvailable in class StyleNodeFactory
        Parameters:
        uri - the namespace URI
        localName - the local Name
        instructionsOnly - true if only instructions qualify
        Returns:
        true if an extension element of this name is recognized