11.3 Using Values of Variables and Parameters with
Using Values of Variables and Parameters with
xsl:copy-of
<
copy-of
select=
expression
>
<-- Content: -->
<
/copy-of>
The xsl:copy-of element can be used to insert a result
tree fragment into the result tree, without first converting it to a
string as xsl:value-of does (see [Generating Text with ]). The required select attribute
contains an Expression. When
the result of evaluating the expression is a result tree fragment, the
complete fragment is copied into the result tree. When the result is
a node-set, all the nodes in the set are copied in document order into
the result tree; copying an element node copies the attribute nodes,
namespace nodes and children of the element node as well as the
element node itself; a root node is copied by copying its children.
When the result is neither a node-set nor a result tree fragment, the
result is converted to a string and then inserted into the result
tree, as with xsl:value-of.
|