Index: apps/xslt.tcl
==================================================================
--- apps/xslt.tcl
+++ apps/xslt.tcl
@@ -26,35 +26,39 @@
#
# Contributor(s):
#
#
# $Log$
-# Revision 1.1 2002/02/22 01:05:34 rolf
-# Initial revision
+# Revision 1.2 2002/02/26 14:05:02 rolf
+# Updated the [load ...] to the new version number 0.7
+#
+# Revision 1.1.1.1 2002/02/22 01:05:34 rolf
+# tDOM0.7test with Jochens first set of patches
#
#
#
# written by Rolf Ade
# August, 2001
#
#----------------------------------------------------------------------------
-load [file dirname [info script]]/../unix/tdom0.6.so
-source [file dirname [info script]]/../lib/tdom.tcl
+if {[catch {package require tdom} errMsg]} {
+ if {[catch {
+ load [file dirname [info script]]/../unix/tdom0.7.so
+ source [file dirname [info script]]/../lib/tdom.tcl
+ }]} {
+ puts $errMsg
+ }
+}
#----------------------------------------------------------------------------
# externalEntityRefHandler
#
#----------------------------------------------------------------------------
proc externalEntityRefHandler { base systemId publicId } {
- # puts stderr "externalEntityRefHandler:"
- # puts stderr "\tbase $base"
- # puts stderr "\tsystemId $systemId"
- # puts stderr "\tpublicId $publicId"
-
if {[regexp {^[a-zA-Z]+:/} $systemId]} {
# Seems to be not relative to the base
if {[regexp { *file://(.*)} $systemId dummy path]} {
set fd [open $path]
fconfigure $fd -translation binary
DELETED doc/INDEX.MAP
Index: doc/INDEX.MAP
==================================================================
--- doc/INDEX.MAP
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
Creates a new DOM document object with one element node with +node name docElemName. Uri gives the namespace of the +document element to create. The objVar controlls the +memory handling as explained above.
+If encodingName is not given the current global result encoding is returned. Otherwise the global result encoding is set to Index: doc/domNode.xml ================================================================== --- doc/domNode.xml +++ doc/domNode.xml @@ -293,23 +293,21 @@ Otherwise an error is generated.
This document has been reviewed by W3C Members and other interested
+parties and has been endorsed by the Director as a W3C
The list of known errors in this specification is available at
+
Comments on this specification may be sent to
The English version of this specification is the only normative
+version. However, for translations of this document, see
A list of current W3C Recommendations and other technical documents
+can be found at
This specification has been produced as part of the
This specification defines the syntax and semantics of XSLT, which +is a language for transforming XML documents into other XML +documents.
+ +XSLT is designed for use as part of XSL, which is a stylesheet +language for XML. In addition to XSLT, XSL includes an XML vocabulary +for specifying formatting. XSL specifies the styling of an XML +document by using XSLT to describe how the document is transformed +into another XML document that uses the formatting vocabulary.
+ +XSLT is also designed to be used independently of XSL. However, +XSLT is not intended as a completely general-purpose XML +transformation language. Rather it is designed primarily for the +kinds of transformations that are needed when XSLT is used as part of +XSL.
+ +This specification defines the syntax and semantics of the XSLT
+language. A transformation in the XSLT language is expressed as a
+well-formed XML document
A transformation expressed in XSLT describes rules for transforming +a source tree into a result tree. The transformation is achieved by +associating patterns with templates. A pattern is matched against +elements in the source tree. A template is instantiated to create +part of the result tree. The result tree is separate from the source +tree. The structure of the result tree can be completely different +from the structure of the source tree. In constructing the result +tree, elements from the source tree can be filtered and reordered, and +arbitrary structure can be added.
+ +A transformation expressed in XSLT is called a stylesheet. This is +because, in the case when XSLT is transforming into the XSL formatting +vocabulary, the transformation functions as a stylesheet.
+ +This document does not specify how an XSLT stylesheet is associated
+with an XML document. It is recommended that XSL processors support
+the mechanism described in
A stylesheet contains a set of template rules. A template rule has +two parts: a pattern which is matched against nodes in the source tree +and a template which can be instantiated to form part of the result +tree. This allows a stylesheet to be applicable to a wide class of +documents that have similar source tree structures.
+ +A template is instantiated for a particular source element +to create part of the result tree. A template can contain elements +that specify literal result element structure. A template can also +contain elements from the XSLT namespace +that are instructions for creating result tree +fragments. When a template is instantiated, each instruction is +executed and replaced by the result tree fragment that it creates. +Instructions can select and process descendant source elements. Processing a +descendant element creates a result tree fragment by finding the +applicable template rule and instantiating its template. Note +that elements are only processed when they have been selected by the +execution of an instruction. The result tree is constructed by +finding the template rule for the root node and instantiating +its template.
+ +In the process of finding the applicable template rule, more
+than one template rule may have a pattern that matches a given
+element. However, only one template rule will be applied. The
+method for deciding which template rule to apply is described
+in
A single template by itself has considerable power: it can create
+structures of arbitrary complexity; it can pull string values out of
+arbitrary locations in the source tree; it can generate structures
+that are repeated according to the occurrence of elements in the
+source tree. For simple transformations where the structure of the
+result tree is independent of the structure of the source tree, a
+stylesheet can often consist of only a single template, which
+functions as a template for the complete result tree. Transformations
+on XML documents that represent data are often of this kind (see
+
When a template is instantiated, it is always instantiated with
+respect to a
XSLT makes use of the expression language defined by
XSLT provides two hooks
for extending the language,
+one hook for extending the set of instruction elements used in
+templates and one hook for extending the set of functions used in
+XPath expressions. These hooks are both based on XML namespaces.
+This version of XSLT does not define a mechanism for implementing the
+hooks. See
The XSL WG intends to define such a mechanism in a future +version of this specification or in a separate +specification.
The element syntax summary notation used to describe the syntax of
+XSLT-defined elements is described in
The MIME media types text/xml
and
+application/xml
The XSLT namespace has the URI &XSLT.ns;
.
The 1999
in the URI indicates the year in which
+the URI was allocated by the W3C. It does not indicate the version of
+XSLT being used, which is specified by attributes (see
XSLT processors must use the XML namespaces mechanism
This specification uses a prefix of xsl:
for referring
+to elements in the XSLT namespace. However, XSLT stylesheets are free
+to use any prefix, provided that there is a namespace declaration that
+binds the prefix to the URI of the XSLT namespace.
An element from the XSLT namespace may have any attribute not from
+the XSLT namespace, provided that the
It is an error for an element from the XSLT namespace to have +attributes with expanded-names that have null namespace URIs +(i.e. attributes with unprefixed names) other than attributes defined +for the element in this document.
+ +The conventions used for the names of XSLT elements, +attributes and functions are that names are all lower-case, use +hyphens to separate words, and use abbreviations only if they already +appear in the syntax of a related language such as XML or +HTML.
A stylesheet is represented by an xsl:stylesheet
+element in an XML document. xsl:transform
is allowed as
+a synonym for xsl:stylesheet
.
An xsl:stylesheet
element must have a
+version
attribute, indicating the version of XSLT that
+the stylesheet requires. For this version of XSLT, the value should
+be 1.0
. When the value is not equal to 1.0
,
+forwards-compatible processing mode is enabled (see
The xsl:stylesheet
element may contain the following types
+of elements:
xsl:import
xsl:include
xsl:strip-space
xsl:preserve-space
xsl:output
xsl:key
xsl:decimal-format
xsl:namespace-alias
xsl:attribute-set
xsl:variable
xsl:param
xsl:template
xsl:stylesheet
element is called a
+
This example shows the structure of a stylesheet. Ellipses
+(...
) indicate where attribute values or content have
+been omitted. Although this example shows one of each type of allowed
+element, stylesheets may contain zero or more of each of these
+elements.
The order in which the children of the xsl:stylesheet
+element occur is not significant except for xsl:import
+elements and for error recovery. Users are free to order the elements
+as they prefer, and stylesheet creation tools need not provide control
+over the order in which the elements occur.
In addition, the xsl:stylesheet
element may contain
+any element not from the XSLT namespace, provided that the
+expanded-name of the element has a non-null namespace URI. The presence of
+such top-level elements must not change the behavior of XSLT elements
+and functions defined in this document; for example, it would not be
+permitted for such a top-level element to specify that
+xsl:apply-templates
was to use different rules to resolve
+conflicts. Thus, an XSLT processor is always free to ignore such
+top-level elements, and must ignore a top-level element without giving
+an error if it does not recognize the namespace URI. Such elements can
+provide, for example,
information used by extension elements or extension functions
+(see
information about what to do with the result tree,
information about how to obtain the source tree,
metadata about the stylesheet,
structured documentation for the stylesheet.
A simplified syntax is allowed for stylesheets that consist of only
+a single template for the root node. The stylesheet may consist of
+just a literal result element (see xsl:stylesheet
element containing a
+template rule containing the literal result element; the template rule
+has a match pattern of /
. For example
Total Amount: