Name
<xsl:copy>
By default, <xsl:copy> makes a shallow copy of a
node. The <xsl:copy>
instruction copies only the current node and its namespace nodes;
attribute or child nodes are not copied. <xsl:copy> gives you fine-grained
control over the copying process, but it requires you to do more work.
You can use <xsl:copy> to
copy any kind of node, including comment or attribute nfodes.
Category
Instruction.
Required Attributes
None.
Optional Attributes
use-attribute-setsLists one or more attribute sets that should be used by this element. If you specify more than one attribute set, separate their names with whitespace characters. See the description of the
<xsl:attribute-set>element for more information.- [2.0]
copy-namespaces Defines whether namespaces should be copied. This applies only when copying an element node. Allowed values are
yes(the default) andno.- [2.0]
inherit-namespaces Defines whether this element and its children inherit the current namespace nodes. Valid values are
yes(the default) andno.- [2.0 – Schema]
type Defines the datatype of the copied element. The datatype can be any of the built-in datatypes, or it can be a datatype defined in a schema if you have a schema-aware XSLT 2.0 processor.
The
typeandvalidationattributes are mutually exclusive.- [2.0 – Schema]
validation Defines how the value of the copied node will be validated. The
validationattribute has four values:strict,lax,preserve, orstrip.validation="strict"means that the XSLT processor looks in all the declared ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access