Download XML.com: What Is XSLT
Transcript
Language Transformations (XSLT).
The Extensible Stylesheet Language (XSL) is a rendering vocabulary describing the semantics of formatting
information for different media.
Namespaces
We use XML namespaces to distinguish information when mixing multiple vocabularies in a single instance.
Without namespaces our processes would find the information ambiguous when identical names have been
chosen by the designers of the vocabularies we use.
Stylesheet Association
We declare our choice of an associated stylesheet for an XML instance by embedding the construct described in
the Stylesheet Association Recommendation. Recipients and applications can choose to respect or ignore this
choice, but the declaration indicates that we have tied some process (typically rendering) to our data, which
specifies how to consume or work with our information.
1.1 The XML family of Recommendations
XPath and XPointer
Locating Content in XML
Documents
By John E. Simpson
Now let's look at the objectives of these selected Recommendations.
1.1.1 Extensible Markup Language (XML)
Historically, the ways we have expressed, created, stored and transmitted our electronic information have been constrained and controlled by the
vendors we choose and the applications we run. Alternatively, we now can express our data in a structured fashion oriented around our perspective
of the nature of the information itself rather than the nature of an application's choice of how to represent our information. With Extensible Markup
Language (XML), we describe our information using embedded markup of elements, attributes and other constructs in a tree-like structure.
http://www.w3.org/TR/REC-xml
1.1.1.1 Structuring information
Contrasted to a file format where information identification relies on some proprietary hidden format, predetermined ordering, or some kind of
explicit labeling, the tree-like hierarchical storage structure infers relationships by the scope of values encompassing the scopes of other values.
Though trees shape a number of areas of XML, both logically (markup) and physically (entities such as files or other resources), they are not the only
means by which relationships are specified. For example, a quantum of information can arbitrarily point or refer to other information elsewhere
through use of unique identifiers.
Two basic objectives of representing information hierarchically are satisfied by the XML Recommendation. It provides:
an unambiguous mechanism for constraining structure in a stream of information
XML defines the concept of well-formedness. Well-formedness dictates the syntax used for markup languages within the content of an
instance of information. This is the syntax of using angle brackets ("<" and ">") and the ampersand ("&") to demarcate and identify constituent
components of information within a file, a resource or a bound data stream. Users of the Hypertext Markup Language (HTML) will recognize
the use of these characters for marking the vocabulary described by the designers of the World Wide Web in their web documents.
a language for specifying how a system can constrain the allowed logical hierarchy of information structures
XML defines the concept of validity with a syntax for a meta-markup language used to specify vocabularies. A Document Type Definition
(DTD) describes the structural schema mandating the user-defined constraints on well-formed information. The designers of HTML have
formalized their vocabulary through such a DTD, thus declaring the allowed or expected relationships between components of a hypertext
document.
There is an implicit document model for an instance of well-formed XML defined by the mere presence of nested elements found in the information.
There is no need to declare this model because the syntax rules governing well-formedness guarantee the information to be seen properly as a
hierarchy. As with all hierarchies, there are family-tree-like relationships of parent, child, and sibling constructs relative to each construct found.
Consider the following well-formed XML instance purc.xml:
01
02
03
04
05
06
07
<?xml version="1.0"?>
<purchase id="p001">
<customer db="cust123"/>
<product db="prod345">
<amount>23.45</amount>
</product>
</purchase>
Example 1-1: A well-formed XML purchase order instance.