net.sf.saxon.instruct
public class ResultDocument extends Instruction implements DivisibleInstruction
Constructor Summary | |
---|---|
ResultDocument(Properties globalProperties, Properties localProperties, Expression href, Expression formatExpression, String baseURI, int validationAction, SchemaType schemaType, IntHashMap<Expression> serializationAttributes, NamespaceResolver nsResolver)
Create a result-document instruction |
Method Summary | |
---|---|
Expression | copy()
Copy an expression. |
void | explain(ExpressionPresenter out)
Diagnostic print of expression structure. |
Expression | getContentExpression()
Get the expression that constructs the content |
int | getInstructionNameCode()
Get the name of this instruction for diagnostic and tracing purposes
(the string "xsl:result-document") |
int | getIntrinsicDependencies() |
ItemType | getItemType(TypeHierarchy th)
Get the item type of the items returned by evaluating this instruction |
Iterator<Expression> | iterateSubExpressions()
Get all the XPath expressions associated with this instruction
(in XSLT terms, the expression present on attributes of the instruction,
as distinct from the child instructions in a sequence construction) |
Expression | optimize(ExpressionVisitor visitor, ItemType contextItemType) |
TailCall | processLeavingTail(XPathContext context) |
void | processLeft(Stack<XPathContext> contextStack, Stack state)
In streaming mode, process the first half of the instruction (for example, to start a new document or element) |
void | processRight(Stack<XPathContext> contextStack, Stack state)
In streaming mode, process the right half of the instruction (for example, to end a new document or element) |
static void | processXslOutputElement(NodeInfo element, Properties props, XPathContext c)
Construct a set of output properties from an xsl:output element supplied at run-time |
protected void | promoteInst(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites. |
boolean | replaceSubExpression(Expression original, Expression replacement)
Replace one subexpression by a replacement subexpression |
void | setContentExpression(Expression content)
Set the expression that constructs the content |
void | setDynamicOutputElement(Expression exp)
Set an expression that evaluates to a run-time xsl:output element, used in the saxon:result-document()
extension function designed for use in XQuery |
static void | setSerializationProperty(Properties details, String uri, String lname, String value, NamespaceResolver nsResolver, boolean prevalidated, Configuration config)
Validate a serialization property and add its value to a Properties collection |
void | setUseStaticBaseUri(boolean staticBase)
Set whether the the instruction should resolve the href relative URI against the static
base URI (rather than the dynamic base output URI) |
Expression | simplify(ExpressionVisitor visitor)
Simplify an expression. |
Expression | typeCheck(ExpressionVisitor visitor, ItemType contextItemType) |
Parameters: globalProperties properties defined on static xsl:output localProperties non-AVT properties defined on result-document element href href attribute of instruction formatExpression format attribute of instruction baseURI base URI of the instruction validationAction for example STRICT schemaType schema type against which output is to be validated serializationAttributes computed local properties nsResolver namespace resolver
Returns: the copy of the original expression
Returns: the content expression
Parameters: th the type hierarchy cache
Returns: the static item type of the instruction. This is empty: the result-document instruction returns nothing.
Parameters: contextStack state a stack on which the instruction can save state information during the call on processLeft()
Parameters: contextStack state a stack on which the instruction can save state information during the call on processLeft()
Parameters: element an xsl:output element props Properties object to which will be added the values of those serialization properties that were specified c the XPath dynamic context
Parameters: offer The type of rewrite being offered
Throws: XPathException
Parameters: original the original subexpression replacement the replacement subexpression
Returns: true if the original subexpression is found
Parameters: content the expression defining the content of the result document
Parameters: exp the expression whose result should be an xsl:output element
Parameters: details the properties to be updated uri the uri of the property name lname the local part of the property name value the value of the serialization property. In the case of QName-valued values, this will use lexical QNames if prevalidated is false, Clark-format names otherwise nsResolver resolver for lexical QNames; not needed if prevalidated prevalidated true if values are already known to be valid and lexical QNames have been expanded into Clark notation config the Saxon configuration
Parameters: staticBase set to true by fn:put(), to resolve against the static base URI of the query. Default is false, which causes resolution against the base output URI obtained dynamically from the Controller
Parameters: visitor an expression visitor
Returns: the simplified expression
Throws: net.sf.saxon.trans.XPathException if an error is discovered during expression rewriting