See “Location path.”
See “Location path.”
See “Parent-child relationship.”
See “Axes.”
See “Axis.”
Ant is a Java-based build tool sponsored by Apache (see http://ant.apache.org). Ant is a timesaver and easy to use. See http://ant.apache.org/resources.html for a list of FAQs, articles, presentations, and books on Ant. Ant was used in this book to build the JAXP-based processor discussed in Chapter 17.
A name/value pair that modifies an element. In the attribute
specification <name type="first">
,
type
is the attribute and first
(in double quotes) is the value of the attribute. Attributes can
appear on start-tags or on empty element tags. Each attribute can
only appear once on a tag (no duplicates), and the order of
attributes is not preserved in XML processing. An attribute value
must be surrounded by matching single or double quotes. See
“Node.”
See “Axes.”
In a DTD, a declaration for a valid attribute comes in the form
<!ATTLIST date type CDATA
#IMPLIED>
, where date
is the
element name for which the attribute is declared,
type
is the name of the attribute,
CDATA
is the type of the attribute (a string), and
#IMPLIED
means that the attribute is optional; it
may also be #REQUIRED
or #FIXED
(a fixed attribute must always have its default value). In XML 1.0,
there are several types available for valid attributes such as CDATA,
ID, IDREF, IDREFS, and so forth. Attribute-list declarations can also
contain enumerations, and default values, in the form
<!ATTLIST date
day
(Monday|Wednesday|Friday)
"Monday">
, where Monday
,
Wednesday
, and Friday
,
separated by a |
(union operator implying
or) and enclosed in parentheses, make up the
enumeration and Monday
(in quotes) is the default
value. See “ID.”
See “Node.”
A named set of attributes, defined in XSLT with the top-level
attribute-set
element. An attribute set may be
reused by referencing its name in a use-attribute-
sets
attribute value on attribute-set
,
element
, or copy
instruction
elements.
In XSLT, an expression that is surrounded by braces and contained in
an attribute value. For example, the following literal result element
has an attribute value that contains an attribute value template:
<days
number="{3 +
$week}">
. days
is the element name,
number
is the attribute name, and the attribute
value template, in braces, is evaluated to 3
plus
the value of the week
variable. (See
“Variable.”) Attribute value templates
may be found in the attribute value of literal result elements and in
XSLT elements that allow them, such as in the name
attribute of the element
or
attribute
instruction elements.
Nodes in an XML document fall within one or more of 13 distinct axes
defined by the XPath data model. The axes are ancestor,
ancestor-or-self, attribute, child, descendant, descendant-or-self,
following, following-sibling, namespace, parent, preceding,
preceding-sibling, and self. Axes can be forward or reverse: the
ancestor, ancestor-or-self, preceding, and preceding-sibling axes are
reverse axes; all other axes are forward axes. Axis identifiers are
said to be in unabbreviated syntax when used with a name, name test,
or node test, and separated by the connector :
:.
Some location path examples that use the unabbreviated syntax:
child::date
,
child::days/attribute::number
,
self::node( )
.
The base URI is the internal, base location of a node, based on the
location of the source document or stylesheet. (This can also be set
explicitly with xml:base
, where supported.)
Relative URIs are relative to this base location that is set
according to the rules in Section 3.2 of the XSLT specification at
http://www.w3.org/TR/xslt/.
An XPath datatype whose value can be either true
(1
) or false (0
). Some
expressions return Boolean values, testing whether a condition is
true or false, such as an expression contained in the
test
attribute of the if
or
when
XSLT instruction elements.
In XSLT, built-in template rules match nodes without an explicit
rule. Each of the seven node types has a built-in rule that will be
instantiated in the absence of an explicit template rule in a
stylesheet. Commonly, an apply-templates
element
will trigger the built-in template rule for text nodes.
See “.NET Framework.”
Provides a way to hide character data from an XML processor so that
the processor will ignore its contents as markup. For example,
entering <![CDATA[O'Reilly &
Associates]]>
would display the ampersand
(&
). Without a CDATA section, the
&
could not properly be displayed. In XSLT,
the cdata-section-elements
attribute on the
output
element specifies a list of the names of
elements whose text node children should be output using CDATA
sections.
See “Entity.”
See “Axes.”
See “Parent-child relationship.”
Support for XSLT transformations that is embedded in the browser (the client). Late versions of IE, Mozilla, Mozilla Firebird, and Netscape all support client-side XSLT.
Comments provide a way for documenting what is in an XML or DTD
document or for hiding text or markup from the XML processor.
Anything contained in a comment is ignored by the XML processor.
Comments begin with <!
and end with
>
and cannot contain except at the end of the
comment. You can create comments in a result tree by using the
comment
instruction element in a stylesheet. The
comment node is one of seven node types in the XPath data model.
According to XPath, the node being currently processed. Compare with “Current node.”
The position of the context node within the current node list. See “Current node list.”
The number of nodes in the current node list. See “Current node list.”
The current node is the same as the context node, except when a predicate is being evaluated. This is the only time the context node (defined by XPath) and the current node (defined by XSLT) are different. When a predicate is evaluated, the node in the predicate momentarily becomes the current node. See “Context node” and “Current node list.”
A list of nodes, each one of which will in turn be the current node a processing progresses. See “Current node.”
The template rule currently being processed. See “Template rule.”
See “Namespaces.”
See “Axes.”
See “Parent-child relationship.”
See “Axes.”
The first element in an XML document, the parent of all other
elements within a given document. The html
element, for example, is the document element of an XHTML document.
The document element is also called the root
element.
An entity representing the XML document where an XML processor logically begins processing.
In XPath 2.0, the root node is called the document node.
The order in which nodes appear in the source document that is being processed by an XSLT processor.
A document type declaration in an XML document declares either a
document type definition (DTD) internally (called the internal
subset) or declares the name or location of an external document
definition (the external subset). An example of an external subset
declaration is: <!DOCTYPE
date
SYSTEM
"date.dtd">
. An example of an internal subset
declaration is: <!DOCTYPE
date
[
<!ELEMENT
date
(#PCDATA)>
]>
. Internal
and external declarations may also be combined.
A document type definition, or DTD, is a document that contains the definitions or markup declarations for XML elements, attributes, and so on. If an XML document has a DTD associated with it, an XML processor can validate the XML document against the DTD. In other words, the XML processor may be directed to check that an XML document follows the rules outlined in an associated DTD, in addition to checking for compliance with the normal rules of XML well- formedness. See “Attribute-list declaration,” “Element-type declaration,” and “Markup declaration.”
See See “Document type definition.”
The most common structure in an XML document. An element may be
empty, contain a string (parsed character data) or other elements, or
have mixed content (elements and strings mixed together). For
example, <date>2003-12-31</date>
is an
example of an element (date
) with parsed character
data as content (2003-12-31
). See
“Node.”
A node representing an element and its contents. See “Node.”
An element-type declaration refers to the markup declaration for an
element that appears in a DTD for valid XM. For example, in
<!ELEMENT date (#PCDATA)>
, an element
date
is declared to have parsed character data
content. In <!ELEMENT date
(month,day,year)>
, the element date
is declared to have one month
child element, one
day
, and one year
. An element
can also have mixed content. See “Mixed content.”
A stylesheet that is embedded in the document element of an XML
document and referenced by a fragment identifier in the
href
attribute of an XML stylesheet processing
instruction. The fragment identifier references an attribute of type
ID on the stylesheet
element of the embedded
stylesheet. Compare with
“Literal result element stylesheet.”
An element that has no content is empty; that is, it does not have
text or other content such as other elements between a start-tag and
an end-tag. An example of an empty element in XHTML is
<br />
. In XML, an empty elements tag looks
like <date
today="2003-10-03"/>
where
date
is an element and today
is
an attribute, but there is no element content in
date
.
Refers to the character set in use in an XML document, such as UTF-8
or ISO-8859-1. In XSLT, you can control encoding with the
encoding
attribute on the
output
element. See “Encoding declaration.”
Appears in an XML declaration to declare the encoding for an XML
document, in the form encoding="UTF-8
“. See
“XML declaration.”
An XML storage unit. Often, an entity structure that provides
replacement text wherever a reference is given in an XML document.
Character and general entity references begin with an ampersand
(&
) and end with a semicolon
(;
). For example, the reference to the predefined
XML entity <
stands for the less-than
(<
) sign, and wherever
<
appears in an XML document, it will be
replaced by <
when the XML document is
displayed in a browser or processed in some other way. Several
general entities are built into or predefined in XML:
<
(less-than [<
]),
>
(greater-than [>
]),
&
(ampersand [&
]),
'
(apostrophe [']),
and "
(quote ["]).
Character references provide replacement text for single characters.
General entities can replace characters or strings. Parameter
entities, delimited by a percent sign
(%
)—not an ampersand—and a semicolon,
provide a way to reuse declaration and other text in DTDs.
Entities can be internal and external. This means that an entity could be internally defined within the XML document’s DTD, or it could be defined externally in a separate file, even in a file out on the Web somewhere. Entities can also be parsed or unparsed. An unparsed entity is ignored by the XML processor and is some resource other than XML text, such as a JPEG graphic file, or even an HTML file. All other entities are considered parsed, that is, the XML processor processes them normally. See “Document entity.”
See “Entity.”
You can escape characters in XML with character entities and CDATA sections. See “Entity” and “CDATA section.”
Defined by XPath, expressions contain node names (location paths),
arithmetic, functions, and so forth, and can resolve to a node-set,
number, string, Boolean, or, as defined in XSLT, a result tree
fragment. Expressions appear only in attribute values, such as the
select
attribute of
apply-templates
or value-of
. A
pattern is a subset of an expression. See
“Location path” and “Pattern.”
See “Extension.”
XHTML is a vocabulary defined by the W3C that brings together XML and HTML. XHTML is defined by an XML DTD rather than an SGML DTD. XHTML must be well-formed XML, and must use all lowercase tag names. XHTML 1.0 became a W3C recommendation in early 2000; since then, other XHTML specs have appeared, and XHTML has been modularized. See http://www.w3.org/MarkUp/.
XML is a language that allows you to create your own markup language. It has an inherent, logical structure that you can use to label document content and data. This, in turn, makes XML an ideal language for storing interoperable data. In addition, XML is open, nonproprietary, platform independent, and license free. See http://www.w3.org/TR/REC-xml.html.
Provides a way to apply formatting to XML documents using stylesheets. It is similar to CSS but is actually written in XML, and applies specifically to XML documents, whereas CSS can apply to either HTML or XML. XSL is more extensive than CSS, and is commonly referred to as XSL-FO (FO stands for formatting objects). See http://www.w3.org/TR/xsl/.
Allows you to transform XML documents into new XML, XHTML, HTML, or text documents. An XSLT stylesheet uses templates to match patterns in a source document and then outputs a result tree that may be serialized. XSLT relies on XPath syntax to match patterns. XSLT also allows you to add new markup to a result, such as new elements, attributes, comments, and so forth, by using instruction elements. See http://www.w3.org/TR/xslt/.
You can extend XSLT by adding extension elements and functions (which
requires programming and processor support). You can also use the
extensions already provided by existing XSLT processors such as Xalan
and Saxon. One common extension function in XSLT 1.0 is the
node-set( )
function, which can coerce a result
tree fragment into a set of nodes. EXSLT is a group that is
attempting to standardize XSLT extensions for portability and
consistency (http://www.exslt.org).
See “Entity.”
In XSLT, processing may fall back in case an extension element or
function is not supported by a given processor. For extension
elements, this is performed using the fallback
element, often in combination with a message
element. You can also use the element-available( )
function to test for the availability of extension elements, or the
function-available( )
function to test for
extension functions. See “Extension.”
A fragment identifier is preceded by a #
in a URI,
as in
http://www.example.com/index.html#top. In HTML,
#top
refers to named anchor
(<a
name="top">
) in the
document index.html. An embedded stylesheet uses
a fragment identifier. See
“Embedded stylesheet” and “URI.”
See “Axes.”
See “Axes.”
Used in XPath expressions, functions perform specialized operations
and appear only in XSLT attribute values that can contain expressions
(such as select
or value-of
).
Both XPath and XSLT define functions. Examples of functions are
substring( )
(XPath) and document(
)
(XSLT).
See “Entity.”
A variable or parameter that is defined on the top level of a stylesheet and so is visible to (in scope for) the entire stylesheet. See “Local variable” and “Variable.”
An attribute type in XML 1.0. The value of an attribute of type ID is an identifier that is unique within an XML document and must not be duplicated. This associates an ID with an element. You can reference an ID from an attribute of type IDREF or multiple IDs from an attribute of type IDREFS (a whitespace-separated list of IDs). IDs must not start with a number in order to be valid XML.
The ability to import stylesheets into another stylesheet, thus
imposing rules of import precedence. Imported stylesheets are
retained in an import tree. An import
element (or
more than one) must be the first child of the
stylesheet
element. See
“Import precedence.”
Imported template rules and top-level declarations have a lower precedence than those rules and declarations that exist in an importing stylesheet. In other words, rules and declarations in the importing stylesheet have higher precedence than those in an imported stylesheet. Import precedence is established by the order in which stylesheets are imported, and, therefore, how they are stored in the import tree. See “Import.”
You can include external stylesheets in a stylesheet using the
include
element. Template rules and declarations
from the included stylesheet are mixed in with those of the including
stylesheet as if they were one stylesheet. Compare with
“Import.”
An instance is an XML document that matches a particular DTD or schema, making it an instance of that schema. It is, also, any occurrence of a given structure.
The process of writing out the content of a template (sequence constructor in XSLT 2.0) based on a successful match of the template rule.
In XSLT, an element that is contained in a template, and not the top
level. For example, element
,
attribute
, copy
,
copy-of
, and value-of
are
examples of instruction elements. Some elements, such as
variable
, may be used as instruction elements and
as top-level elements.
See “Entity.”
Sun’s Java API for XML Processing (JAXP) provides
many resources for the programmer who wants to process XML or to
write an XSLT processor (or more accurately an interface to one). The
extension packages javax.xml.transform
and
javax.xml.transform.stream
help get the job done.
See http://java.sun.com/j2se/1.4docs/api/index.html.
XSLT offers keys (a method of associating data with a name) that
improve performance and efficiency. You declare a key at the top
level of a stylesheet with a key
element, and
later you can employ the declared key with the key(
)
function.
Literal elements, attributes, text, and other items in a template that, when instantiated, produce new elements, attributes, text and so forth in a result tree. Literal result elements are subject to the rules of XML well-formedness.
A simplified stylesheet whose document element is
html
or an XML element that contains a single
template. Compare with
“Embedded Stylesheet.”
A variable or parameter that is defined locally within a template rule and is visible to (in scope for) that rule alone. See “Global variable” and “Variable.”
In XPath, a location path is an expression that identifies a node or
nodes. It may consist of one or more steps. A step in a location path
is separated by slashes. An absolute location path always begins with
a slash and evaluates to or begins at the root node. A relative
location path evaluates to or begins with the context node. An
example of an abbreviated location path with two steps is
date/month
, which locates a
date
element relative to the context node,
followed by a month
element. In unabbreviated
syntax, you use the axis specifiers with connectors like
child::date/child::month
, which gives you the same
result as the unabbreviated syntax. Following are a few more
comparisons of abbreviated and unabbreviated syntax, each pair having
the same meaning: @type
and
attribute::type
, child::*
and
*
, @*
and
attribute::*
, and self::node(
)
, and parent::date
and
/date
.
See “Location path.”
Includes element tags plus attributes, processing instructions, XML
declarations, stylesheet declarations, document type declarations,
and entity references. For example, <date>
,
</date>
, <?xml-stylesheet
href="date.xsl
" type="text/xsl"?>
,
and >
are all considered markup.
Declarations in a DTD, such as <!ELEMENT date
(#PCDATA)>
and <!ATTLIST
date
type CDATA
#IMPLIED>
, are markup declarations. See
“Attribute-list declaration” and “Element-type declaration.”
Mixed content in an XML element consists of a mixture of text and
child elements. In a DTD, it is declared <!ELEMENT date
(#PCDATA |
month | day | year)*>
. See
“Element-type declaration.”
Normally, you can’t match nodes with more than one
template rule in a stylesheet. Modes allow you to apply more than one
rule to a pattern by using the mode
attribute on
both the template
and
apply-template
elements simultaneously with
identical values. Each identical mode
attribute
value identifies a distinct mode. Modes are useful for visiting the
same pattern repeatedly, each time with a different effect.
Name characters are those ISO/IEC 10646-1 or Unicode characters that
are legal for use in XML names. These characters must match the
production NameChar in section 2.3 of the XML specification. The
legal name characters are too numerous to list here, but some common
examples include the Latin characters A-Z
,
a-z
, hyphen (-
), colon
(:), period or full-stop (.),
and underscore ( _
).
A template
element may have a
name
attribute on it. You can then use
call-template
to invoke the named template.
Calling a named template does not change the context; you can call
the named template as often as you like. Named templates may also be
invoked by matching a pattern because a template
element may have both a name
and
match
attribute.
See “Axes.”
An approach to qualifying elements and attributes so that they are unique from all other element and attribute names. You identify a namespace by associating an element with a URI (with either a URL or a URN) and optionally a prefix. A default namespace declaration associates a namespace with an element and its children without a prefix. The XML namespace specification became a W3C recommendation in 1999. It is available at http://www.w3.org/tr/REC-xml-names/. Namespace URI identify only the namespace; they do not point to the location of a schema or other resource that describes or defines the namespace. See “Node,” “NCName,” and “Qualified name (QName).”
Stands for “Not a number.” Used by
the XSLT top-level element decimal-format
.
An NCName is an XML name that does not contain a colon. The element
<date>
is an example of an element that uses
an NCName. It is sometimes called a noncolonized name. An NCName also
does not have a namespace prefix associated with it. See
“Qualified name (QName).”
Microsoft’s .NET Framework provides a programming
and web development environment that includes programming languages
such as VB.NET, ASP.NET, and C#. C# has strong support of XML and
XSLT, and a variety of APIs provide the programmer easy access to
these resources. You can write an XSLT processor (or actually an
interface to one) in just a few lines of code using C#’s
System.Xml
, System.Xml.XPath
,
and System.Xml.Xsl
namespaces. See
http://www.microsoft.com/net.
According to the XSLT 1.0 data model, a node is one of seven distinctive parts of an XML document, namely, the root node, element nodes, attribute nodes, text nodes, comment nodes, processing instruction nodes, and namespace nodes. Node comes from the Latin nodus, which is a knot in a rope.
A set of unordered nodes of possible different types that may be empty. See “Node.”
An XPath method that tests for given nodes. For example, the node
tests that are listed here, comment( )
,
node( )
, processing-instruction(
)
, and text( )
, test for nodes of a
given type (any given type in the case of node(
)
).
The serialization of XSLT output is controlled by the top-level
output
element. This element has a number of
attributes that can control the output method
(xml
, html
, or
text
), encoding, XML declaration, indentation,
CDATA sections, document type declaration, and so forth. You can have
more than one output
element in a stylesheet.
The text
and value-of
elements
have an optional attribute: disable-output-
escaping
. It can have a value of yes
or
no
(default). By default,
<
will be output escaped, that is, as
<
. If you disable output escaping with a
value of yes
, you will get <
instead. The output method should be xml
or
html
for this to work. See
“Output.”
Ox is a compact command-line documentation tool written in Java that provides quick reference material for XSLT 1.0 and XPath 1.0. It is discussed in Chapter 18.
In XSLT, you can bind a name with a default value using the
param
element. This parameter can be declared on
the top or global level (scope is the whole stylesheet) or on the
local level (scope is the template where the local parameter is
declared). You can pass parameters into a stylesheet using a
mechanism provided by an XSLT processor or into a template using the
with-param
element. See
“Variable.”
XML elements have a relationship to each other, which forms the structure of an XML document. These relationships are parent, child, ancestor, descendant, and sibling. A child element is contained in the content of its parent element. The document element, for example, is the ancestor of all other elements in a document. A descendant is a child element and can be removed by more than one generation (or level of structure). If a parent element has more than one direct child, these children are called siblings.
A path expression selects a node-set from a source document and may consist of location steps. See “Location path.”
A pattern is a subset of an XPath expression. It can contain location
paths for nodes that are along the child or attribute axes only, but
it can also contain predicates, id( )
, and
key( )
functions. The match
attribute of template
, for example, can contain a
pattern for matching nodes as part of a template rule. See
“Location path.”
See “Axes.”
See “Axes.”
A filter containing an expression enclosed in square brackets. A
predicate can be associated with nodes where either patterns or
expressions may appear. A predicate returns a Boolean. For example,
date[.='2003-12-31']
returns true if a
date
element contains the string
2003-12-31
.
A special instruction issued to an application processing XML. A
processing instruction, or PI, is always enclosed by an angle
bracket-question mark (<?
) and ended by a
question mark-angle bracket (?>
) combination. A
target name, such as xml-stylesheet
, must
immediately follow the <?
with no intervening
space. An XML stylesheet PI contains pseudoattributes such as
href
and type
, which help
associate an XML document with a stylesheet; for example,
<?xml-stylesheet
href=
"test
.xsl"
type="text/xsl"?>
. See “Node.”
Structures that appear before the document element. A prolog can include an XML declaration, a document type declaration, and processing instructions, comments, and whitespace. See “XML declaration,” “Documnt type declaration,” and “Processing instruction.”
A qualified name or QName is an XML name that is qualified with a
namespace. It may use a namespace prefix and a colon in its name. The
element xsl:element
is an example of an element
that uses a QName with a prefix. See
“Namespaces” and “NCName.”
Appearing in late 2001, RELAX NG is a simple yet elegant schema language created under the auspices of OASIS. It is easier to learn than XML Schema and has a sound theoretical basis (it is based on ideas from tree automata). You can learn more about RELAX NG at http://www.relaxng.org/. Compare with “XML Schema.”
See “Location path.”
A repetition operator in an XML 1.0 DTD or a regular expression
indicates the frequency with which an element or expression may be
repeated in an instance. These operators are: a comma
(,) for exactly one (DTDs); an asterisk
(*
) for zero or more; a plus sign
(+
) for one or more; and a question mark
(?
) for zero or one.
The result of an XSLT transformation upon an XML source document is called a result tree. A result tree may be, and usually is, serialized to the screen or to a file.
A result tree fragment is defined in the element content of the
variable
element. This fragment may contain
fragments of text or even well-formed XML. In XSLT 1.0, it can be
manipulated as a node-set using a node-set( )
extension function. In XSLT 2.0, a result tree fragment is called a
temporary tree and intrinsically is a node-set.
See “Document element.”
Refers to a way of addressing an entire document in the XPath data model. See “Node.”
See “Parent-child relationship.”
Standard Generalized Markup Language is a complex ISO/IEC standard from which XML was derived. XML is a simplified, restricted subset of SGML. HTML uses an SGML DTD.
The original XML document from which a new document or result tree is derived. See “Extensible Stylesheet Language Transformations (XSLT).”
See “XML declaration.”
See “Template rule.”
See “Template rule.”
Consists of a matching pattern and template or sequence constructor
(XSLT 2.0 term). When a template rule matches a pattern, its sequence
constructor—the body of the template instructions—is
instantiated, or written out. Some XSLT elements can contain
templates but not template rules. For example, the element
instruction can contain a template but does not match a pattern.
Template rules have a built-in priority scheme that can be explicitly
controlled using the priority
attribute on
template
.
See “Result tree fragment.”
A text declaration occurs in an external parsed entity and allows you
to declare the encoding for the entity. It is similar to the XML
declaration but it does not require version information. An example
of a text declaration is <?xml
encoding= "UTF-8"?>
.
See “Node.”
In XSLT, a top-level element is a child of the
stylesheet
element and usually provides
declarations that are global for the entire stylesheet.
attribute-set
, variable
, and
template
are a few top-level elements.
An XML document has a tree structure. Starting from the document element (imagine it as the trunk of a tree), its branches grow out in the form of elements and other nodes. An XSLT processor analyzes and organizes its input and output into a tree structure. See “Source tree,” “Result tree,” and “Parent-child relationship.”
See “Location path.”
An international standard of character definitions that, in concert with ISO/IEC 10646-1, attempts to codify all the writing systems of all languages in the world. See http://www.unicode.org.
See “Entity.”
An acronym for Uniform Resource Identifier, a naming scheme for
identifying resources on the Internet. The term URI encompasses the
subset terms Uniform Resource Locator (URL) and Uniform Resource Name
(URN). A URL is a representation of a resource that indicates where
the resource is located on a network. A URN is a name that must
remain globally unique and must persist. For example,
urn:wyeast-net:date
is a valid URN. For complete
details on URIs, see http://www.ietf.org/rfc/rfc2396.txt.
See “URL.”
See “URL.”
XML is considered valid when it has an associated document type definition (DTD) or other schema. With a DTD in tow, an XML processor can validate elements, attributes, and so forth against the DTD or schema, insuring that the XML document is going by the rules. Compare “Well-formed XML.” See “Document type declaration” and “Document type definition.”
A name bound to a value. Generally refers to variables declared by
the variable
and param
elements. You refer to a variable with a variable reference that
consists of the variable name preceded by a
$
—for example, $date
. A
value defined with variable
cannot change, but the
value of a variable defined with param
is a
default value that can change. Variables can be empty. See
“Parameter.”
See “XML Declaration.”
An XML vocabulary is a collection of XML elements and attributes. For example, one such vocabulary is MathML, an XML-based markup language that allows you to render mathematical symbols and equations. See http://www.w3.org/Math
See “World Wide Web Consortium (W3C).”
Follows the general rules of XML but is not necessarily valid according to a document type definition (DTD) or some other schema. Some of those general rules include always opening an XML element with a start-tag and closing it with an end-tag, placing attributes in matching quotation marks, making sure that tags use uppercase and lowercase identically, and so forth.
Established in 1994, the World Wide Web Consortium (http://www.w3.org) is an international body headed by the inventor of the World Wide Web, Tim Berners-Lee. W3C forms committees of interested parties—companies and individuals—that jointly develop specifications and recommendations for the web engineering community at large. While not without controversy or detractors, the recommendations of W3C are highly regarded by industry; however, although the W3C produces recommendations, it does not claim to be a national and international standards organizations.
See “Extensible Markup Language (XML).”
When included, the XML declaration is the first line of an XML
document, and is part of the prolog (see
“Prolog”). An example of an XML
declaration is as follows: <?xml
version="1.0
" encoding="UTF-8"
standalone="yes"?>
. The version information indicates
the XML specification version number; the encoding declaration
indicates the type, such as UTF-8; a standalone declaration indicates
the presence of references to external definition documents, such as
a DTD (see “Document type definition”) or other
external entity.
See “Namespaces.”
Every application that looks at XML documents must have an accompanying program called the XML processor. This processor picks apart the XML document to make sure its contents are well-formed, and when a DTD is present, it may also check for validity. If the XML document is not well-formed, the XML processor must generate a fatal error and stop processing the document, though it can continue to look for other fatal errors in the document and report them. If a processor finds a validity error in a valid XML document, it must report that error, but it need not stop processing.
A W3C recommendation that provides a grammar for addressing parts of
an XML document. For example, the location path
child::*
selects all the children of an element.
XPath was designed for use with XSLT and XPointer, which addresses
the inner structure of an XML document. The XPath 1.0 recommendation
is available at http://www.w3.org/TR/xpath.
An XML vocabulary for defining XML documents. It is more powerful than the DTD because of its richer datatypes and more straightforward XML syntax, among other things. The XML Schema specs are: http://www.w3.org/TR/xmlschema-0/ http://www.w3.org/TR/xmlschema-1/ http://www.w3.org/TR/xmlschema-2/ .
See “Processing instruction.”
See “XML Path Language (XPath).”
See See “Extensible Stylesheet Language. (XSL)”
See “Exensible Stylesheet Language Transformations (XSLT).”
A processor that transforms XML documents according to the rules outlined in the XSLT specification. Xalan C++ and Instant Saxon are examples of command- line XSLT processors. xmlspy and xRay2 are graphical XML editors with XSLT processing capability. See the appendix.
See “Extensible Hypertext Markup Language.”
3.138.37.20