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

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

XTRE1495

A transformation must not generate two result trees with URIs that identify the same physical resource

See also XTDE1490. If you write to two different URIs that refer to the same file (for example,
file:/c:/temp.xml
and
file:/C:/TEMP.XML
) the system is allowed to report an error, but it's likely that it won't notice, and the effect is then undefined.

XTRE1500

A transformation must not write to and read from the same resource, whether or not the same URI is used

This means you can't write a document using

and then immediately read it using the
doc()
function. This would make your stylesheet dependent on the order of execution; it would also be a sneaky way of introducing side effects. However, although this is defined as an error, processors are not obliged to catch it, and if you use a slightly different URI when reading and writing (see XTRE1495), you will probably get away with it.

XTRE1620

disable-output-escaping
was requested, but is not supported by the implementation

This feature is deprecated in XSLT 2.0, and not all implementations support it. Try to find a cleaner design for the code. A processor that doesn't support this attribute can report a fatal error or a warning if you use it, or can simply ignore it.

XTRE1630

disable-output-escaping
was requested when writing to a result tree that is not being serialized

The
disable-output-escaping
attribute is a request to the serializer. So if you're not serializing (for example, if you are writing the output to a DOM tree), then it can't be acted upon, which might mean that your code doesn't produce the desired effect. The processor can report the error or simply ignore the attribute.

XTSE0010

An XSLT-defined element is used where it is not permitted, a required attribute is omitted, or the content of the element doesn't correspond to the permitted content

This is a catch-all for structural errors in the stylesheet.

XTSE0020

An attribute contains a value that is not permitted for that attribute

Used when no more specific error is available.

XTSE0080

A reserved namespace is used in the name of a named template, mode, attribute set, key, decimal format, variable, parameter, stylesheet function, output definition, or character map

Reserved namespaces all start with
http://www.w3.org/
; they are not available for user-defined names.

XTSE00090

An element in the XSLT namespace has an attribute whose namespace is either null or the XSLT namespace, other than the attributes defined for this element

This probably means you misspelled an attribute name in the stylesheet or forgot the correct name. You are allowed attributes beyond those defined in the spec if they are in your own (or the vendor's) namespace.

XTSE0110

The value of the
version
attribute must be a valid
xs:decimal

Normal values are
version=“1.0”
and
version=“2.0”
.

XTSE0125

The
[xsl:]default-collation
attribute does not contain a URI that the implementation recognizes

You can specify a list of URIs, and the system must recognize at least one of them. To ensure this, include
http://www.w3.org/2005/xpath-functions/collation/codepoint
at the end of the list.

XTSE0130

The
xsl:stylesheet
element has a child element with a null namespace URI

Top-level elements can be in the XSLT namespace or a user or vendor namespace, but not in no namespace.

XTSE0150

A literal result element used as the outermost element of a stylesheet has no
xsl:version
attribute

This refers to the simplified stylesheet syntax; the outermost element must have an
xsl:version
attribute. This error could arise because you misspelled the XSLT namespace URI, or because you supplied a document that isn't a stylesheet at all.

XTSE0165

The processor cannot retrieve a resource referenced by
xsl:include
or
xsl:import
, or that resource is not a valid stylesheet module

A common reason for this is that you used a relative URI reference, and the base URI isn't known. Check your processor API for how to supply the base URI.

XTSE0170

xsl:include
must be a top-level element

If you want a finer-grained inclusion mechanism, consider using XInclude, or external XML entities.

XTSE0180

A stylesheet module directly or indirectly includes itself

For example A includes B, B includes C, and C includes A. Just remove one of the includes.

XTSE0190

xsl:import
must be a top-level element

XTSE0200

xsl:import
must precede all other children of the
xsl:stylesheet
element

The reason for this is to ensure that imported declarations have lower import precedence than anything that comes after them.

XTSE0210

A stylesheet module directly or indirectly imports itself

For example A imports B, B includes C, and C includes A: there only needs to be one import in the cycle.

XTSE0215

An
xsl:import-schema
element that contains an
xs:schema
element has a
schema-location
attribute, or its namespace conflicts with the
targetNamespace
of the contained schema

This refers to the ability to write an inline schema directly within the

element. In this case it's simplest to have no attributes on the

element.

XTSE0220

The schema constructed to support
xsl:import-schema
is not a valid schema

This could be because you have imported a schema that isn't valid in itself, or because you have imported two schemas that aren't consistent with each other, if for example they contain duplicate definitions.

XTSE0260

An XSLT element that is required to be empty has child elements or text nodes

Examples of such elements are

and

.

XTSE0265

One stylesheet module sets
input-type-annotations
to
strip
, another to
preserve.

This is a rare case where a stylesheet module must be consistent with the modules it imports.

XTSE0280

A prefix used in a QName in the stylesheet has not been declared

This might be a prefixed variable, template, or mode name. The prefix needs to be declared in a namespace declaration on a containing element in the same stylesheet module.

XTSE0340

The syntax of an XSLT pattern is incorrect

Catch-all for syntax errors in the pattern supplied in the
match
attribute of

, or various other places where match patterns are used.

XTSE0350

A left curly brace in an attribute value template has no matching right curly brace

In an AVT, paired curly braces are used around an XPath expression; for example,
name=“chap{$ch}”
.

XTSE0370

An unescaped right curly brace appears in an attribute value template

If an attribute is defined as an AVT, then any curly braces forming a literal part of the attribute value must be doubled; for example,
regex=“#{{1,2}}”
.

Other books

Deborah Camp by Blazing Embers
A Sense of Entitlement by Anna Loan-Wilsey
A Fall of Marigolds by Susan Meissner
The Edge of Doom by Amanda Cross
At the Queen's Command by Michael A. Stackpole
Drawing Blood by C.D. Breadner
The Briar King by Greg Keyes