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

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

XTDE0410

In the content of a new element node, attributes and namespaces must come before other kinds of node

When you create a new element, you must write its attributes before you generate any child elements or text nodes. This rule is designed to allow streamed output: the processor knows when it sees the first child of an element that it will not see any more attributes, so it can write the start tag to the serializer. This can potentially reduce the delay before the user sees the first output emerging.

XTDE0420

In the content of a new document node, there must be no attributes or namespaces

Attributes and namespaces can be output to a result document only as part of the content of an element node.

XTDE0430

In the content of a new element node, there must not be two namespace nodes that bind the same prefix to different URIs

This will only happen if you create two conflicting namespaces deliberately. If there is an accidental clash, the system will sort it out by changing prefixes.

XTDE0440

In the content of a new element node with a null namespace URI, there must be no namespace node that defines a default namespace

This will only happen if you explicitly create or copy a namespace node equivalent to the declaration
xmlns=“some-uri”
. Perhaps you are doing this because you want the element to be in the
some-uri
namespace. The right way to put it in this namespace is at the time you create the element, typically by using the
namespace
attribute of

.

XTDE0560

When
xsl:apply-imports
or
xsl:next-match
is evaluated, the current template rule must not be null

The current template rule is null while evaluating a global variable or a stylesheet function; it is also null inside an

iteration.

XTDE0610

When a template parameter is required because it has neither a
select
attribute nor content, but has an
as
attribute that does not allow the empty sequence, then the caller must supply a value

If

has no
as
attribute, and no default is specified, then the default value is a zero-length string. If it has an
as
attribute, the “default default” is an empty sequence. But if the
as
attribute does not allow an empty sequence, for example
as=“xs:date”
, then the parameter is treated as a required parameter and it is an error to supply no value.

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

Other books

Line Dancing Can Be Murder by Coverstone, Stacey
Following Ezra by Tom Fields-Meyer
Vacation by Deb Olin Unferth
Abduction by Michael Kerr
The Road to Omaha by Robert Ludlum