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

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

XTSE0740

A stylesheet function has an unprefixed name

To distinguish user-defined functions from those in the standard function library, user-defined functions must always be in your own namespace, and must be declared using a prefix bound to that namespace. For example,

, with the declaration
xmlns:my=“http://my.com/functions”
on the

element.

XTSE0760

A parameter to a stylesheet function specifies a default value

In a function call, all arguments must be supplied by the caller, so it makes no sense for the

definition to provide a default value for an argument. The error means that the

element either has a
select
attribute, or is non-empty.

XTSE0770

Stylesheet contains two functions with the same name and arity

You are allowed two functions with the same name if they have different numbers of arguments, or if they have different import precedence. When overriding a function, use
xsl:import
rather than
xsl:include
.

XTSE0805

An attribute on a literal result element is in the XSLT namespace but is not a permitted attribute

Certain attribute such as
xsl:validation
and
xsl:type
can appear on literal result elements. Other attributes in the XSLT namespace are not permitted.

XTSE0808

A namespace prefix used in
exclude-result-prefixes
has not been declared

You can't exclude a namespace unless the namespace has been declared in the stylesheet.

XTSE0809

The value
#default
is used in
exclude-result-prefixes
, but there is no default namespace

XTSE0810

Two
xsl:namespace-alias
declarations in the stylesheet specify the same namespace via their
stylesheet-prefix
attribute

XTSE0812

An
xsl:namespace-alias
declaration specifies a prefix in
stylesheet-prefix
or
result-prefix
that has not been declared

XTSE0840

The
select
attribute of
xsl:attribute
must be absent if the instruction has content

In XSLT 2.0 you can specify the value of the new attribute using the
select
attribute, but the instruction must then be empty.

XTSE0870

The
select
attribute of
xsl:value-of
must be present if the element is empty, and absent otherwise

In XSLT 2.0 you can specify the value of the new text node in child instructions, but there must then be no
select
attribute.

XTSE0880

The
select
attribute of
xsl:processing-instruction
must be absent if the instruction has content

See XTSE0840.

XTSE0910

The
select
attribute of
xsl:namespace
must be present if the instruction is empty, and absent otherwise, not counting any
xsl:fallback
children

This is similar to other node-creating instructions, but because

is new in XSLT 2.0, it is allowed to have an

child which an XSLT 2.0 processor will ignore.

XTSE0940

The
select
attribute of
xsl:comment
must be absent if the instruction has content

See XTSE0840.

XTSE0975

If the
value
attribute of
xsl:number
is present, then the
select
,
level
,
count
, and
from
attributes must all be absent

Specifying the
value
attribute means you are using

only to format a number, not to get the section number of a node in the source document.

XTSE1015

The
select
attribute of
xsl:sort
must be absent if the instruction has content

In XSLT 2.0 you can compute the sort key using child instructions, but the
select
attribute must then be omitted.

XTSE1017

The
stable
attribute of
xsl:sort
is allowed only on the first
xsl:sort
element

This attribute indicates that items with duplicate sort keys should retain their original order. It is a property of the sort as a whole, not of an individual sort key, and is placed on the first

element for convenience.

XTSE1040

The
select
attribute of
xsl:perform-sort
must be absent if the instruction has content (other than
xsl:sort
and
xsl:fallback
)

The sequence to be sorted can be computed either using the
select
attribute or using nested instructions, but not both.

XTSE1060

Call to
current-group()
appears within a pattern

XTSE1070

Call to
current-grouping-key()
appears within a pattern

XTSE1080

Exactly one of the four
attributes group-by
,
group-adjacent
,
group-starting-with
, and
group-ending-with
must be present on
xsl:for-each-group.

XTSE1090

The
collation
attribute of
xsl:for-each-group
cannot be used unless
group-by
or
group-adjacent
is specified

For other cases, you can achieve the required effect using the
default-collation
attribute.

XTSE1130

An
xsl:analyze-string
instruction must contain either
xsl:matching-substring
or
xsl:non-matching-substring
or both

XTSE1205

An
xsl:key
declaration must have either a
use
attribute or content, but not both

In XSLT 2.0 you can compute the key value using nested instructions, but the
use
attribute must then be omitted.

XTSE1210

The
collation
attribute of
xsl:key
is not a recognized collation

XTSE1220

Several
xsl:key
declarations with the same name specify different collations

When you have several
xsl:key
declarations with the same name, they effectively define a single index, so the same collation must be used on all of them.

XTSE1290

A decimal format contains two conflicting definitions for the same attribute

This typically means that you have two

declarations with the same name (or both with no name) and they both define an attribute such as
decimal-separator
, but with different values.

XTSE1295

The zero-digit in a decimal format is not a Unicode digit or is a digit whose value is not zero

You can use non-ASCII digits, for example Indic, Tamil, or Thai digits, but the zero-digit symbol must be a character defined in the Unicode database to have a numeric value of zero.

XTSE1300

In a decimal format, the various characters used in the picture string must have distinct values

For example, you can't use
,
as the decimal separator if it is also used as the grouping separator, either explicitly or by default.

XTSE1430

In
[xsl:]extension-element-prefixes
, a prefix is specified that has not been declared, or
#default
is used when there is no default namespace

XTSE1505

The
[xsl:]validation
and
[xsl:]type
attributes must not be present on the same element

These attributes are mutually exclusive. If you know the type that you want to validate against, you don't need
[xsl:]validation
.

XTSE1520

An
[xsl:]type
attribute is an invalid QName, uses an undeclared prefix, or does not match the name of any imported schema type

XTSE1530

The
type
attribute of
xsl:attribute
refers to a complex type

Attributes must always have simple types.

XTSE1560

An output definition specifies two conflicting values for the same attribute

Typically, you have two
xsl:output
declarations that both specify the same name (or no name) and that have different values for some serialization property. If you want one to override the other, consider using
xsl:import
instead of
xsl:include
.

XTSE1570

The
method
attribute of
xsl:output
must either be a prefixed QName, or one of
xml
,
html
,
xhtml
,
text.

If you want to use your own or a vendor-specific output method, then its name must be in a namespace.

Other books

Only Witness, The by Flagg, Shannon
Death Grip by Matt Samet
21 Blackjack by Ben Mezrich
Ozma of Oz by L. Frank Baum
True Conviction by James P. Sumner
A Hero Scarred by April Angel, Milly Taiden
The World Wreckers by Marion Zimmer Bradley
Objects of My Affection by Jill Smolinski