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

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

Namespace Axis (XPath)

The namespace
axis
selects all the
namespace nodes
belonging to the
context node
. If the context node is not an
element node
, the axis will be empty. For element nodes, there is one
namespace node
for every
namespace
that is in scope for the element, whether it relates to a
namespace declaration
that was defined on this element or on a containing element. This is a
forwards axis
. The namespace axis is retained in XPath 2.0, but it is deprecated: applications requiring namespace information should instead use the functions
in-scope-prefixes()
and
namespace-for-prefix()
.

Namespace Declaration (XML Namespaces)

A construct in an XML
document
that declares that within a particular region of the document, a given
namespace prefix
will be used to refer to the
namespace
with a particular
URI
. There are two forms of namespace declaration:
xmlns=“uri”
to declare the default namespace (the one with a null prefix), and
xmlns:prefix=“uri”
to declare a namespace with a non-null prefix. Both are written in the form of XML
attributes
and apply to the
element
they are on and all
descendant
elements, unless overridden.

Namespace Fixup (Xslt)

Namespace fixup is the process of adding
namespace nodes
to a newly constructed
element node
to ensure that all the namespaces actually used by the element are properly declared.

Namespace Node (XPath)

A
node
in a
tree
that represents the binding of a
namespace prefix
to a
namespace URI
. A namespace node belongs to an element called its
parent
: it applies only to that element and not to any
descendant
elements.

Namespace Prefix (Xml Namespaces)

A short name used to identify a
namespace
within a particular region of an XML
document
, so called because it is most often used as the prefix of a
lexical QName
(the part before the colon). Different prefixes can be used to identify the same namespace, and in different contexts the same prefix can be used to identify different namespaces.

Namespace URI (XML Namespaces)

A
URI
used to identify a
namespace
. Namespace URIs are unusual in that there is no actual resource that can be obtained using the URI; the URI is simply a unique identifier. In practice, any string can be used as a namespace URI, though
http://
URLs are often used to give some prospect of uniqueness. Technically, the XML Namespaces specification refers to this concept as a
namespace name
, and in version 1.1 the namespace name can be an IRI, which unlike a URI allows non-ASCII characters. However, the term namespace URI is in widespread use despite the fact that practical products allow any string to be used.

NaN (XPath)

Not a number. This is one of the possible values of a
variable
whose data
type
is float or double. It results from an operation whose result is not numeric, for example
number(‘apple’)
.

Node (XDM)

An object forming part of a
tree
. There are seven kinds of node:
attribute nodes
,
comment nodes
,
document nodes
,
element nodes
,
namespace nodes
,
processing instruction nodes
, and
text nodes
. Nodes have properties including a name, a
string value
, a
typed value
, and a
base URI
. Every kind of node except a document node may have a
parent
node; document nodes and element nodes may have children; element nodes may have attributes and namespaces.

Node Kind (XDM)

Nodes are classified into seven kinds:
attribute nodes
,
comment nodes
,
document nodes
,
element nodes
,
namespace nodes
,
processing instruction nodes
, and
text nodes
.

Number (XDM)

In XPath 2.0, the term
number
is used as a generic term for the three primitive types
decimal
,
double
, and
float
, and their subtypes (including
integer
).

Output Method (XSLT)

XSLT 2.0 defines four output methods,
xml
,
html
,
xhtml
, and
text
. The output method controls the way in which the result tree is output (or
serialized
) as a stream of characters or bytes.

Parameter (XSLT)

A variable whose value is supplied by the caller. A
stylesheet
parameter is a
global variable
whose value can be set (in a vendor-defined way) when the stylesheet is executed. A
template
parameter is defined within an

element, and its value can be set when the template is invoked using

or

. A
function
parameter is defined within an

element, and is set by evaluating the arguments in an XPath function call.

Parent Axis (XPath)

The parent
axis
selects the
node
that is the parent of the
context node
, assuming it has a parent. Since this axis selects at most one node, it doesn't matter whether it is considered as a
forwards axis
or as a
reverse axis
.

Particle (Schema)

In the language of XML Schema, a particle is a component part of the definition of the structure of a
complex type
. A particle may be an
element declaration
, or a wildcard that allows elements from defined namespaces, or a sequence or choice compositor with a defined substructure.

Path Expression (XPath)

A path expression is an
expression
that selects a
sequence
of
nodes
in a
tree
. It defines a sequence of
steps
that define navigation paths from the
context node
to further nodes. The final result is the sequence of nodes reached by following each of the steps in turn. For example, the path expression
../@code
has two steps: the first step selects the parent of the context node, and the second step selects the
code
attribute of the selected parent. The nodes in the result of a path expression are always returned in
document order
, with duplicates removed.

Other books

Keeping the Promises by Gajjar, Dhruv
Quitting the Boss by Ann Victor
Through Time-Frankie by Conn, Claudy
The Great Tree of Avalon by T. A. Barron
All-Bright Court by Connie Rose Porter
Screams From the Balcony by Bukowski, Charles
Jakarta Missing by Jane Kurtz
Saturday by Ian McEwan