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

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

XPST0008

An expression refers to an element name, attribute name, schema type name, namespace prefix, or variable name that is not defined in the static context

This means that you haven't declared the object that is referenced in the expression. This might be because you misspelled the name, or it might be because you got the namespace prefix wrong—if the name has a prefix, check that it refers to the correct namespace URI, and if it doesn't, check what the default namespace for that kind of name is.

XPST0010

An expression refers to an axis that the implementation does not support

Under XSLT this can only be the namespace axis; processors are not required to support this axis.

XPST0017

The expanded QName and number of arguments in a function call do not match the name and arity of a function signature in the static context

This error either means that the function you are calling has not been declared, or that you are calling it with the wrong number of arguments. Check the namespace.

XPST0021

It is a dynamic error if a value in a cast expression cannot be cast to the required type

Not all casts are allowed. For example, you cannot cast from an integer to a date. This error message means that you have attempted one of these disallowed casts. The casts that are allowed are described in Chapter 9 of this book.

XPST0051

A QName used as an AtomicType in a SequenceType is not defined in the in-scope schema types as an atomic type

This means you have used an expression such as
$x instance of mf:invoice
where the type
mf:invoice
is either not defined at all or is a complex type, a list type, or a union type.

Perhaps you meant to write
$x instance of element(*, mf:invoice)
.

XPST0080

The target type of a cast or castable expression is
xs:NOTATION
or
xs:anyAtomicType

This is subtly different from XPST0051 because these two types are atomic. But they are abstract, so you cannot cast to them.

XPST0081

A QName used in an expression contains a namespace prefix that cannot be expanded into a namespace URI using the statically known namespaces

In other words, you have used a namespace prefix without first declaring it.

XPTY0004

The value of an expression has a type that is not appropriate for the context in which the expression occurs

A common error code. It will occur, for example, if you write
abs(“a”)
, because the argument to
abs()
must be a number. Like other type errors, this may be detected either at compile time or at runtime.

XPTY0018

The last step in a path expression contains both nodes and atomic values

Any expression on the right-hand side of
/
must return either nodes or atomic values, not a mixture.

XPTY0019

A step (other than the last step) in a path expression contains an atomic value

Any expression on the left-hand side of
/
must return nodes, not atomic values.

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

Other books

Blood Substitute by Margaret Duffy
The Docklands Girls by June Tate
Mr. Unforgettable by Karina Bliss
Hell to Pay by Simon R. Green
I Can See in the Dark by Karin Fossum
The I.T. Girl by Pearse, Fiona
Suicide Notes by Michael Thomas Ford
Blue Collar Blues by Rosalyn McMillan
Gray Lady Down by William McGowan