public class StyleNodeFactory extends Object implements NodeFactory
Modifier and Type | Field and Description |
---|---|
protected Configuration |
config |
protected NamePool |
namePool |
Constructor and Description |
---|
StyleNodeFactory(Configuration config,
Compilation compilation)
Create the node factory for representing an XSLT stylesheet as a tree structure
|
Modifier and Type | Method and Description |
---|---|
void |
compileContentValueTemplate(TextImpl node,
List<Expression> contents)
Compile a content value text node.
|
Compilation |
getCompilation() |
Configuration |
getConfiguration() |
int |
getXsltProcessorVersion()
Get the XSLT processor version to be used by this node factory.
|
boolean |
isElementAvailable(String uri,
String localName,
boolean instructionsOnly)
Method to support the element-available() function
|
boolean |
isTopLevelModule()
Ask whether this is the top-level module of a package
|
boolean |
isXSLOverride(NodeImpl node)
Test whether an element is an XSLOverride element
|
IAccumulatorRegistry |
makeAccumulatorManager() |
Expression |
makeConditionalBlock(List<Expression> content)
Make an expression representing a sequence constructor with contained xsl:on-empty and xsl:on-non-empty
instructions
|
ElementImpl |
makeElementNode(NodeInfo parent,
NodeName elemName,
SchemaType elemType,
boolean isNilled,
AttributeCollectionImpl attlist,
NamespaceBinding[] namespaces,
int namespacesUsed,
PipelineConfiguration pipe,
Location location,
int sequence)
Create an Element node.
|
TextImpl |
makeTextNode(NodeInfo parent,
CharSequence content)
Make a text node
|
protected StyleElement |
makeXSLElement(int f,
NodeImpl parent)
Make an XSL element node
|
PrincipalStylesheetModule |
newPrincipalModule(XSLPackage node)
Create a stylesheet package
|
void |
setTopLevelModule(boolean topLevelModule)
Say that this is the top-level module of a package
|
boolean |
validateTextNode(NodeInfo node)
Validate a text node in the stylesheet
|
protected Configuration config
protected NamePool namePool
public StyleNodeFactory(Configuration config, Compilation compilation)
config
- the Saxon configurationcompilation
- the compilation episode (compiling one package)public void setTopLevelModule(boolean topLevelModule)
topLevelModule
- true if this stylesheet module is the top level of a package; false
if it is included or importedpublic boolean isTopLevelModule()
public Compilation getCompilation()
public Configuration getConfiguration()
public int getXsltProcessorVersion()
public ElementImpl makeElementNode(NodeInfo parent, NodeName elemName, SchemaType elemType, boolean isNilled, AttributeCollectionImpl attlist, NamespaceBinding[] namespaces, int namespacesUsed, PipelineConfiguration pipe, Location location, int sequence)
makeElementNode
in interface NodeFactory
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
- List of new namespace declarations for this element, as a sequence
of namespace codes representing pairs of strings: (prefix1, uri1), (prefix2, uri2)...namespacesUsed
- the number of elemnts of the namespaces array actually usedpipe
- 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.protected StyleElement makeXSLElement(int f, NodeImpl parent)
f
- the fingerprint of the node nameparent
- the parent nodepublic TextImpl makeTextNode(NodeInfo parent, CharSequence content)
makeTextNode
in interface NodeFactory
content
- the content of the text nodepublic boolean isElementAvailable(String uri, String localName, boolean instructionsOnly)
uri
- the namespace URIlocalName
- the local NameinstructionsOnly
- true if only instruction elements qualifypublic IAccumulatorRegistry makeAccumulatorManager()
public boolean validateTextNode(NodeInfo node) throws XPathException
node
- the text nodeXPathException
- if the node is invalidpublic void compileContentValueTemplate(TextImpl node, List<Expression> contents) throws XPathException
node
- the text node potentially containing the templatecontents
- a list to which expressions representing the fixed and variable parts of the content template
will be appendedXPathException
- if a static error is foundpublic boolean isXSLOverride(NodeImpl node)
node
- the element to be testedpublic PrincipalStylesheetModule newPrincipalModule(XSLPackage node) throws XPathException
node
- the XSLPackage elementXPathException
public Expression makeConditionalBlock(List<Expression> content) throws XPathException
content
- the full list of compiled instructions, including OnEmpty and OnNotEmpty expressionsXPathException
- if (for example) XSLT 3.0 is not enabled.Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.