XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition (149 page)

BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition
2.36Mb size Format: txt, pdf, ePub

See Also


immediately following.

xsl:copy-of

The main purpose of the

instruction is to copy a sequence of nodes to the result sequence. This is a deep copy—when a node is copied, its descendants are also copied.

Changes in 2.0

A new
copy-namespaces
attribute is introduced: This gives you control over whether or not the unused namespaces of an element should be copied.

Two new attributes
validation
and
type
are available to control whether and how the copied nodes are validated against a schema.

Format

  select = expression

  copy-namespaces? = “yes” | “no”

  validation? = “strict” | “lax” | “preserve” | “strip”

  type? = qname />

Position


is an instruction. It is always used within a sequence constructor.

Attributes

Name
Value
Meaning
select
mandatory
XPath Expression
The sequence of nodes or atomic values to be copied to the output destination
copy-namespaces
optional
yes
or
no
.
Default is
yes
Indicates whether the namespace nodes of an element should be copied
validation
optional
strict
,
lax
,
preserve
, or
skip
Indicates whether and how the copied nodes should be subjected to schema validation, or whether existing type annotations should be retained or removed

Other books

Season of Crimson Blossoms by Abubakar Adam Ibrahim
Chaos by David Meyer
HONOR BOUND (The Spare Heir) by Michael G. Southwick
What Happened to Lani Garver by Carol Plum-Ucci
Hunted tgl-3 by Ednah Walters
The End of Days by Helen Sendyk
The January Wish by Juliet Madison
The Whiskey Tide by Myers, M. Ruth