Package net.sf.saxon.style
Class StyleNodeFactory
java.lang.Object
net.sf.saxon.style.StyleNodeFactory
- All Implemented Interfaces:
NodeFactory
- Direct Known Subclasses:
StyleNodeFactoryPE
Class StyleNodeFactory.
A Factory for nodes in the stylesheet tree.
Currently only allows Element nodes to be user-constructed.
A Factory for nodes in the stylesheet tree.
Currently only allows Element nodes to be user-constructed.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStyleNodeFactory
(Configuration config, Compilation compilation) Create the node factory for representing an XSLT stylesheet as a tree structure -
Method Summary
Modifier and TypeMethodDescriptionboolean
isElementAvailable
(NamespaceUri uri, String localName, boolean instructionsOnly) Method to support the element-available() functionboolean
Ask whether this is the top-level module of a packagemakeElementNode
(NodeInfo parent, NodeName elemName, SchemaType elemType, boolean isNilled, AttributeMap attlist, NamespaceMap namespaces, PipelineConfiguration pipe, Location location, int sequence) Create an Element node.makeTextNode
(NodeInfo parent, UnicodeString content) Make a text nodeprotected StyleElement
makeXSLElement
(int f, NodeImpl parent) Make an XSL element nodenewPrincipalModule
(XSLPackage node) Create a stylesheet packagevoid
setTopLevelModule
(boolean topLevelModule) Say that this is the top-level module of a package
-
Field Details
-
config
-
namePool
-
-
Constructor Details
-
StyleNodeFactory
Create the node factory for representing an XSLT stylesheet as a tree structure- Parameters:
config
- the Saxon configurationcompilation
- the compilation episode (compiling one package)
-
-
Method Details
-
setTopLevelModule
public void setTopLevelModule(boolean topLevelModule) Say that this is the top-level module of a package- Parameters:
topLevelModule
- true if this stylesheet module is the top level of a package; false if it is included or imported
-
isTopLevelModule
public boolean isTopLevelModule()Ask whether this is the top-level module of a package- Returns:
- true if this stylesheet module is the top level of a package; false if it is included or imported
-
getCompilation
-
getConfiguration
-
makeElementNode
public ElementImpl makeElementNode(NodeInfo parent, NodeName elemName, SchemaType elemType, 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 interfaceNodeFactory
- Parameters:
parent
- The parent elementelemName
- The element nameelemType
- The type annotation of the elementisNilled
- true if the element is to be marked as nilledattlist
- The attribute collection, excluding any namespace attributesnamespaces
- in-scope namespace declarations for this elementpipe
- The pipeline configuration (provides access to the error listener and the location provider)location
- Indicates the source document and line number containing the nodesequence
- Sequence number to be assigned to represent document order.- Returns:
- the element node
-
makeXSLElement
Make an XSL element node- Parameters:
f
- the fingerprint of the node nameparent
- the parent node- Returns:
- the constructed element node
-
makeTextNode
Make a text node- Specified by:
makeTextNode
in interfaceNodeFactory
- Parameters:
parent
- the parent elementcontent
- the content of the text node- Returns:
- the constructed text node
-
isElementAvailable
Method to support the element-available() function- Parameters:
uri
- the namespace URIlocalName
- the local NameinstructionsOnly
- true if only instruction elements qualify- Returns:
- true if an extension element of this name is recognized
-
makeAccumulatorManager
-
newPrincipalModule
Create a stylesheet package- Parameters:
node
- the XSLPackage element- Returns:
- a new stylesheet package
- Throws:
XPathException
- if things go wrong
-