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

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

Because
/
is defined using
treat as
, this error also occurs if you use
/
when the context node is in a tree whose root is not a document node.

XPath Errors (XP)

XPST0001

Analysis of an expression relies on some component of the static context that has not been assigned a value

For example, using an unprefixed function name is an error if there is no default namespace for functions, and using the
=
operator is an error if there is no default collation.

XSLT defines default values for most components of the static context, making this error unlikely. But some aspects such as the static base URI need to be supplied by the user via the processor's API.

As with the static context, it's up to the host language to define whether the various parts of the dynamic context are given default values.

XPST0003

An expression is not a valid instance of the XPath grammar

This is an umbrella code that covers all XPath syntax errors.

XPST0005

The static type assigned to an expression other than the expression
()
is
empty-sequence()

This error only occurs with static type checking, which makes it unlikely under XSLT. It is designed primarily to catch incorrect path expressions. For example, if the schema definition for element
para
does not allow it to contain element
head
, then a processor that does static typing will reject the path expression
para/head
as an error.

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

Other books

Through My Window by Jayne Rylon
Ring Roads by Patrick Modiano
Brothers of the Head by Brian Aldiss
Mandrake by Susan Cooper
Linnear 01 - The Ninja by Eric van Lustbader
Bad Boy by Olivia Goldsmith
Courting the Darkness by Fuller, Karen