net.sf.saxon.instruct
public class DocumentInstr extends ParentNodeConstructor
Conceptually it represents an XSLT instruction xsl:document-node, with no attributes, whose content is a complex content constructor for the children of the document node.
Constructor Summary | |
---|---|
DocumentInstr(boolean textOnly, String constantText, String baseURI)
Create a document constructor instruction |
Method Summary | |
---|---|
protected void | checkContentSequence(StaticContext env)
Check statically that the sequence of child instructions doesn't violate any obvious constraints
on the content of the node |
protected static void | checkContentSequence(StaticContext env, Expression content, int validation, SchemaType type) |
Expression | copy()
Copy an expression. |
Item | evaluateItem(XPathContext context)
Evaluate as an expression. |
void | explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
int | getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
int | getInstructionNameCode()
Get the name of this instruction for diagnostic and tracing purposes
(the string "document-constructor") |
ItemType | getItemType(TypeHierarchy th)
Get the item type |
Expression | getStringValueExpression(StaticContext env)
In the case of a text-only instruction (xsl:variable containing a text node or one or more xsl:value-of
instructions), return an expression that evaluates to the textual content as an instance of xs:untypedAtomic |
boolean | isTextOnly()
Determine whether this is a "text only" document: essentially, an XSLT xsl:variable that contains
a single text node or xsl:value-of instruction. |
EventIterator | iterateEvents(XPathContext context) |
TailCall | processLeavingTail(XPathContext context) |
void | processLeft(Stack<XPathContext> contextStack, Stack state)
In streaming mode, process the first half of the instruction (to start a new document or element) |
void | processRight(Stack<XPathContext> contextStack, Stack state)
In streaming mode, proecss the right half of the instruction (to end a new document or element) |
Expression | simplify(ExpressionVisitor visitor)
Simplify an expression. |
Parameters: textOnly true if the content contains text nodes only constantText if the content contains text nodes only and the text is known at compile time, supplies the textual content baseURI the base URI of the instruction
Parameters: env the static context
Throws: XPathException
Returns: the copy of the original expression
Parameters: th The TypeHierarchy
Returns: the in
Parameters: env the static evaluation context
Returns: an expression that evaluates to the textual content
Returns: true if this is a text-only document
Parameters: contextStack state a stack on which the instruction can save state information for use during the corresponding
Parameters: contextStack state a stack on which the instruction can save state information for use during the corresponding
Parameters: visitor an expression visitor
Returns: the simplified expression
Throws: net.sf.saxon.trans.XPathException if an error is discovered during expression rewriting