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

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

String (XPath)

One of the allowed data types for the value of an XPath expression. It is a sequence of zero or more Unicode characters (the same character set as is used in XML).

String Value (XDM)

Every
node
has a string value. For a
text node
the string value is the textual content; for an
element
it is the concatenation of the string values of its
descendant
text nodes (that is, the textual content of the element after stripping all markup). The string value of a node can be obtained using the
string()
function.

Stylesheet (XSLT)

A stylesheet represents the contents of one or more
stylesheet modules
, consisting of a principal stylesheet module and other modules that are reachable from the principal module using

and

declarations.

Stylesheet Function (XSLT)

A
function
defined in a
stylesheet
using an

declaration. Like other
functions
, a stylesheet function is called using a function call in an XPath
expression
.

Stylesheet Module (XSLT)

A stylesheet module is defined by a single

or

element, usually comprising the whole of an XML document, or it may be a
simplified stylesheet
whose root is a
literal result element
with an
xsl:version
attribute.

Tag (XML)

Often used incorrectly to mean
element
. An element
...
has two tags, the start tag

and the end tag

. Empty elements may be written with a single tag

.

Template (XSLT)

An

element in the
stylesheet
, together with its content. See also
named template
. (XSLT 1.0 had a different definition for this term, but XSLT 2.0 has bowed to popular usage.)

Template Rule (XSLT)

An

declaration
in the
stylesheet
with a
match
attribute. A template rule may be invoked using the

instruction
; for each selected
node
, the appropriate template rule is determined based on a number of criteria, including the match
pattern
and the template rule's
import precedence
and
priority
.

Temporary Tree (XSLT)

A
tree
constructed in the course of processing a stylesheet, by evaluating a nonempty

element. The value of the
variable
is the
document node
at the root of the temporary tree.

Text Node (XDM)

A
node
in a
tree
representing character data (called PCDATA in XML) within an XML
document
. Adjacent text nodes will always be merged into a single node.
Character references
and
entity references
occurring within the original text will have been replaced by their expansions.

Top-Level Element (XSLT)

An
element
in a
stylesheet
that is an immediate child of the

element.

Tree (XDM)

An abstract data structure representing the information content of an XML
document
. The tree always has a single
root node
(which contrary to the botanical analogy, is always depicted at the top). The structure of nodes in the tree need not follow the rules for a
well-formed
document in XML; for example, there may be several
element nodes
as children of the root. In XPath 2.0 the root of a tree need not be a
document node
. It is possible to have an element node as the root. It is also possible for any other kind of node (for example, an attribute node) to be parentless, in which case it acts as the root of a tree in which it is the only node.

Tunnel Parameter (XSLT)

A tunnel
parameter
is a parameter to an XSLT
template
that is passed transparently via any called
templates
until eventually reaching the template that actually uses its value.

Type (XPath)

In the context of XPath values, the term type means
sequence type
. In the context of nodes validated against a schema, it means
schema type
.

Type Annotation (XDM)

Every
element node
and
attribute node
has a type annotation. The type annotation identifies a
schema type
, which may be a
simple type
or a
complex type
. Type annotations are added to nodes as a consequence of
validation
against a
schema
. An element node that has not been validated against any schema is annotated with the special type
xs:untyped
, while an attribute node that has not been validated is annotated as
xs:untypedAtomic
.

Type Definition (Schema)

A type definition is a
schema component
that defines a
simple type
or a
complex type
.

Typed Value (XDM)

The typed value of a node is in general a
sequence
of
atomic values
. It represents the result of analyzing the textual content of the
node
against the
schema definition
for that node, during the process of
validation
.

Type Error (XPath)

A type error occurs when the value used as input to some operation is not of the
type
required by that operation; for example, when a string is used as an argument to an arithmetic operator. Type errors may be detected either at compile time or at runtime. A system that implements strict
static type
checking will report type errors at compile time pessimistically, that is, it will report an error if there is any possibility that the runtime value will have the wrong type.

Unparsed Entity (XML)

An unparsed entity is an
entity
declared in the
document type definition
with an associated notation. Such entities are unparsed because they generally contain binary data such as images, rather than XML. Two functions,
unparsed-entity-uri()
and
unparsed-entity-public-id()
, are available in XSLT to access the unparsed entities associated with a source document. However, it is not possible to create unparsed entities in a result document.

Union Type (Schema)

A union type is a
simple type
that allows a choice of alternatives. For example, a union type might allow an
attribute
to contain either a decimal value, or the string
“N/A”
.

URI (RFC 3986)

Uniform Resource Identifier: a generalization of the URLs (Uniform Resource Locators) used to uniquely address resources such as Web pages on the Internet.

Validation (XSLT)

Validation in XSLT 2.0 is the process of assessing a
tree
against a
schema
. If the tree is not valid against the schema, the transformation fails; if it is valid, then each
element node
and
attribute node
in the tree acquires a
type annotation
identifying the
schema type
against which it was found to be valid.

Variable (XPath)

A named value. Variables in XPath and XSLT differ from variables in procedural programming language in that there is no assignment statement.

Variable Binding (XSLT)

The declaration of a
variable
, in an

or

element, in conjunction with the current value of that variable.

Variable Reference (XPath)

A reference to a
variable
within an
expression
, in the form
$name
.

Well-Balanced (XML Fragment Interchange)

An XML fragment is well-balanced if there is an end tag that matches every start tag. This is a less strict constraint than being
well formed
: a well-balanced fragment does not have to have a single element that encloses all the others. XSLT and XPath are defined so that they will work on any
trees
representing a well-balanced XML fragment. The XML and XSLT standards don't use this terminology; instead they refer to the rules for an
external general parsed entity
.

Well Formed (XML)

A
document
is well formed if it follows the syntax rules in the XML specification. These include the rule that there must be a single outermost
element
that encloses all others. The XML output of an XSLT stylesheet is not required to be well formed, only to be
well balanced
.

Whitespace (XML)

Whitespace is any contiguous sequence of tab, carriage return, newline, and space characters. A whitespace node is a
text node
whose
string value
consists solely of whitespace. (The XML specification spells this as two words,
white space
, but I prefer a single word, because using
white
as a qualifying adjective suggests that white space is to be contrasted with red space and green space, which of course is not the case.)

XDM

The data model used by XSLT, XPath, and XQuery. Every value in XDM is a sequence of items; an item is either an atomic value or a node.

XPath 1.0 Compatibility Mode (XPath)

A mode of executing XPath 2.0 expressions that attempts to provide the maximum possible level of backward compatibility with XPath 1.0. In XSLT, this mode is selected by specifying
version=“1.0”
in the stylesheet.

Other books

Losing Gabriel by Lurlene McDaniel
Moving Target by Carolyn Keene
This Monstrous Thing by Mackenzi Lee
Molding Clay by Ciana Stone
To Honor You Call Us by Harvey G. Phillips, H. Paul Honsinger
The Wild Ones by C. Alexander London
Jane Steele by Lyndsay Faye
The Rules of Survival by Nancy Werlin