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
9.18Mb size Format: txt, pdf, ePub

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.

Other books

Surviving Santiago by Lyn Miller-Lachmann
The Last Summer of Us by Maggie Harcourt
Isle of Passion by Laura Restrepo
The Wild Rose by Jennifer Donnelly
The Haunted Mask II by R. L. Stine