home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Book HomeXSLTSearch this book

Glossary

absolute location path
A location path that begins with /, followed by one or more location steps separated by /. All location paths that begin with / are evaluated from the root node, so they always return the same result, regardless of the context node. Compare with location path and relative location path.

ancestor
A node that appears above a given node. Ancestors include a node's parent, its parent's parent, its parent's parent's parent, etc. XPath also defines the ancestor axis, which includes a node's parent, its parent's parent, its parent's parent's parent, etc., but not the node itself. Contrast with parent.

attribute node
The XPath node type that represents an attribute from an XML document. Attributes are different from other nodes because an attribute node is not considered a child of the element node that contains it. Despite this fact, the element node is considered the parent of the attribute node.

attribute set
A named group of attributes. You can create an attribute set (with the <xsl:attribute-set> element), then reference that attribute set elsewhere. For more information, see the description of the <xsl:attribute-set> element in Appendix A, "XSLT Reference".

attribute value template

An expression that contains an XPath expression in curly braces ({}). The XPath expression is evaluated at runtime, and its value replaces the expression. For an example of an attribute value template, see the discussion of the <xsl:attribute> element in Appendix A, "XSLT Reference"; Chapter 3, "XPath: A Syntax for Describing Needles and Haystacks" contains a complete discussion of attribute value templates.

axis
A relationship between the context node and other nodes in the document. XPath defines 13 different axes; see Section 3.2.6, "Axes" in Chapter 3, "XPath: A Syntax for Describing Needles and Haystacks" for a complete discussion of them.

base URI
The URI associated with every node in the XPath source tree. In certain circumstances, the base URI is used to resolve references to other resources. If a given node is an element or processing-instruction node and that node occurs in an external entity, then the base URI for that node is the base URI of the external entity. If an element or processing-instruction node does not occur in an external entity, then its base URI is the base URI of the document in which it appears. The base URI of a document node is the base URI of the document itself, and the base URI of an attribute, comment, namespace, or text node is the base URI of that node's parent.

CDATA section
A section of an XML document in which all markup is ignored. A CDATA section begins with the characters <![CDATA[, and ends with the characters ]]>. If two right brackets appear in the content of a CDATA section, they must be escaped. Within a stylesheet, determining if a given text node was originally a CDATA section is not possible. It is possible to generate certain elements as CDATA sections with the cdata-section-elements attribute of the <xsl:output> element.

child
An immediate descendant of a given node. Contrast with descendant. child is also the name of one of the XPath axes. The children of a node include all comment, element, processing-instruction, and text nodes. Attribute nodes and namespace nodes are not considered children.

comment node
A node that represents a comment from the original XML document. This is one of the seven kinds of nodes defined by XPath.

context
A data structure that determines how XPath expressions are evaluated. The context consists of five items: the context node, a pair of nonzero positive integers (the context position and context size), a set of variable bindings, a function library, and the set of namespace declarations that are in scope.

context node

The node from which all XPath expressions are evaluated. The context node is analogous to the current directory at a command prompt; all commands you type at a command prompt are evaluated in terms of the current directory. Compare with current node.

context position
A nonzero positive integer that indicates the position of the current node. The context position is always less than or equal to the context size.

context size
The number of nodes in the current node list.

current node
The node currently being processed. The node is defined by the select attribute of the <xsl:apply-templates> or <xsl:for-each> elements. Except within a predicate expression, the current node and the context node are the same.

current node list
The list of nodes selected by the select attribute of the <xsl:apply-templates> or <xsl:for-each> element currently being processed. By default, the current node list is in document order, but it may be reordered with one or more <xsl:sort> elements.

descendant
A given node's children, its children's children, its children's children's children, etc. descendant is also the name of one of the axes defined by XPath. Contrast with child.

document element
The element in the XML source document that contains the entire XML document. The node that represents the document element is a child of the root node; the root node and the element node for the document element are not the same.

element node
An XPath node that represents an element from the XML source document.

encoding
A set of characters, referenced in the XML declaration to describe the characters used in a particular document. The range of values for encodings is defined in http://www.ietf.org/rfc/rfc2278.txt. The range of values supported by a given XML parser or XSLT processor varies.

expanded name
The complete name of an element or attribute, including the local name and a possibly null namespace URI.

extension element
An element in an XSLT stylesheet whose namespace prefix references an extension. The XSLT specification defines how extension elements are identified in the stylesheet, but does not specify how they are implemented. Extension elements are implemented with a piece of code that is referenced in the stylesheet; each XSLT processor defines how that code is invoked to handle the transformation of the extension element. See Chapter 8, "Extending XSLT" for an extensive discussion of extension elements and extension functions.

extension function
A function whose namespace prefix references an extension. The XSLT specification defines how extension functions are identified in the stylesheet, but does not specify how they are implemented. Extension functions are implemented with a piece of code that is referenced in the stylesheet; each XSLT processor defines how that code is invoked to handle the invocation of the extension function. See Chapter 8, "Extending XSLT" for an extensive discussion of extension elements and extension functions.

fallback processing
Processing designed to handle the absence of an extension element or an extension function gracefully. This processing is typically accomplished with the element-available() or the function-available() function. When either function returns false, a stylesheet can respond gracefully to the absence of the requested function. XSLT also defines the <xsl:fallback> element, which can be used when an extension element is not available.

ID
One of the basic datatypes defined by the XML specification. In an XML document, one attribute of an element can be declared to be of type ID; this means that the value of that attribute must be unique across all attributes of type ID for all elements in the document. No more than one attribute on a given element can be of type ID. Attributes of type ID are useful for generating cross-references with the id() function. See Chapter 5, "Creating Links and Cross-References" for an extensive discussion of the ID, IDREF, and IDREFS datatypes.

IDREF
One of the basic datatypes defined by the XML specification. In an XML document, an attribute declared to be of type IDREF must have a value that matches an ID attribute elsewhere in the document. Attributes of type IDREF are useful for generating cross-references with the id() function. See Chapter 5, "Creating Links and Cross-References" for an extensive discussion of the ID, IDREF, and IDREFS datatypes.

IDREFS
One of the basic datatypes defined by the XML specification. In an XML document, an IDREFS attribute must contain one or more whitespace-separated values, each of which matches an ID attribute elsewhere in the document. Attributes of type IDREFS are useful for generating cross-references with the id() function. See Chapter 5, "Creating Links and Cross-References" for an extensive discussion of the ID, IDREF, and IDREFS datatypes.

key
A key is similar to a database index. It has three components: a name, used to identify the key (specified with the name attribute of the <xsl:key> element); the nodes, which will be returned by the key (specified with the use attribute of the <xsl:key> element); and the values, used to search for things in the key (specified with the match attribute of the <xsl:key> element)

The key <key name="language-index" match="defn" use="@language"/>, for example, defines a new key named language-index. Given a value for the language attribute, the key returns all <defn> elements whose language attributes match the given value. See Section 5.2, "Generating Links with the key() Function" in Chapter 5, "Creating Links and Cross-References" for a complete discussion of keys and how they are used.

literal result element (LRE)

An element in an XSLT stylesheet that does not belong to the XSLT namespace and is not an extension element. Literal elements are simply copied to the result tree.

local name
The nonqualified portion of an element or attribute name. For example, in the element <xsl:template>, template is the local name.

location path
An XPath expression that selects a set of nodes relative to the context node. Compare with absolute location path and relative location path.

location step
Consists of three parts: an axis name, a node test, and zero or more predicate expressions. There are three location steps in the XPath expression preceding-sibling::region/product[@name="Sandpiper"]/text().

The first location step is preceding-sibling::region; it has an axis name of preceding-sibling and a node test of region. It selects all <region> elements that are preceding siblings of the context node. It does not have a predicate expression.

The second location step, product[@name="Sandpiper"], has an axis name of child, the default axis. Its node test is product and it has the predicate [@name="Sandpiper"]. It selects all <product> children of the previous location step that have an attribute named name with a value of Sandpiper.

The third location step, text(), has an axis name of child and a node test of text(). It selects all text node children of the previous location step. It does not have a predicate expression.

mode
An XSLT feature that allows an element to be processed multiple times, using a different template and producing a different result each time. See the discussion of the <xsl:apply-templates> element in Appendix A, "XSLT Reference" for a detailed example of modes.

namespace
A collection of element and attribute names that are associated with a URI.

namespace node
The XPath node type that corresponds to a namespace declaration in an XML document.

namespace prefix
Part of a qualified name used to associate an element or attribute with a namespace URI.

namespace URI
The string associated with a collection of element and attribute names. Although commonly referred to as a URI, a namespace URI can actually be any string.

NCName
An XML name, used for local names and namespace prefixes. An NCName must start with a letter or an underscore (_).

node test
An XPath expression that selects certain nodes. The expressions child::*, para, and @id select all child nodes, all <para> child nodes, and any attribute named id, respectively. Four node tests -- (text(), comment(), node(), and processing-instruction()) -- look like functions, even though they technically aren't. They allow you to select parts of an XML document not accessible through the various axes defined by XPath. See Section B.2, "XPath Node Tests" in Appendix B, "XPath Reference" for a complete discussion of these node tests.

output escaping
The process of changing reserved characters (such as <, >, and &) into their entity references (such as &lt;, &gt;, and &amp;).

parameter
An XSLT mechanism used to bind a name to a value, defined with the <xsl:param> element. The difference between a parameter and a variable is that the value specified in the definition of a parameter is a default value. When the template or stylesheet that contains the parameter is invoked, the default value can be overridden. Like variables, though, once the value of a parameter is set, it cannot be changed.

parent
A node that appears immediately above a given node. A parent is a node's first ancestor. XPath also defines the parent axis, which contains a node's parent. With the exception of the root node, all nodes have a parent. Contrast with ancestor.

predicate expression
An XPath expression that appears in square brackets ([]). Predicate expressions filter a node-set, selecting only nodes that match the expression in square brackets. See Section 3.2.7, "Predicates" in Chapter 3, "XPath: A Syntax for Describing Needles and Haystacks" for more information.

prefix
An abbreviation for namespace prefix.

processing instruction
Part of an XML document containing instructions for applications. Here is a sample processing instruction:

      <?xml-stylesheet href="docbook/html/docbook.xsl"
      type="text/xsl"?> 

This processing instruction associates an XSLT stylesheet with an XML document. See Section 1.2.4.8, "Associating stylesheets with XML documents" in Chapter 1, "Getting Started" for a complete discussion of processing instructions.

processing-instruction node
The XPath node type that represents a processing instruction from an XML document.

qualified name
An element or attribute name that has been qualified with a namespace prefix. The format of a qualified name is prefix:local-name, where prefix and local-name are both NCNames. For example, <xsl:template> is a qualified name, while <template> is not. The names in an XSLT stylesheet (variable names, template names, mode names, etc.) must be qualified names.

QNAME
An abbreviation for qualified name.

relative location path
A location path that consists of one or more location steps separated by /. Compare with location path and absolute location path.

result-tree fragment
A fragment of the is result tree that can be associated with a variable. See Section B.5, "Datatypes" in Appendix B, "XPath Reference" for a more complete discussion of result-tree fragments.

root node
The XPath node that represents the root of an XML document. Note that the root node is not the same as the element node for the document element. The root node is specified with the XPath expression /. The children of the root node are the element node for the document element, as well as any comments or processing instructions that occur outside the document element.

sibling
Two nodes that have the same parent. XPath defines the preceding-sibling and following-sibling axes.

stylesheet
An XML document, written with the XSLT vocabulary, that specifies how an XML document should be transformed.

template
A rule in an XSLT stylesheet that defines how part of an XML document should be transformed. Templates are defined with the <xsl:template> element.

text node
A group of characters from an XML document. Text nodes are one of the seven types of nodes defined by XPath. The XPath specification states that as much text as possible must be combined into a single text node. In other words, a text node will never have a preceding or following sibling that is also a text node.

top-level element
An element whose parent is the <xsl:stylesheet> element.

unparsed entity
A resource in an XML document whose contents may or may not be text, and if text, may not be XML. Every unparsed entity has an associated XML notation. See the discussion of the unparsed-entity-uri() function in Appendix C, "XSLT and XPath Function Reference" for more details on unparsed entities.

valid document
An XML document that follows the basic rules of XML documents and additionally follows all rules of its associated document type definition or schema. See Section 1.2.2, "XML Document Rules" in Chapter 1, "Getting Started" for a complete discussion of the XML document rules; Section 1.2.2.8, "Document Type Definitions (DTDs) and XML Schemas", also in Chapter 1, "Getting Started", discusses document type definitions and schemas.

variable
An XSLT mechanism used to bind a name to a value, defined with the <xsl:variable> element. Variables are different from parameters because parameters can have default values. One significant difference between XSLT variables and variables in most other programming languages is that once an XSLT variable is initialized, its value cannot be changed. See Section 4.5, "Variables" in Chapter 4, "Branching and Control Elements" for a complete discussion of the <xsl:variable> element and how it is used.

well-formed document
An XML document that follows the basic rules of XML documents. See Section 1.2.2, "XML Document Rules" in Chapter 1, "Getting Started" for a complete discussion of those rules.

whitespace
One of four characters: space (&#x20), tab (&#x09), return (&#x0D), or linefeed (&#x0A).

XML declaration
Part of an XML document that defines the version of XML being used. Although the XML declaration looks like a processing instruction, it is not. For that reason, you cannot access the XML declaration from an XSLT stylesheet or an XPath expression.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.







??????????????@Mail.ru