O'Reilly logo

XSLT, 2nd Edition by Doug Tidwell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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-sets

Lists 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) and no.

[2.0] inherit-namespaces

Defines whether this element and its children inherit the current namespace nodes. Valid values are yes (the default) and no.

[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 type and validation attributes are mutually exclusive.

[2.0 – Schema] validation

Defines how the value of the copied node will be validated. The validation attribute has four values: strict, lax, preserve, or strip.

validation="strict" means that the XSLT processor looks in all the declared ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required