Read XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition Online
Authors: Michael Kay
Root Node (XPath)
The topmost
node
in a
tree
; any
node
that has no
parent
. In XPath 2.0, any kind of node may be a root node. A root node that represents a complete XML document is now referred to as a
document node
.
Schema (Schema)
In this book the term
schema
, unless otherwise specified, always means a schema defined using the W3 C XML Schema language. A schema can be regarded as a collection of
element declarations
,
attribute declarations
, and
type definitions
. A
schema document
, by contrast, is the XML
document
rooted at an
Schema Component (Schema)
A generic term for
element declarations
,
attribute declarations
, and
type definitions
.
Schema Type (XDM)
A type as defined in XML Schema: either a
complex type
or a
simple type
. The type may be named, or it may be anonymous. The term includes both
built-in types
(such as
xs:integer
) and user-defined types.
Self Axis (XPath)
The self
axis
contains a single
node
, the
context node
. It makes no difference whether it is regarded as a
forwards axis
or a
reverse axis
. The
principal node kind
of the self axis is
elements
, which means that when the context node is an
attribute
, an axis
step
of the form
self::*
or
self::xyz
will not select that attribute.
Sequence (XPath)
A sequence in the XPath
data model
is an ordered collection of
items
. The items may be
atomic values
or references to
nodes
in a
tree
. A sequence containing no items is referred to as the
empty sequence
. Sequences have no identity of their own; two sequences containing the same items cannot be distinguished.
Sequence Constructor (XSLT)
A sequence of XSLT
instructions
,
extension instructions
,
literal result elements
, and
text nodes
, forming the content of an
stylesheet
. When the sequence constructor is evaluated, any
instructions
and
extension instructions
are evaluated according to the rules for each one, while any
literal result elements
and
text nodes
are copied to the result sequence. In most cases, the result sequence will be used to form the content of a new
node
in a
result tree
, but this depends on the instruction that contains the sequence constructor.
Sequence Type (XPath)
A sequence type is a definition that constrains the permitted values of a
sequence
. It has two parts: an
item type
, which constrains the type of the
items
in the sequence, and a cardinality, which constrains the number of items in the sequence. The cardinality may be zero-or-one, exactly-one, zero-or-more, or one-or-more.
Serialization (XSLT)
Serialization is the reverse of parsing: it takes a
document
represented as a
tree
in the XPath
data model
, and converts it into a lexical XML document.
Simple Type (Schema)
A simple type in XML Schema describes values that can be written as text, with no embedded markup. Simple types divide into
atomic types
,
list types
, and
union types
.
Attributes
always have a simple type; the content of an
element
may be either a simple or a
complex type
. XML Schema defines a number of built-in simple types, but further simple types can be defined in a user-written
schema
.
Simplified Stylesheet Module (XSLT)
A simplified stylesheet module is a
stylesheet module
consisting solely of a
literal result element
which is evaluated using the root of the source document as the
context node
.
Source Document (XPath)
The principal source document is the XML document to which the stylesheet is being applied. Secondary source documents can be loaded using the
document()
function.
Static Context (XPath)
The static context of an XPath
expression
is the total collection of information available to the XPath engine at compile time. This includes the
namespace declarations
that are in scope, the names and types of declared
variables
, the
base URI
of the expression, and the
collations
that are available.
Static Error (XPath)
A static error is an error detected during the analysis phase, that is, at compile time.
Static Type (XPath)
Every
expression
(and subexpression) has a static type. This is a
sequence type
, representing the best possible inference that can be made about the dynamic type of the value that will be returned when the expression is evaluated. For example, the static type of the expression
@*
might be
attribute()*
. In an XPath processor that implements strict static typing, a
type error
will be reported if the static type of an expression is not a subtype of the type required by the context in which the expression is used.
Step (XPath)
A step is used within a
path expression
to navigate from one
node
to a
sequence
of related nodes. The most common kind of step is an axis step, which is defined by an
axis
, giving the direction of navigation; a node test, which defines constraints on the type of and names of the target nodes; and zero or more
predicates
, which define arbitrary constraints that the target nodes must satisfy.