net.sf.saxon.instruct
public class ResultDocument extends Instruction
The xsl:result-document element takes an attribute href="filename". The filename will often contain parameters, e.g. {position()} to ensure that a different file is produced for each element instance.
There is a further attribute "format" which determines the format of the output file, it identifies the name of an xsl:output element containing the output format details. In addition, individual serialization properties may be specified as attributes. These are attribute value templates, so they may need to be computed at run-time.
Constructor Summary | |
---|---|
ResultDocument(Properties globalProperties, Properties localProperties, Expression href, Expression formatExpression, String baseURI, int validationAction, SchemaType schemaType, IntHashMap serializationAttributes, NamespaceResolver nsResolver) |
Method Summary | |
---|---|
void | display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure. |
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 | 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(Optimizer opt, StaticContext env, ItemType contextItemType) |
TailCall | processLeavingTail(XPathContext context) |
protected void | promoteInst(PromotionOffer offer)
Handle promotion offers, that is, non-local tree rewrites. |
void | setContent(Expression content)
Set the expression that constructs the content |
static void | setSerializationProperty(Properties details, String uri, String lname, String value, NamespaceResolver nsResolver, boolean prevalidated, NameChecker checker)
Validate a serialization property and add its value to a Properties collection |
Expression | simplify(StaticContext env)
Simplify an expression. |
Expression | typeCheck(StaticContext env, ItemType contextItemType) |
Parameters: level indentation level for this expression out
Parameters: th
Returns: the static item type of the instruction. This is empty: the result-document instruction returns nothing.
Parameters: offer The type of rewrite being offered
Throws: XPathException
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 checker
Returns: the simplified expression
Throws: net.sf.saxon.trans.XPathException if an error is discovered during expression rewriting