Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Regenerated included doc.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | prepare-release
Files: files | file ages | folders
SHA3-256: e54a5f4ff4a9aeb63e93429a57bd019baac02dea85b4ced17f98b793fc30396d
User & Date: rolf 2024-07-04 01:56:51
Context
2024-07-04
13:31
More version number updates. check-in: b1097ab086 user: rolf tags: prepare-release
01:56
Regenerated included doc. check-in: e54a5f4ff4 user: rolf tags: prepare-release
01:33
Merged from trunk. check-in: 9ead70b249 user: rolf tags: prepare-release
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/dom.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: dom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x55e7844b14c0">NAME</a> · <a href="#SECTid0x55e7844e4580">SYNOPSIS</a> · <a href="#SECTid0x55e784589850">DESCRIPTION </a> · <a href="#SECTid0x55e7845f3c00">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x55e7844b14c0">NAME</a></h2><p class="namesection">
<b class="names">dom - </b><br>Create an in-memory DOM tree from XML</p>
  
  <h2><a name="SECTid0x55e7844e4580">SYNOPSIS</a></h2><pre class="syntax">package require tdom

<b class="cmd">dom</b> <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>

  <h2><a name="SECTid0x55e784589850">DESCRIPTION </a></h2><p>This command provides the creation of DOM trees in memory. In
the usual case a string containing a XML information is parsed and converted
into a DOM tree. Other possible parse input may be HTML or JSON.
The <i class="m">method</i> indicates a specific subcommand. </p><p>The valid methods are:</p><dl class="commandlist">
        
          <dt>
<b class="cmd">dom</b> <b class="method">parse</b> ?<i class="m">options</i>? ?<i class="m">data</i>?</dt>
          <dd>Parses the XML information and builds up the DOM tree in memory






|


|


|



|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: dom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5607ea0eccd0">NAME</a> · <a href="#SECTid0x5607ea120250">SYNOPSIS</a> · <a href="#SECTid0x5607ea120850">DESCRIPTION </a> · <a href="#SECTid0x5607ea09d0c0">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x5607ea0eccd0">NAME</a></h2><p class="namesection">
<b class="names">dom - </b><br>Create an in-memory DOM tree from XML</p>
  
  <h2><a name="SECTid0x5607ea120250">SYNOPSIS</a></h2><pre class="syntax">package require tdom

<b class="cmd">dom</b> <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>

  <h2><a name="SECTid0x5607ea120850">DESCRIPTION </a></h2><p>This command provides the creation of DOM trees in memory. In
the usual case a string containing a XML information is parsed and converted
into a DOM tree. Other possible parse input may be HTML or JSON.
The <i class="m">method</i> indicates a specific subcommand. </p><p>The valid methods are:</p><dl class="commandlist">
        
          <dt>
<b class="cmd">dom</b> <b class="method">parse</b> ?<i class="m">options</i>? ?<i class="m">data</i>?</dt>
          <dd>Parses the XML information and builds up the DOM tree in memory
80
81
82
83
84
85
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
101
102


103
104
105
106
107
108
109
                with the HTML input data top level elements as
                children.</dd>
              

              
                <dt><b>-html5</b></dt>
                <dd>This option is only available if tDOM was build
                with --enable-html5. Try the <i class="m">featureinfo</i> method
                if you need to know if this feature is build in. If
                <i class="m">-html5</i> is specified, the gumbo lib html5 parser
                (https://github.com/google/gumbo-parser) is used to
                build the DOM tree. This is, as far as it goes, XML
                namespace-aware. Since this probably isn't wanted by a

                lot of users and adds only burden for no good in a lot
                of use cases <i class="m">-html5</i> can be combined with
                <i class="m">-ignorexmlns</i>, in which case all nodes and
                attributes in the DOM tree are not in an XML
                namespace. All tag and attribute names in the DOM tree
                will be lower case, even for foreign elements not in
                the xhtml, svg or mathml namespace. The DOM tree may
                include nodes, that the parser inserted because they
                are implied by the context (as &lt;head&gt;,
                &lt;tbody&gt;, etc.).</dd>


              

              
                <dt><b>-json</b></dt>
                <dd>If <i class="m">-json</i> is specified, the <i class="m">data</i> is
                expected to be a valid JSON string (according to RFC
                7159). The command returns an ordinary DOM document







|




|
>
|
|
|
|
|
|
|
|
|
|
>
>







80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
                with the HTML input data top level elements as
                children.</dd>
              

              
                <dt><b>-html5</b></dt>
                <dd>This option is only available if tDOM was build
                with --enable-html5. Use the <i class="m">featureinfo</i> method
                if you need to know if this feature is build in. If
                <i class="m">-html5</i> is specified, the gumbo lib html5 parser
                (https://github.com/google/gumbo-parser) is used to
                build the DOM tree. This is, as far as it goes, XML
                namespace-aware (which means for example that all HTML
                elements are in the html5 namespace). Since this
                probably isn't wanted by a lot of users and adds only
                burden for no good in a lot of use cases <i class="m">-html5</i>
                can be combined with <i class="m">-ignorexmlns</i>, in which
                case all nodes and attributes in the DOM tree are not
                in an XML namespace. All tag and attribute names in
                the DOM tree will be lower case, even for foreign
                elements not in the xhtml, svg or mathml namespace.
                The DOM tree may include nodes, that the parser
                inserted because they are implied by the context (as
                &lt;head&gt;, &lt;tbody&gt;, etc.). Input longer than
                4 GByte byte length is not supported by the underlying
                gumbo parser. </dd>
              

              
                <dt><b>-json</b></dt>
                <dd>If <i class="m">-json</i> is specified, the <i class="m">data</i> is
                expected to be a valid JSON string (according to RFC
                7159). The command returns an ordinary DOM document
636
637
638
639
640
641
642











643
644
645
646


647
648
649
650
651
652
653
          <dd>Returns 1 if every character in <i class="m">string</i> is
a valid XML Char according to production 2 of the <a href="http://www.w3.org/TR/2000/REC-xml-20001006.html">XML 1.0</a>
recommendation. Otherwise it returns 0.</dd>
        

        
          <dt>











<b class="cmd">dom</b> <b class="method">clearString</b> <i class="m">string</i>
</dt>
          <dd>Returns the string given as argument cleared out from any characters not
          allowed as XML parsed character data.</dd>


        
        
        
          <dt>
<b class="cmd">dom</b> <b class="method">isBMPCharData</b>
<i class="m">string</i>
</dt>







>
>
>
>
>
>
>
>
>
>
>
|

|
|
>
>







639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
          <dd>Returns 1 if every character in <i class="m">string</i> is
a valid XML Char according to production 2 of the <a href="http://www.w3.org/TR/2000/REC-xml-20001006.html">XML 1.0</a>
recommendation. Otherwise it returns 0.</dd>
        

        
          <dt>
<b class="cmd">dom</b> <b class="method">isHTML5CustomName</b> <i class="m">string</i>
</dt>
          <dd>Returns 1 if <i class="m">string</i> is a HTML5 valid custom
          element name (according to
          https://html.spec.whatwg.org/#valid-custom-element-name at
          26 June 2024, it's a living standard). Otherwise it returns
          0.</dd>
        
        
        
          <dt>
<b class="cmd">dom</b> <b class="method">clearString</b> ?<i class="m">-replace</i>? <i class="m">string</i>
</dt>
          <dd>Returns the string given as argument cleared out from
          any characters not allowed as XML parsed character data. If
          the <i class="m">-replace</i> option is given then instead of removing
          such characters are replaced with \uFFFD.</dd>
        
        
        
          <dt>
<b class="cmd">dom</b> <b class="method">isBMPCharData</b>
<i class="m">string</i>
</dt>
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
                    are build in.</dd>
                
            </dl>
            </dd>   
        
    </dl>

<h2><a name="SECTid0x55e7845f3c00">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-document">document</a>, <a class="keyword" href="keyword-index.html#KW-node">node</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
</p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>







|







783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
                    are build in.</dd>
                
            </dl>
            </dd>   
        
    </dl>

<h2><a name="SECTid0x5607ea09d0c0">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-document">document</a>, <a class="keyword" href="keyword-index.html#KW-node">node</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
</p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>

Changes to doc/dom.n.

245
246
247
248
249
250
251
252
253
254
255
256
257

258
259
260
261
262
263
264
265
266
267


268
269
270
271
272
273
274
does not have a single root element (as it was legal
up to HTML 4.01) and the -forest option is not used
then a html node will be inserted as document element,
with the HTML input data top level elements as
children.
.IP "\fB-html5\fR"
This option is only available if tDOM was build
with --enable-html5. Try the \fIfeatureinfo\fR method
if you need to know if this feature is build in. If
\&\fI-html5\fR is specified, the gumbo lib html5 parser
(https://github.com/google/gumbo-parser) is used to
build the DOM tree. This is, as far as it goes, XML
namespace-aware. Since this probably isn't wanted by a

lot of users and adds only burden for no good in a lot
of use cases \fI-html5\fR can be combined with
\&\fI-ignorexmlns\fR, in which case all nodes and
attributes in the DOM tree are not in an XML
namespace. All tag and attribute names in the DOM tree
will be lower case, even for foreign elements not in
the xhtml, svg or mathml namespace. The DOM tree may
include nodes, that the parser inserted because they
are implied by the context (as <head>,
<tbody>, etc.).


.IP "\fB-json\fR"
If \fI-json\fR is specified, the \fIdata\fR is
expected to be a valid JSON string (according to RFC
7159). The command returns an ordinary DOM document
with nesting token inside the JSON data translated
into tree hierarchy. If a JSON array value is itself
an object or array then container element nodes named







|




|
>
|
|
|
|
|
|
|
|
|
|
>
>







245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
does not have a single root element (as it was legal
up to HTML 4.01) and the -forest option is not used
then a html node will be inserted as document element,
with the HTML input data top level elements as
children.
.IP "\fB-html5\fR"
This option is only available if tDOM was build
with --enable-html5. Use the \fIfeatureinfo\fR method
if you need to know if this feature is build in. If
\&\fI-html5\fR is specified, the gumbo lib html5 parser
(https://github.com/google/gumbo-parser) is used to
build the DOM tree. This is, as far as it goes, XML
namespace-aware (which means for example that all HTML
elements are in the html5 namespace). Since this
probably isn't wanted by a lot of users and adds only
burden for no good in a lot of use cases \fI-html5\fR
can be combined with \fI-ignorexmlns\fR, in which
case all nodes and attributes in the DOM tree are not
in an XML namespace. All tag and attribute names in
the DOM tree will be lower case, even for foreign
elements not in the xhtml, svg or mathml namespace.
The DOM tree may include nodes, that the parser
inserted because they are implied by the context (as
<head>, <tbody>, etc.). Input longer than
4 GByte byte length is not supported by the underlying
gumbo parser.
.IP "\fB-json\fR"
If \fI-json\fR is specified, the \fIdata\fR is
expected to be a valid JSON string (according to RFC
7159). The command returns an ordinary DOM document
with nesting token inside the JSON data translated
into tree hierarchy. If a JSON array value is itself
an object or array then container element nodes named
691
692
693
694
695
696
697







698
699
700


701
702
703
704
705
706
707
0.
.TP
\&\fB\fBdom\fP \fBisCharData\fP \fIstring\fB
\&\fRReturns 1 if every character in \fIstring\fR is
a valid XML Char according to production 2 of the XML 1.0
recommendation. Otherwise it returns 0.
.TP







\&\fB\fBdom\fP \fBclearString\fP \fIstring\fB
\&\fRReturns the string given as argument cleared out from any characters not
allowed as XML parsed character data.


.TP
\&\fB\fBdom\fP \fBisBMPCharData\fP \fIstring\fB
\&\fRReturns 1 if every character in \fIstring\fR is
a valid XML Char with a Unicode code point within the Basic
Multilingual Plane (that means, that every character within the string
is at most 3 bytes long). Otherwise it returns 0.
.TP







>
>
>
>
>
>
>
|
|
|
>
>







694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
0.
.TP
\&\fB\fBdom\fP \fBisCharData\fP \fIstring\fB
\&\fRReturns 1 if every character in \fIstring\fR is
a valid XML Char according to production 2 of the XML 1.0
recommendation. Otherwise it returns 0.
.TP
\&\fB\fBdom\fP \fBisHTML5CustomName\fP \fIstring\fB
\&\fRReturns 1 if \fIstring\fR is a HTML5 valid custom
element name (according to
https://html.spec.whatwg.org/#valid-custom-element-name at
26 June 2024, it's a living standard). Otherwise it returns
0.
.TP
\&\fB\fBdom\fP \fBclearString\fP ?\fI-replace\fB? \fIstring\fB
\&\fRReturns the string given as argument cleared out from
any characters not allowed as XML parsed character data. If
the \fI-replace\fR option is given then instead of removing
such characters are replaced with \euFFFD.
.TP
\&\fB\fBdom\fP \fBisBMPCharData\fP \fIstring\fB
\&\fRReturns 1 if every character in \fIstring\fR is
a valid XML Char with a Unicode code point within the Basic
Multilingual Plane (that means, that every character within the string
is at most 3 bytes long). Otherwise it returns 0.
.TP

Changes to doc/domDoc.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domDoc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5600ef5274c0">NAME</a> · <a href="#SECTid0x5600ef5626b0">SYNOPSIS</a> · <a href="#SECTid0x5600ef632eb0">DESCRIPTION </a> · <a href="#SECTid0x5600ef6988f0">SEE ALSO</a> · <a href="#SECTid0x5600ef698c80">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x5600ef5274c0">NAME</a></h2><p class="namesection">
<b class="names">domDoc - </b><br>Manipulates an instance of a DOM document object</p>
  
  <h2><a name="SECTid0x5600ef5626b0">SYNOPSIS</a></h2><pre class="syntax">domDocObjCmd <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>

  <h2><a name="SECTid0x5600ef632eb0">DESCRIPTION </a></h2><p>This command manipulates one particular instance of a document
object. <i class="m">method</i> indicates a specific method of the document class. These
methods should closely conform to the W3C recommendation "Document Object Model
(Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>). Look
at these documents for a deeper understanding of the functionality.</p><p>The valid methods are:</p><dl class="commandlist">
        
          <dt>
<b class="method">documentElement</b> ?<i class="m">objVar</i>?</dt>






|


|


|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domDoc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5607e9f8b4c0">NAME</a> · <a href="#SECTid0x5607e9fc6650">SYNOPSIS</a> · <a href="#SECTid0x5607ea096eb0">DESCRIPTION </a> · <a href="#SECTid0x5607ea0f8b90">SEE ALSO</a> · <a href="#SECTid0x5607ea0f8f20">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x5607e9f8b4c0">NAME</a></h2><p class="namesection">
<b class="names">domDoc - </b><br>Manipulates an instance of a DOM document object</p>
  
  <h2><a name="SECTid0x5607e9fc6650">SYNOPSIS</a></h2><pre class="syntax">domDocObjCmd <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>

  <h2><a name="SECTid0x5607ea096eb0">DESCRIPTION </a></h2><p>This command manipulates one particular instance of a document
object. <i class="m">method</i> indicates a specific method of the document class. These
methods should closely conform to the W3C recommendation "Document Object Model
(Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>). Look
at these documents for a deeper understanding of the functionality.</p><p>The valid methods are:</p><dl class="commandlist">
        
          <dt>
<b class="method">documentElement</b> ?<i class="m">objVar</i>?</dt>
231
232
233
234
235
236
237
238
239
240









241
242
243
244
245
246
247
        output directly to the given channelId.</p>

        <p>If the option <i class="m">-escapeNonASCII</i> is given, every non 7
        bit ASCII character in attribute values or element PCDATA
        content will be escaped as character reference in decimal
        representation.</p>
        
        <p>If the option <i class="m">-htmlEntities</i> is given, a character is
        written using its HTML 4.01 character entity reference, if it
        has one.</p>










        <p>If the option <i class="m">-breakLines</i> is given the serialization
        outputs "\n&gt;" instead of "&gt;" for the opening tags of
        elements.</p>

        <p>If the option <i class="m">-onlyContents</i> is given only all child
        nodes are serialized. This option is ignored by document







|
|
|
>
>
>
>
>
>
>
>
>







231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
        output directly to the given channelId.</p>

        <p>If the option <i class="m">-escapeNonASCII</i> is given, every non 7
        bit ASCII character in attribute values or element PCDATA
        content will be escaped as character reference in decimal
        representation.</p>
        
        <p>If the option <i class="m">-htmlEntities</i> is given, a character or
        a pair of characters is written using its HTML 5 character
        entity reference, if it has one. Some HTML 5 character entity
        references encode the same character or code points. From the
        possible entity names the shortest is choosen. If there are
        more than one shortest name and this names differ only in case
        then the lowercase alternative is choosen. Otherwise frist
        name in lexical ASCII order is choosen. There is one HTML5
        entitiy (ThickSpace), which escapes two characters for which
        the first and the second character have an entity name by
        itself. If the two characters are to be serialized then the
        one two-characters entity ThickSpace will be choosen.</p>

        <p>If the option <i class="m">-breakLines</i> is given the serialization
        outputs "\n&gt;" instead of "&gt;" for the opening tags of
        elements.</p>

        <p>If the option <i class="m">-onlyContents</i> is given only all child
        nodes are serialized. This option is ignored by document
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726

  </dl><p>Otherwise, if an unknown method name is given, the command with the
same name as the given method within the namespace <tt class="samp">::dom::domDoc</tt> is
tried to be executed. This allows quick method additions on Tcl level.</p><p>Newly created nodes are appended to a hidden fragment list. If they
are not moved into the tree they are automatically deleted as soon as the whole
document gets deleted.</p>

    <h2><a name="SECTid0x5600ef6988f0">SEE ALSO</a></h2><p class="seealso">dom, domNode</p>

    <h2><a name="SECTid0x5600ef698c80">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-DOMnodecreation">DOM node creation</a>, <a class="keyword" href="keyword-index.html#KW-documentelement">document element</a>
</p>

</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>







|

|








718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735

  </dl><p>Otherwise, if an unknown method name is given, the command with the
same name as the given method within the namespace <tt class="samp">::dom::domDoc</tt> is
tried to be executed. This allows quick method additions on Tcl level.</p><p>Newly created nodes are appended to a hidden fragment list. If they
are not moved into the tree they are automatically deleted as soon as the whole
document gets deleted.</p>

    <h2><a name="SECTid0x5607ea0f8b90">SEE ALSO</a></h2><p class="seealso">dom, domNode</p>

    <h2><a name="SECTid0x5607ea0f8f20">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-DOMnodecreation">DOM node creation</a>, <a class="keyword" href="keyword-index.html#KW-documentelement">document element</a>
</p>

</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>

Changes to doc/domDoc.n.

349
350
351
352
353
354
355
356
357
358









359
360
361
362
363
364
365
output directly to the given channelId.
.PP
If the option \fI-escapeNonASCII\fR is given, every non 7
bit ASCII character in attribute values or element PCDATA
content will be escaped as character reference in decimal
representation.
.PP
If the option \fI-htmlEntities\fR is given, a character is
written using its HTML 4.01 character entity reference, if it
has one.









.PP
If the option \fI-breakLines\fR is given the serialization
outputs "\en>" instead of ">" for the opening tags of
elements.
.PP
If the option \fI-onlyContents\fR is given only all child
nodes are serialized. This option is ignored by document







|
|
|
>
>
>
>
>
>
>
>
>







349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
output directly to the given channelId.
.PP
If the option \fI-escapeNonASCII\fR is given, every non 7
bit ASCII character in attribute values or element PCDATA
content will be escaped as character reference in decimal
representation.
.PP
If the option \fI-htmlEntities\fR is given, a character or
a pair of characters is written using its HTML 5 character
entity reference, if it has one. Some HTML 5 character entity
references encode the same character or code points. From the
possible entity names the shortest is choosen. If there are
more than one shortest name and this names differ only in case
then the lowercase alternative is choosen. Otherwise frist
name in lexical ASCII order is choosen. There is one HTML5
entitiy (ThickSpace), which escapes two characters for which
the first and the second character have an entity name by
itself. If the two characters are to be serialized then the
one two-characters entity ThickSpace will be choosen.
.PP
If the option \fI-breakLines\fR is given the serialization
outputs "\en>" instead of ">" for the opening tags of
elements.
.PP
If the option \fI-onlyContents\fR is given only all child
nodes are serialized. This option is ignored by document

Changes to doc/domNode.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domNode</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5600ef6980f0">NAME</a> · <a href="#SECTid0x5600ef6b4050">SYNOPSIS</a> · <a href="#SECTid0x5600ef6b44d0"> DESCRIPTION </a> · <a href="#SECTid0x5600ef63b1c0">SEE ALSO</a> · <a href="#SECTid0x5600ef63b550">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x5600ef6980f0">NAME</a></h2><p class="namesection">
<b class="names">domNode - </b><br>Manipulates an instance of a DOM node object</p>



  <h2><a name="SECTid0x5600ef6b4050">SYNOPSIS</a></h2><pre class="syntax"> $nodeObject <i class="m">method</i>  <i class="m">arg arg ...</i>
</pre>
  <h2><a name="SECTid0x5600ef6b44d0"> DESCRIPTION </a></h2><p>This command manipulates one particular instance of a DOM node object.
<i class="m">method</i> indicates a specific method of the node class. These methods
should closely conform to the W3C recommendation "Document Object Model
(Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>)
as well to parts of the W3C draft "XML Pointer Language (XPointer)"
(<a href="http://www.w3.org/TR/1998/WD-xptr-19980303">http://www.w3.org/TR/1998/WD-xptr-19980303</a>).
Please note, that the XPointer methods are deprecated. Use DOM methods
or XPath expressions instead of them.</p><p>The selectNodes method implements the "XML Path






|


|




|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domNode</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5607ea0f83c0">NAME</a> · <a href="#SECTid0x5607ea0eaec0">SYNOPSIS</a> · <a href="#SECTid0x5607ea11fc60"> DESCRIPTION </a> · <a href="#SECTid0x5607ea104e80">SEE ALSO</a> · <a href="#SECTid0x5607ea105210">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x5607ea0f83c0">NAME</a></h2><p class="namesection">
<b class="names">domNode - </b><br>Manipulates an instance of a DOM node object</p>



  <h2><a name="SECTid0x5607ea0eaec0">SYNOPSIS</a></h2><pre class="syntax"> $nodeObject <i class="m">method</i>  <i class="m">arg arg ...</i>
</pre>
  <h2><a name="SECTid0x5607ea11fc60"> DESCRIPTION </a></h2><p>This command manipulates one particular instance of a DOM node object.
<i class="m">method</i> indicates a specific method of the node class. These methods
should closely conform to the W3C recommendation "Document Object Model
(Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>)
as well to parts of the W3C draft "XML Pointer Language (XPointer)"
(<a href="http://www.w3.org/TR/1998/WD-xptr-19980303">http://www.w3.org/TR/1998/WD-xptr-19980303</a>).
Please note, that the XPointer methods are deprecated. Use DOM methods
or XPath expressions instead of them.</p><p>The selectNodes method implements the "XML Path
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
      

    </dl><p>Otherwise, if an unknown method name is given, the command with the same
name as the given method within the namespace <tt class="l">::dom::domNode</tt> is tried to
be executed. This allows quick method additions on Tcl level.</p>


  <h2><a name="SECTid0x5600ef63b1c0">SEE ALSO</a></h2><p class="seealso">dom, domDoc</p>
  
  <h2><a name="SECTid0x5600ef63b550">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-document">document</a>, <a class="keyword" href="keyword-index.html#KW-node">node</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
</p>
  
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>







|

|








750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
      

    </dl><p>Otherwise, if an unknown method name is given, the command with the same
name as the given method within the namespace <tt class="l">::dom::domNode</tt> is tried to
be executed. This allows quick method additions on Tcl level.</p>


  <h2><a name="SECTid0x5607ea104e80">SEE ALSO</a></h2><p class="seealso">dom, domDoc</p>
  
  <h2><a name="SECTid0x5607ea105210">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-document">document</a>, <a class="keyword" href="keyword-index.html#KW-node">node</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
</p>
  
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>

Changes to doc/expat.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expat</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x562e3ec86820">NAME</a> · <a href="#SECTid0x562e3ec6eb80">SYNOPSIS</a> · <a href="#SECTid0x562e3ec8ba20">DESCRIPTION</a> · <a href="#SECTid0x562e3eb54340">COMMAND OPTIONS</a> · <a href="#SECTid0x562e3ec7f930"> COMMAND METHODS </a> · <a href="#SECTid0x562e3eca68a0">Callback Command Return Codes</a> · <a href="#SECTid0x562e3ecd80c0">SEE ALSO</a> · <a href="#SECTid0x562e3ecd8480">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
    <h2><a name="SECTid0x562e3ec86820">NAME</a></h2><p class="namesection">
<b class="names">expat - </b><br>Creates an instance of an expat parser object</p>



    <h2><a name="SECTid0x562e3ec6eb80">SYNOPSIS</a></h2><pre class="syntax">package require tdom

<b class="cmd">expat</b> ?<i class="m">parsername</i>? ?<i class="m">-namespace</i>? ?<i class="m">arg arg ..</i>

<b class="cmd">xml::parser</b> ?<i class="m">parsername</i>? ?<i class="m">-namespace</i>? ?<i class="m">arg arg ..</i>
</pre>
    <h2><a name="SECTid0x562e3ec8ba20">DESCRIPTION</a></h2><p>The parser created with <i class="m">expat</i> or <i class="m">xml::parser</i>
(which is just another name for the same command in an own namespace) are able
to parse any kind of well-formed XML. The parsers are stream oriented XML
parser. This means that you register handler scripts with the parser prior to
starting the parse. These handler scripts are called when the parser discovers
the associated structures in the document being parsed.  A start tag is an
example of the kind of structures for which you may register a handler
script.</p><p>The parsers always check for XML well-formedness of the input (and
report error, if the input isn't well-formed). They parse the internal
DTD and, at request, external DTD and external entities, if you
resolve the identifier of the external entities with the
-externalentitycommand script (see there). If you use the -validateCmd
option (see there), the input is additionally validated.</p><p>Additionly, the Tcl extension code that implements this command provides an
API for adding C level coded handlers. Up to now, there exists the parser
extension command "tdom". The handler set installed by this extension build an
in memory "tDOM" DOM tree, while the parser is parsing the input.</p><p>It is possible to register an arbitrary amount of different handler scripts
and C level handlers for most of the events. If the event occurs, they are
called in turn.</p>

    <h2><a name="SECTid0x562e3eb54340">COMMAND OPTIONS</a></h2><dl class="optlist">
        
          <dt><b>-namespace</b></dt>

          <dd>
<p>Enables namespace parsing. You must use this option while
creating the parser with the <tt class="samp">expat</tt> or <tt class="samp">xml::parser</tt>
command. You can't enable (nor disable) namespace parsing with






|


|




|





|


















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expat</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5607ea0e6b50">NAME</a> · <a href="#SECTid0x5607ea113710">SYNOPSIS</a> · <a href="#SECTid0x5607ea096f40">DESCRIPTION</a> · <a href="#SECTid0x5607ea0f5a00">COMMAND OPTIONS</a> · <a href="#SECTid0x5607ea11dac0"> COMMAND METHODS </a> · <a href="#SECTid0x5607e9fa88b0">Callback Command Return Codes</a> · <a href="#SECTid0x5607e9fa90b0">SEE ALSO</a> · <a href="#SECTid0x5607e9fa9470">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
    <h2><a name="SECTid0x5607ea0e6b50">NAME</a></h2><p class="namesection">
<b class="names">expat - </b><br>Creates an instance of an expat parser object</p>



    <h2><a name="SECTid0x5607ea113710">SYNOPSIS</a></h2><pre class="syntax">package require tdom

<b class="cmd">expat</b> ?<i class="m">parsername</i>? ?<i class="m">-namespace</i>? ?<i class="m">arg arg ..</i>

<b class="cmd">xml::parser</b> ?<i class="m">parsername</i>? ?<i class="m">-namespace</i>? ?<i class="m">arg arg ..</i>
</pre>
    <h2><a name="SECTid0x5607ea096f40">DESCRIPTION</a></h2><p>The parser created with <i class="m">expat</i> or <i class="m">xml::parser</i>
(which is just another name for the same command in an own namespace) are able
to parse any kind of well-formed XML. The parsers are stream oriented XML
parser. This means that you register handler scripts with the parser prior to
starting the parse. These handler scripts are called when the parser discovers
the associated structures in the document being parsed.  A start tag is an
example of the kind of structures for which you may register a handler
script.</p><p>The parsers always check for XML well-formedness of the input (and
report error, if the input isn't well-formed). They parse the internal
DTD and, at request, external DTD and external entities, if you
resolve the identifier of the external entities with the
-externalentitycommand script (see there). If you use the -validateCmd
option (see there), the input is additionally validated.</p><p>Additionly, the Tcl extension code that implements this command provides an
API for adding C level coded handlers. Up to now, there exists the parser
extension command "tdom". The handler set installed by this extension build an
in memory "tDOM" DOM tree, while the parser is parsing the input.</p><p>It is possible to register an arbitrary amount of different handler scripts
and C level handlers for most of the events. If the event occurs, they are
called in turn.</p>

    <h2><a name="SECTid0x5607ea0f5a00">COMMAND OPTIONS</a></h2><dl class="optlist">
        
          <dt><b>-namespace</b></dt>

          <dd>
<p>Enables namespace parsing. You must use this option while
creating the parser with the <tt class="samp">expat</tt> or <tt class="samp">xml::parser</tt>
command. You can't enable (nor disable) namespace parsing with
109
110
111
112
113
114
115



























116
117
118
119
120
121
122
</dt>
          

          <dd><p>Reports the base url of the document to the
parser.</p></dd>
        




























        
          <dt>
<b>-elementstartcommand</b> <i>script</i>
</dt>
          

          <dd>







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
</dt>
          

          <dd><p>Reports the base url of the document to the
parser.</p></dd>
        

        
          <dt>
<b>-fastcall</b> <i>boolean</i>
</dt>
          

          <dd>
<p>By default this option is 0 (off). If this option
          is on then any handler installed by the options
          <i class="m">-elementstartcommand</i>, <i class="m">-elementendcommand</i> and
          <i class="m">-characterdatacommand</i> from this moment on is
          installed in a way that calling it has lesser overhead as
          usual. This option may be switched between callback hander
          (re-)installion as desired.</p>

          <p>However this has some requirenments. The handler proc has
          to be defined before used as callback. If it is not then
          the callback is installed as ususal. And the handler proc
          must not be removed or re-defined as long as it is used as
          callback. If this is done the programm probably will crash
          but also may execute arbitrary code.</p>

          <p>The callback handler installed while this option is on
          will not be traced by executing them. </p>
</dd>
        
        
        
          <dt>
<b>-elementstartcommand</b> <i>script</i>
</dt>
          

          <dd>
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
            should never need to use this option, because the
            default value (8388608) should work for any real data.
            If you ever need to increase this value for non-attack
            payload, please report.</dd>
        

      </dl>
    <h2><a name="SECTid0x562e3ec7f930"> COMMAND METHODS </a></h2><dl class="commandlist">
        
          <dt>
<b class="cmd">parser</b> <b class="method">configure</b> <i class="m">option value ?option value?</i>
</dt>

          <dd><p>Sets configuration options for the parser. Every command
option, except <i class="m">-namespace</i> can be set or modified with this method.</p></dd>







|







705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
            should never need to use this option, because the
            default value (8388608) should work for any real data.
            If you ever need to increase this value for non-attack
            payload, please report.</dd>
        

      </dl>
    <h2><a name="SECTid0x5607ea11dac0"> COMMAND METHODS </a></h2><dl class="commandlist">
        
          <dt>
<b class="cmd">parser</b> <b class="method">configure</b> <i class="m">option value ?option value?</i>
</dt>

          <dd><p>Sets configuration options for the parser. Every command
option, except <i class="m">-namespace</i> can be set or modified with this method.</p></dd>
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
          <dd><p>Resets the parser in preparation for parsing another
document. A parser cannot be reset from within one of its handler callbacks
(neither directly nor indirectly) and will raise a tcl error in this
cases.</p></dd>
        
      </dl>

    <h2><a name="SECTid0x562e3eca68a0">Callback Command Return Codes</a></h2><p>A script invoked for any of the parser callback commands, such as
-elementstartcommand, -elementendcommand, etc, may return an error code other
than "ok" or "error". All callbacks may in addition return
"break" or "continue".</p><p>If a callback script returns an "error" error code then
processing of the document is terminated and the error is propagated in the
usual fashion.</p><p>If a callback script returns a "break" error code then all
further processing of every handler script out of this Tcl handler set is
suppressed for the further parsing. This does not influence any other handler
set.</p><p>If a callback script returns a "continue" error code then
processing of the current element, and its children, ceases for every handler
script out of this Tcl handler set and processing continues with the next
(sibling) element. This does not influence any other handler set.</p><p>If a callback script returns a "return" error
code then parsing is canceled altogether, but no error is raised.</p>

    <h2><a name="SECTid0x562e3ecd80c0">SEE ALSO</a></h2><p class="seealso">
<a href="expatapi.html">expatapi</a>, <a href="tdomcmd.html">tdom</a>
</p>

    <h2><a name="SECTid0x562e3ecd8480">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-SAX">SAX</a>, <a class="keyword" href="keyword-index.html#KW-push">push</a>, <a class="keyword" href="keyword-index.html#KW-pushparser">pushparser</a>
</p>
  </div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>







|













|



|







865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
          <dd><p>Resets the parser in preparation for parsing another
document. A parser cannot be reset from within one of its handler callbacks
(neither directly nor indirectly) and will raise a tcl error in this
cases.</p></dd>
        
      </dl>

    <h2><a name="SECTid0x5607e9fa88b0">Callback Command Return Codes</a></h2><p>A script invoked for any of the parser callback commands, such as
-elementstartcommand, -elementendcommand, etc, may return an error code other
than "ok" or "error". All callbacks may in addition return
"break" or "continue".</p><p>If a callback script returns an "error" error code then
processing of the document is terminated and the error is propagated in the
usual fashion.</p><p>If a callback script returns a "break" error code then all
further processing of every handler script out of this Tcl handler set is
suppressed for the further parsing. This does not influence any other handler
set.</p><p>If a callback script returns a "continue" error code then
processing of the current element, and its children, ceases for every handler
script out of this Tcl handler set and processing continues with the next
(sibling) element. This does not influence any other handler set.</p><p>If a callback script returns a "return" error
code then parsing is canceled altogether, but no error is raised.</p>

    <h2><a name="SECTid0x5607e9fa90b0">SEE ALSO</a></h2><p class="seealso">
<a href="expatapi.html">expatapi</a>, <a href="tdomcmd.html">tdom</a>
</p>

    <h2><a name="SECTid0x5607e9fa9470">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-SAX">SAX</a>, <a class="keyword" href="keyword-index.html#KW-push">push</a>, <a class="keyword" href="keyword-index.html#KW-pushparser">pushparser</a>
</p>
  </div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>

Changes to doc/expat.n.

247
248
249
250
251
252
253





















254
255
256
257
258
259
260
.RE
.IP "\fB-baseurl  \fIurl\fP\fR"
.RS
.PP
Reports the base url of the document to the
parser.
.RE





















.IP "\fB-elementstartcommand  \fIscript\fP\fR"
.RS
.PP
Specifies a Tcl command to associate with the start tag of
an element. The actual command consists of this option followed by at least two
arguments: the element type name and the attribute list.
.PP







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
.RE
.IP "\fB-baseurl  \fIurl\fP\fR"
.RS
.PP
Reports the base url of the document to the
parser.
.RE
.IP "\fB-fastcall  \fIboolean\fP\fR"
.RS
.PP
By default this option is 0 (off). If this option
is on then any handler installed by the options
\&\fI-elementstartcommand\fR, \fI-elementendcommand\fR and
\&\fI-characterdatacommand\fR from this moment on is
installed in a way that calling it has lesser overhead as
usual. This option may be switched between callback hander
(re-)installion as desired.
.PP
However this has some requirenments. The handler proc has
to be defined before used as callback. If it is not then
the callback is installed as ususal. And the handler proc
must not be removed or re-defined as long as it is used as
callback. If this is done the programm probably will crash
but also may execute arbitrary code.
.PP
The callback handler installed while this option is on
will not be traced by executing them.
.RE
.IP "\fB-elementstartcommand  \fIscript\fP\fR"
.RS
.PP
Specifies a Tcl command to associate with the start tag of
an element. The actual command consists of this option followed by at least two
arguments: the element type name and the attribute list.
.PP

Changes to doc/expatapi.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expatapi</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x562e3ec86f10">NAME</a> · <a href="#SECTid0x562e3ec4e840">SYNOPSIS</a> · <a href="#SECTid0x562e3eb55830">ARGUMENTS</a> · <a href="#SECTid0x562e3ec94bf0">DESCRIPTION</a> · <a href="#SECTid0x562e3ecdbbb0">SEE ALSO</a> · <a href="#SECTid0x562e3ecdbdf0">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
    <h2><a name="SECTid0x562e3ec86f10">NAME</a></h2><p class="namesection">
<b class="names">CheckExpatParserObj, CHandlerSetInstall, CHandlerSetRemove,
         CHandlerSetCreate, CHandlerSetGetUserData, GetExpatInfo - </b><br>Functions to create, install and remove expat parser object
extensions.</p>
  <h2><a name="SECTid0x562e3ec4e840">SYNOPSIS</a></h2><pre class="syntax">#include &lt;tclexpat.h&gt;

int 
<b class="fun">CheckExpatParserObj</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-nameObj"><i>nameObj</i></a>)  

int
<b class="fun">CHandlerSetInstall</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>, <a href="#ARG-handlerSet"><i>handlerSet</i></a>)







|


|



|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expatapi</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5607ea0e36a0">NAME</a> · <a href="#SECTid0x5607ea0968a0">SYNOPSIS</a> · <a href="#SECTid0x5607ea0ad2b0">ARGUMENTS</a> · <a href="#SECTid0x5607ea110ac0">DESCRIPTION</a> · <a href="#SECTid0x5607ea113650">SEE ALSO</a> · <a href="#SECTid0x5607ea113890">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
    <h2><a name="SECTid0x5607ea0e36a0">NAME</a></h2><p class="namesection">
<b class="names">CheckExpatParserObj, CHandlerSetInstall, CHandlerSetRemove,
         CHandlerSetCreate, CHandlerSetGetUserData, GetExpatInfo - </b><br>Functions to create, install and remove expat parser object
extensions.</p>
  <h2><a name="SECTid0x5607ea0968a0">SYNOPSIS</a></h2><pre class="syntax">#include &lt;tclexpat.h&gt;

int 
<b class="fun">CheckExpatParserObj</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-nameObj"><i>nameObj</i></a>)  

int
<b class="fun">CHandlerSetInstall</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>, <a href="#ARG-handlerSet"><i>handlerSet</i></a>)

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
void*
<b class="fun">CHandlerSetGetUserData</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>, <a href="#ARG-handlerSetName"><i>handlerSetName</i></a>)

TclGenExpatInfo*
<b class="fun">GetExpatInfo</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>)
</pre>

  <h2><a name="SECTid0x562e3eb55830">ARGUMENTS</a></h2><div class="arglist"><table width="100%" rules="none" cellpadding="5%">
<thead><tr class="heading">
<th width="20%">Type</th><th width="70%">Name</th><th width="10%">Mode</th>
</tr></thead><tr class="syntax">
<td class="type" width="20%" align="left">Tcl_Interp</td><td class="name" width="70%" align="left"><a name="ARG-interp">*interp</a></td><td class="mode" width="10%" align="center">in</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Interpreter with the expat parser object.</td>
</tr><tr class="syntax">







|







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
void*
<b class="fun">CHandlerSetGetUserData</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>, <a href="#ARG-handlerSetName"><i>handlerSetName</i></a>)

TclGenExpatInfo*
<b class="fun">GetExpatInfo</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>)
</pre>

  <h2><a name="SECTid0x5607ea0ad2b0">ARGUMENTS</a></h2><div class="arglist"><table width="100%" rules="none" cellpadding="5%">
<thead><tr class="heading">
<th width="20%">Type</th><th width="70%">Name</th><th width="10%">Mode</th>
</tr></thead><tr class="syntax">
<td class="type" width="20%" align="left">Tcl_Interp</td><td class="name" width="70%" align="left"><a name="ARG-interp">*interp</a></td><td class="mode" width="10%" align="center">in</td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Interpreter with the expat parser object.</td>
</tr><tr class="syntax">
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
</tr><tr class="syntax">
<td class="type" width="20%" align="left">Tcl_Obj</td><td class="name" width="70%" align="left"><a name="ARG-nameObj">*nameObj</a></td><td class="mode" width="10%" align="center"></td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">A Tcl Object containing the name of a expat parser object</td>
</tr>
</table></div>

  <h2><a name="SECTid0x562e3ec94bf0">DESCRIPTION</a></h2><p>The functions described in this manual allows one to add C level coded event
handler to an tDOM Tcl expat parser objects. A tDOM Tcl expat parser object is
able to have several Tcl scripts and C functions associated with a specific
event. If the event occurs, first the Tcl scripts then the C functions
associated with the event are called in turn.</p><p>A tDOM Tcl expat parser extension is an ordinary Tcl extension and loaded
like every other Tcl extension. It must install at least one new Tcl Level
command, that manipulates a tDOM Tcl expat parser object.</p><p>A C level handler set is a data structure like this:</p><pre class="example">
typedef struct CHandlerSet {







|







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
</tr><tr class="syntax">
<td class="type" width="20%" align="left">Tcl_Obj</td><td class="name" width="70%" align="left"><a name="ARG-nameObj">*nameObj</a></td><td class="mode" width="10%" align="center"></td>
</tr><tr class="desc">
<td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">A Tcl Object containing the name of a expat parser object</td>
</tr>
</table></div>

  <h2><a name="SECTid0x5607ea110ac0">DESCRIPTION</a></h2><p>The functions described in this manual allows one to add C level coded event
handler to an tDOM Tcl expat parser objects. A tDOM Tcl expat parser object is
able to have several Tcl scripts and C functions associated with a specific
event. If the event occurs, first the Tcl scripts then the C functions
associated with the event are called in turn.</p><p>A tDOM Tcl expat parser extension is an ordinary Tcl extension and loaded
like every other Tcl extension. It must install at least one new Tcl Level
command, that manipulates a tDOM Tcl expat parser object.</p><p>A C level handler set is a data structure like this:</p><pre class="example">
typedef struct CHandlerSet {
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
TclGenExpatInfo structure of the tDOM Tcl expat parser object
<i class="m">expatObj</i>. The <i class="m">expatObj</i> has to be a tDOM Tcl expat parser object
in the interpreter <i class="m">interp</i>. This is most useful, to set the application
status of the parser object.</p><p>See the simple but full functionally example in the extensions/example
dir or the more complex example tnc in the extensions/tnc dir (a simple DTD
validation extension).</p>

  <h2><a name="SECTid0x562e3ecdbbb0">SEE ALSO</a></h2><p class="seealso">expat</p>

  <h2><a name="SECTid0x562e3ecdbdf0">KEYWORDS</a></h2><p class="keywords"><a class="keyword" href="keyword-index.html#KW-Chandlerset">C handler set</a></p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>







|

|





195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
TclGenExpatInfo structure of the tDOM Tcl expat parser object
<i class="m">expatObj</i>. The <i class="m">expatObj</i> has to be a tDOM Tcl expat parser object
in the interpreter <i class="m">interp</i>. This is most useful, to set the application
status of the parser object.</p><p>See the simple but full functionally example in the extensions/example
dir or the more complex example tnc in the extensions/tnc dir (a simple DTD
validation extension).</p>

  <h2><a name="SECTid0x5607ea113650">SEE ALSO</a></h2><p class="seealso">expat</p>

  <h2><a name="SECTid0x5607ea113890">KEYWORDS</a></h2><p class="keywords"><a class="keyword" href="keyword-index.html#KW-Chandlerset">C handler set</a></p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>

Changes to doc/pullparser.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: pullparser</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x557b36ca9910">NAME</a> · <a href="#SECTid0x557b36c13110">SYNOPSIS</a> · <a href="#SECTid0x557b36ca0870">DESCRIPTION </a> · <a href="#SECTid0x557b36cead20">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x557b36ca9910">NAME</a></h2><p class="namesection">
<b class="names">tdom::pullparser - </b><br>Create an XML pull parser command</p>

  <h2><a name="SECTid0x557b36c13110">SYNOPSIS</a></h2><pre class="syntax">package require tdom

    <b class="cmd">tdom::pullparser</b> <i class="m">cmdName</i>  ? -ignorewhitecdata ? 
    </pre>

  <h2><a name="SECTid0x557b36ca0870">DESCRIPTION </a></h2><p>This command creates XML pull parser commands with a simple
    API, along the lines of a simple StAX parser. After creation,
    you've to set an input source, to do anything useful with the pull
    parser. For this see the methods <i class="m">input</i>, <i class="m">inputchannel</i>
    and <i class="m">inputfile</i>.</p><p>The parser has always a <i class="m">state</i>. You start parsing the XML
    data until some next state, do what has to be done and skip again
    to the next state. XML well-formedness errors along the way will
    be reported as TCL_ERROR with additional info in the error






|


|


|




|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: pullparser</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5607ea0e38c0">NAME</a> · <a href="#SECTid0x5607ea10d0f0">SYNOPSIS</a> · <a href="#SECTid0x5607e9f8a2c0">DESCRIPTION </a> · <a href="#SECTid0x5607ea0a9d30">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x5607ea0e38c0">NAME</a></h2><p class="namesection">
<b class="names">tdom::pullparser - </b><br>Create an XML pull parser command</p>

  <h2><a name="SECTid0x5607ea10d0f0">SYNOPSIS</a></h2><pre class="syntax">package require tdom

    <b class="cmd">tdom::pullparser</b> <i class="m">cmdName</i>  ? -ignorewhitecdata ? 
    </pre>

  <h2><a name="SECTid0x5607e9f8a2c0">DESCRIPTION </a></h2><p>This command creates XML pull parser commands with a simple
    API, along the lines of a simple StAX parser. After creation,
    you've to set an input source, to do anything useful with the pull
    parser. For this see the methods <i class="m">input</i>, <i class="m">inputchannel</i>
    and <i class="m">inputfile</i>.</p><p>The parser has always a <i class="m">state</i>. You start parsing the XML
    data until some next state, do what has to be done and skip again
    to the next state. XML well-formedness errors along the way will
    be reported as TCL_ERROR with additional info in the error
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
        skips to the corresponding end tag and ignores all events (but
        not XML parsing errors) on the way and returns the new state
        END_TAG.</dd>
      

      
        <dt>
<b class="method">find-element</b>  ? tagname ?   ? tagname | -names tagnames ? </dt>
        <dd>This method is only valid in states
        <i class="m">START_DOCUMENT</i>, <i class="m">START_TAG</i> and <i class="m">END_TAG</i>. It
        skips forward until the next element start tag with tag name
        <i class="m">tagname</i> and returns the new state START_TAG. If a list
        of tagnames is provided with the <i class="m">-names</i> option, any of
        the <i class="m">tagnames</i> match. If there isn't such an element the
        parser stops at the end of the input and returns







|







134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
        skips to the corresponding end tag and ignores all events (but
        not XML parsing errors) on the way and returns the new state
        END_TAG.</dd>
      

      
        <dt>
<b class="method">find-element</b>  ? tagname | -names tagnames ? </dt>
        <dd>This method is only valid in states
        <i class="m">START_DOCUMENT</i>, <i class="m">START_TAG</i> and <i class="m">END_TAG</i>. It
        skips forward until the next element start tag with tag name
        <i class="m">tagname</i> and returns the new state START_TAG. If a list
        of tagnames is provided with the <i class="m">-names</i> option, any of
        the <i class="m">tagnames</i> match. If there isn't such an element the
        parser stops at the end of the input and returns
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

176
177
178
179
180
181
182
183
184
185
186
        the parser command.</dd>
      
    </dl><p>Miscellaneous methods:</p><dl class="commandlist">
      
        <dt><b class="method">line</b></dt>
        <dd>This method is valid in all parser states except READY
        and TEXT. It returns the line number of the parsing
        position.</dd>
      

      
        <dt><b class="method">column</b></dt>
        <dd>This method is valid in all parser states except READY
        and TEXT. It returns the offset, from the beginning of the
        current line, of the parsing position.</dd>

      
    </dl>

  <h2><a name="SECTid0x557b36cead20">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-pull">pull</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
</p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>







|






|
>



|







161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
        the parser command.</dd>
      
    </dl><p>Miscellaneous methods:</p><dl class="commandlist">
      
        <dt><b class="method">line</b></dt>
        <dd>This method is valid in all parser states except READY
        and TEXT. It returns the line number of the parsing
        position. Line counting starts with 1.</dd>
      

      
        <dt><b class="method">column</b></dt>
        <dd>This method is valid in all parser states except READY
        and TEXT. It returns the offset, from the beginning of the
        current line, of the parsing position. Column counting starts
        with 0.</dd>
      
    </dl>

  <h2><a name="SECTid0x5607ea0a9d30">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-pull">pull</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
</p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>

Changes to doc/pullparser.n.

272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.TP
\&\fB\fBskip\fP
\&\fRThis method is only valid in state \fISTART_TAG\fR. It
skips to the corresponding end tag and ignores all events (but
not XML parsing errors) on the way and returns the new state
END_TAG.
.TP
\&\fB\fBfind-element\fP  \fR?\fP tagname \fR?\fP   \fR?\fP tagname | -names tagnames \fR?\fP
\&\fRThis method is only valid in states
\&\fISTART_DOCUMENT\fR, \fISTART_TAG\fR and \fIEND_TAG\fR. It
skips forward until the next element start tag with tag name
\&\fItagname\fR and returns the new state START_TAG. If a list
of tagnames is provided with the \fI-names\fR option, any of
the \fItagnames\fR match. If there isn't such an element the
parser stops at the end of the input and returns







|







272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
.TP
\&\fB\fBskip\fP
\&\fRThis method is only valid in state \fISTART_TAG\fR. It
skips to the corresponding end tag and ignores all events (but
not XML parsing errors) on the way and returns the new state
END_TAG.
.TP
\&\fB\fBfind-element\fP  \fR?\fP tagname | -names tagnames \fR?\fP
\&\fRThis method is only valid in states
\&\fISTART_DOCUMENT\fR, \fISTART_TAG\fR and \fIEND_TAG\fR. It
skips forward until the next element start tag with tag name
\&\fItagname\fR and returns the new state START_TAG. If a list
of tagnames is provided with the \fI-names\fR option, any of
the \fItagnames\fR match. If there isn't such an element the
parser stops at the end of the input and returns
295
296
297
298
299
300
301
302
303
304
305
306
307

308
309
the parser command.
.PP
Miscellaneous methods:
.TP
\&\fB\fBline\fP
\&\fRThis method is valid in all parser states except READY
and TEXT. It returns the line number of the parsing
position.
.TP
\&\fB\fBcolumn\fP
\&\fRThis method is valid in all parser states except READY
and TEXT. It returns the offset, from the beginning of the
current line, of the parsing position.

.SH KEYWORDS
XML, pull, parsing







|




|
>


295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
the parser command.
.PP
Miscellaneous methods:
.TP
\&\fB\fBline\fP
\&\fRThis method is valid in all parser states except READY
and TEXT. It returns the line number of the parsing
position. Line counting starts with 1.
.TP
\&\fB\fBcolumn\fP
\&\fRThis method is valid in all parser states except READY
and TEXT. It returns the offset, from the beginning of the
current line, of the parsing position. Column counting starts
with 0.
.SH KEYWORDS
XML, pull, parsing

Changes to doc/schema.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: schema</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x562e3ec841a0">NAME</a> · <a href="#SECTid0x562e3ec84e00">SYNOPSIS</a> · <a href="#SECTid0x562e3ec31a00">DESCRIPTION </a> · <a href="#SECTid0x562e3ec9fa40">Schema definition scripts</a> · <a href="#SECTid0x562e3eaf18e0">Quantity specifier</a> · <a href="#SECTid0x562e3ecd5740">Text constraint scripts</a> · <a href="#SECTid0x562e3ecbbb30">Local key constraints</a> · <a href="#SECTid0x562e3ec9a920">Recovering</a> · <a href="#SECTid0x562e3ec46890">Examples</a> · <a href="#SECTid0x562e3ec480d0">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x562e3ec841a0">NAME</a></h2><p class="namesection">
<b class="names">tdom::schema - </b><br>Creates a schema validation command</p>

  <h2><a name="SECTid0x562e3ec84e00">SYNOPSIS</a></h2><pre class="syntax">package require tdom

<b class="cmd">tdom::schema</b> <i class="m">?create?</i> <i class="m">cmdName</i>
    </pre>

  <h2><a name="SECTid0x562e3ec31a00">DESCRIPTION </a></h2><p>Every call of this command creates a new validation command. A
    validation command has methods to define a schema and is able
    to validate XML data or to post-validate a tDOM DOM tree (and to
    some degree other kind of hierarchical data) against this
    schema.</p><p>Also, a validation command may be used as argument to the
    <i class="m">-validateCmd</i> option of the <i class="m">dom parse</i> and the
    <i class="m">expat</i> commands to enable validation additionally to what
    they do otherwise.</p><p>The methods of created commands are:</p><dl class="commandlist">






|


|


|




|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: schema</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5607e9fc6db0">NAME</a> · <a href="#SECTid0x5607ea0e0900">SYNOPSIS</a> · <a href="#SECTid0x5607ea107860">DESCRIPTION </a> · <a href="#SECTid0x5607ea10a6e0">Schema definition scripts</a> · <a href="#SECTid0x5607ea0f1310">Quantity specifier</a> · <a href="#SECTid0x5607ea1347b0">Text constraint scripts</a> · <a href="#SECTid0x5607ea12c6c0">Local key constraints</a> · <a href="#SECTid0x5607ea097eb0">Recovering</a> · <a href="#SECTid0x5607ea099af0">Examples</a> · <a href="#SECTid0x5607ea11a850">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x5607e9fc6db0">NAME</a></h2><p class="namesection">
<b class="names">tdom::schema - </b><br>Creates a schema validation command</p>

  <h2><a name="SECTid0x5607ea0e0900">SYNOPSIS</a></h2><pre class="syntax">package require tdom

<b class="cmd">tdom::schema</b> <i class="m">?create?</i> <i class="m">cmdName</i>
    </pre>

  <h2><a name="SECTid0x5607ea107860">DESCRIPTION </a></h2><p>Every call of this command creates a new validation command. A
    validation command has methods to define a schema and is able
    to validate XML data or to post-validate a tDOM DOM tree (and to
    some degree other kind of hierarchical data) against this
    schema.</p><p>Also, a validation command may be used as argument to the
    <i class="m">-validateCmd</i> option of the <i class="m">dom parse</i> and the
    <i class="m">expat</i> commands to enable validation additionally to what
    they do otherwise.</p><p>The methods of created commands are:</p><dl class="commandlist">
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
            <dt>DOM_KEYCONSTRAINT</dt><dd></dd>
            <dt>DOM_XPATH_BOOLEAN</dt><dd></dd>
            <dt>INVALID_KEYREF</dt><dd></dd>
            <dt>INVALID_VALUE</dt><dd></dd>
            <dt>UNKNOWN_GLOBAL_ID</dt><dd></dd>
            <dt>UNKNOWN_ID</dt><dd></dd>
        </dl>
        <p> For more detailed information see section <a href="#SECTid0x562e3ec9a920">Recovering</a>.</p>
        </dd>
      

      
        <dt><b class="method">delete</b></dt>
        <dd>This method deletes the validation command.</dd>
      







|







343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
            <dt>DOM_KEYCONSTRAINT</dt><dd></dd>
            <dt>DOM_XPATH_BOOLEAN</dt><dd></dd>
            <dt>INVALID_KEYREF</dt><dd></dd>
            <dt>INVALID_VALUE</dt><dd></dd>
            <dt>UNKNOWN_GLOBAL_ID</dt><dd></dd>
            <dt>UNKNOWN_ID</dt><dd></dd>
        </dl>
        <p> For more detailed information see section <a href="#SECTid0x5607ea097eb0">Recovering</a>.</p>
        </dd>
      

      
        <dt><b class="method">delete</b></dt>
        <dd>This method deletes the validation command.</dd>
      
393
394
395
396
397
398
399










400
401
402
403
404
405
406
                  empty string is returned in these cases.</dd>
              
              
                  <dt><b>column</b></dt>
                  <dd>If the schema command is currently validating
                  this method returns the column part of the parsing
                  position information, and the empty string in all










                  other cases. If the schema command is currently
                  post-validating a DOM tree, there may be no position
                  information stored at some or all nodes. The
                  empty string is returned in these cases.</dd>
              
              
                  <dt><b>domNode</b></dt>







>
>
>
>
>
>
>
>
>
>







393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
                  empty string is returned in these cases.</dd>
              
              
                  <dt><b>column</b></dt>
                  <dd>If the schema command is currently validating
                  this method returns the column part of the parsing
                  position information, and the empty string in all
                  other cases. If the schema command is currently
                  post-validating a DOM tree, there may be no position
                  information stored at some or all nodes. The
                  empty string is returned in these cases.</dd>
              
              
                  <dt><b>byteIndex</b></dt>
                  <dd>If the schema command is currently validating
                  this method returns the byte position of the parsing
                  position information, and the empty string in all
                  other cases. If the schema command is currently
                  post-validating a DOM tree, there may be no position
                  information stored at some or all nodes. The
                  empty string is returned in these cases.</dd>
              
              
                  <dt><b>domNode</b></dt>
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
        <dt><b class="method">reset</b></dt>
        <dd>This method resets the validation command into state
        READY (while preserving the defined grammar).</dd>
      

    </dl>

  <h2><a name="SECTid0x562e3ec9fa40">Schema definition scripts</a></h2><p>Schema definition scripts are ordinary Tcl scripts evaluated in
    the namespace tdom::schema. The schema definition commands listed
    below in this Tcl namespace allow the definition of a wide variety
    of document structures. Every schema definition command
    establishes a validation constraint on the content which has to
    match or must be optional to qualify the content as valid. It is a
    validation error if there is additional (not matched) content.
    White-space-only text (in the XML sense of white space) between







|







582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
        <dt><b class="method">reset</b></dt>
        <dd>This method resets the validation command into state
        READY (while preserving the defined grammar).</dd>
      

    </dl>

  <h2><a name="SECTid0x5607ea10a6e0">Schema definition scripts</a></h2><p>Schema definition scripts are ordinary Tcl scripts evaluated in
    the namespace tdom::schema. The schema definition commands listed
    below in this Tcl namespace allow the definition of a wide variety
    of document structures. Every schema definition command
    establishes a validation constraint on the content which has to
    match or must be optional to qualify the content as valid. It is a
    validation error if there is additional (not matched) content.
    White-space-only text (in the XML sense of white space) between
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
        call would. It is meant as top-level command of a <i>schemacmd
        define</i> script. This command is not allowed nested in
        another definition script command and will raise error, if you
        call it there.</dd>
      
    </dl>

  <h2><a name="SECTid0x562e3eaf18e0">Quantity specifier</a></h2><p>Several schema definition commands expect a quantifier as
    one of their arguments which determines how often the content
    particle specified by the command is expected. The valid values
    for a <i class="m">quant</i> argument are:</p><dl class="optlist">
      
        <dt><b>!</b></dt>
        <dd>The content particle has to occur exactly once in valid
        documents.</dd>







|







904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
        call would. It is meant as top-level command of a <i>schemacmd
        define</i> script. This command is not allowed nested in
        another definition script command and will raise error, if you
        call it there.</dd>
      
    </dl>

  <h2><a name="SECTid0x5607ea0f1310">Quantity specifier</a></h2><p>Several schema definition commands expect a quantifier as
    one of their arguments which determines how often the content
    particle specified by the command is expected. The valid values
    for a <i class="m">quant</i> argument are:</p><dl class="optlist">
      
        <dt><b>!</b></dt>
        <dd>The content particle has to occur exactly once in valid
        documents.</dd>
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
        second list element is the character *, then there is no upper
        limit. Otherwise the second list element must be an integer
        with n &lt; m.</dd>
      
    </dl><p>If an optional quantifier is not given, it defaults to * in
    case of the <i class="m">mixed</i> command and to ! for all other commands.</p>

  <h2><a name="SECTid0x562e3ecd5740">Text constraint scripts</a></h2><p>Text (parsed character data, as XML calls it) sometimes has to
    be of a certain kind or comply with certain rules to be valid. The
    text constraint script arguments to text, attribute, nsattribute
    and deftexttype commands are evaluated in the Tcl namespace
    <i class="m">tdom::schema::text</i> namespace and allow the ensuing text
    constraint commands to check text for certain properties. The
    commands are defined in the Tcl namespace
    <i class="m">tdom::schema::text</i>. They raise error in case they are
    called outside of a text constraint script.</p><p>A few of the ensuing text type commands are exposed as general
    Tcl commands. They are defined in the namespace tdom::type and are
    called as documented below with the text to check appended to the
    argument list. They return a logical value. Please note that the
    commands may not accept starting or ending white space. If a
    command is available in the tdom::type namespace is recorded in
    its documentation.
    </p>
        <h3><a name="SECTid0x562e3ecd5ff0">The tcl text constraint command</a></h3>
        <p>The <i class="m">tcl</i> text constraint command dispatches the check
        to an arbitrary Tcl command, thus enable any programmable
        decision rules.</p>
        <dl class="commandlist">
            
                <dt>
<b class="cmd">tcl</b> <i class="m">tclcmd</i> <i class="m">?arg arg ...?</i>
</dt>
                <dd>Evaluates the Tcl script <i class="m">tclcmd arg arg ... </i> and
                the text to validate appended to the argument list. The return
                value of the Tcl command is interpreted as a boolean.</dd>
            
        </dl>
    
        <h3><a name="SECTid0x562e3ec7ba10">Basic XML types</a></h3>
        <dl class="commandlist">
            
                <dt><b class="cmd">name</b></dt>
                <dd>This text constraint matches if the text value
                matches the XML name production
                <a href="https://www.w3.org/TR/xml/#NT-Name">https://www.w3.org/TR/xml/#NT-Name</a>. This
                means that the text value must start with a letter,







|















|














|







951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
        second list element is the character *, then there is no upper
        limit. Otherwise the second list element must be an integer
        with n &lt; m.</dd>
      
    </dl><p>If an optional quantifier is not given, it defaults to * in
    case of the <i class="m">mixed</i> command and to ! for all other commands.</p>

  <h2><a name="SECTid0x5607ea1347b0">Text constraint scripts</a></h2><p>Text (parsed character data, as XML calls it) sometimes has to
    be of a certain kind or comply with certain rules to be valid. The
    text constraint script arguments to text, attribute, nsattribute
    and deftexttype commands are evaluated in the Tcl namespace
    <i class="m">tdom::schema::text</i> namespace and allow the ensuing text
    constraint commands to check text for certain properties. The
    commands are defined in the Tcl namespace
    <i class="m">tdom::schema::text</i>. They raise error in case they are
    called outside of a text constraint script.</p><p>A few of the ensuing text type commands are exposed as general
    Tcl commands. They are defined in the namespace tdom::type and are
    called as documented below with the text to check appended to the
    argument list. They return a logical value. Please note that the
    commands may not accept starting or ending white space. If a
    command is available in the tdom::type namespace is recorded in
    its documentation.
    </p>
        <h3><a name="SECTid0x5607ea135060">The tcl text constraint command</a></h3>
        <p>The <i class="m">tcl</i> text constraint command dispatches the check
        to an arbitrary Tcl command, thus enable any programmable
        decision rules.</p>
        <dl class="commandlist">
            
                <dt>
<b class="cmd">tcl</b> <i class="m">tclcmd</i> <i class="m">?arg arg ...?</i>
</dt>
                <dd>Evaluates the Tcl script <i class="m">tclcmd arg arg ... </i> and
                the text to validate appended to the argument list. The return
                value of the Tcl command is interpreted as a boolean.</dd>
            
        </dl>
    
        <h3><a name="SECTid0x5607ea135e40">Basic XML types</a></h3>
        <dl class="commandlist">
            
                <dt><b class="cmd">name</b></dt>
                <dd>This text constraint matches if the text value
                matches the XML name production
                <a href="https://www.w3.org/TR/xml/#NT-Name">https://www.w3.org/TR/xml/#NT-Name</a>. This
                means that the text value must start with a letter,
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
                <dd>This text constraint matches if the text value
                matches the XML nmtokens production
                <a href="https://www.w3.org/TR/xml/#NT-Nmtokens">https://www.w3.org/TR/xml/#NT-Nmtokens</a>
</dd>
            
        </dl>
    
        <h3><a name="SECTid0x562e3ecdd8c0">Basic type tests</a></h3>
        <p>
        </p>
        <dl class="commandlist">
            
                <dt>
<b class="cmd">integer</b> <i class="m">?(xsd|tcl)?</i>
</dt>







|







1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
                <dd>This text constraint matches if the text value
                matches the XML nmtokens production
                <a href="https://www.w3.org/TR/xml/#NT-Nmtokens">https://www.w3.org/TR/xml/#NT-Nmtokens</a>
</dd>
            
        </dl>
    
        <h3><a name="SECTid0x5607ea1297c0">Basic type tests</a></h3>
        <p>
        </p>
        <dl class="commandlist">
            
                <dt>
<b class="cmd">integer</b> <i class="m">?(xsd|tcl)?</i>
</dt>
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
                is a xsd:long. This is an integer between
                -9223372036854775808 and 9223372036854775807, both
                included, optionally preceded by a + or a - sign and
                leading zeros.</dd>
            
        </dl>
    
        <h3><a name="SECTid0x562e3ec91130">Logical constructs</a></h3>
        <dl class="commandlist">
        
            <dt>
<b class="cmd">oneOf</b> <i class="m">&lt;constraint script&gt;</i>
</dt>
            <dd>This text constraint matches if one of the text
            constraints defined in the argument <i class="m">constraint script</i>







|







1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
                is a xsd:long. This is an integer between
                -9223372036854775808 and 9223372036854775807, both
                included, optionally preceded by a + or a - sign and
                leading zeros.</dd>
            
        </dl>
    
        <h3><a name="SECTid0x5607ea123fd0">Logical constructs</a></h3>
        <dl class="commandlist">
        
            <dt>
<b class="cmd">oneOf</b> <i class="m">&lt;constraint script&gt;</i>
</dt>
            <dd>This text constraint matches if one of the text
            constraints defined in the argument <i class="m">constraint script</i>
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
<b class="cmd">type</b> <i class="m">text type name</i>
</dt>
            <dd>This text constraint matches if the text type given
            as argument matches.</dd>
        
        </dl>
    
        <h3><a name="SECTid0x562e3ec88670">Constraints on processed text value</a></h3>
        <dl class="commandlist">
            
            <dt>
<b class="cmd">whitespace</b> <i class="m">(preserve|replace|collapse)</i> <i class="m">&lt;constraint script&gt;</i>
</dt>
            <dd>This text constraint command does white-space (#x20
            (space, ' '), #x9 (tab, \t), #xA (linefeed, \n), and #xD







|







1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
<b class="cmd">type</b> <i class="m">text type name</i>
</dt>
            <dd>This text constraint matches if the text type given
            as argument matches.</dd>
        
        </dl>
    
        <h3><a name="SECTid0x5607ea12f510">Constraints on processed text value</a></h3>
        <dl class="commandlist">
            
            <dt>
<b class="cmd">whitespace</b> <i class="m">(preserve|replace|collapse)</i> <i class="m">&lt;constraint script&gt;</i>
</dt>
            <dd>This text constraint command does white-space (#x20
            (space, ' '), #x9 (tab, \t), #xA (linefeed, \n), and #xD
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
</dt>
            <dd>This text constraint command tests all text constraints
            in the evaluated <i class="m">constraint script&gt;</i> with the text to
            test stripped of all white space at start and end.</dd>
        
        </dl>
    
        <h3><a name="SECTid0x562e3ec8de20">Various other string properties</a></h3>
        <dl class="commandlist">
        
            <dt>
<b class="cmd">fixed</b> <i class="m">value</i>
</dt>
            <dd>The text constraint only matches if the text value is
            string equal to the given value.</dd>







|







1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
</dt>
            <dd>This text constraint command tests all text constraints
            in the evaluated <i class="m">constraint script&gt;</i> with the text to
            test stripped of all white space at start and end.</dd>
        
        </dl>
    
        <h3><a name="SECTid0x5607ea0f92c0">Various other string properties</a></h3>
        <dl class="commandlist">
        
            <dt>
<b class="cmd">fixed</b> <i class="m">value</i>
</dt>
            <dd>The text constraint only matches if the text value is
            string equal to the given value.</dd>
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
            constraint command. The possible types are <i class="m">NULL</i>,
            <i class="m">TRUE</i>, <i class="m">FALSE</i>, <i class="m">STRING</i> and
            <i class="m">NUMBER</i>.</dd>
        
        </dl>
    

  <h2><a name="SECTid0x562e3ecbbb30">Local key constraints</a></h2><p>Document wide uniqueness and foreign key constraints are
    available with the text constraint commands id and idref.
    Keyspaces allow for sub-tree local uniqueness and foreign key
    constraints.</p><dl class="commandlist">
        
            <dt>
<b class="cmd">keyspace</b> <i class="m">&lt;names list&gt;</i> <i class="m">&lt;constraint script&gt;</i>
</dt>







|







1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
            constraint command. The possible types are <i class="m">NULL</i>,
            <i class="m">TRUE</i>, <i class="m">FALSE</i>, <i class="m">STRING</i> and
            <i class="m">NUMBER</i>.</dd>
        
        </dl>
    

  <h2><a name="SECTid0x5607ea12c6c0">Local key constraints</a></h2><p>Document wide uniqueness and foreign key constraints are
    available with the text constraint commands id and idref.
    Keyspaces allow for sub-tree local uniqueness and foreign key
    constraints.</p><dl class="commandlist">
        
            <dt>
<b class="cmd">keyspace</b> <i class="m">&lt;names list&gt;</i> <i class="m">&lt;constraint script&gt;</i>
</dt>
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
            active always matches. If the keyspace is active then
            reports error if there is still no key as the value at the
            end of the keyspace <i class="m">&lt;name&gt;</i>. Otherwise, it
            matches.</dd>
        
    </dl>

  <h2><a name="SECTid0x562e3ec9a920">Recovering</a></h2><p>By default the validation engine stops at the first detected
      validation violation and reports that finding. It does so by
      return false (and sets, if given, the result variable with an
      error message) in case the schema command itself is used to
      validate input. If the schema command is used by a SAX parser or
      the DOM parser, it does so by throwing error.</p><p>If a <i class="m">reportcmd</i> is set this command is called on global
      level appended with the schema command and an error type as
      arguments in case a validation violation is detected. Then the







|







1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
            active always matches. If the keyspace is active then
            reports error if there is still no key as the value at the
            end of the keyspace <i class="m">&lt;name&gt;</i>. Otherwise, it
            matches.</dd>
        
    </dl>

  <h2><a name="SECTid0x5607ea097eb0">Recovering</a></h2><p>By default the validation engine stops at the first detected
      validation violation and reports that finding. It does so by
      return false (and sets, if given, the result variable with an
      error message) in case the schema command itself is used to
      validate input. If the schema command is used by a SAX parser or
      the DOM parser, it does so by throwing error.</p><p>If a <i class="m">reportcmd</i> is set this command is called on global
      level appended with the schema command and an error type as
      arguments in case a validation violation is detected. Then the
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
      element end event of the subtree.</p><p>Returning "ignore" from the recovering script in case of
      error type MISSING_ELEMENT recovers by ignoring the failed
      constraint and continues to match the event further against the
      schema.</p><p>Returning "vanish" from the recover script in case of the
      error types MISSING_ELEMENT and UNEXPECTED_ELEMENT recovers by
      ignoring the event.</p>

  <h2><a name="SECTid0x562e3ec46890">Examples</a></h2><p>The XML Schema Part 0: Primer Second Edition
    (<a href="https://www.w3.org/TR/xmlschema-0/">https://www.w3.org/TR/xmlschema-0/</a>) starts with this
    example schema:</p><pre class="example">
&lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;

  &lt;xsd:annotation&gt;
    &lt;xsd:documentation xml:lang="en"&gt;
     Purchase order schema for Example.com.







|







1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
      element end event of the subtree.</p><p>Returning "ignore" from the recovering script in case of
      error type MISSING_ELEMENT recovers by ignoring the failed
      constraint and continues to match the event further against the
      schema.</p><p>Returning "vanish" from the recover script in case of the
      error types MISSING_ELEMENT and UNEXPECTED_ELEMENT recovers by
      ignoring the event.</p>

  <h2><a name="SECTid0x5607ea099af0">Examples</a></h2><p>The XML Schema Part 0: Primer Second Edition
    (<a href="https://www.w3.org/TR/xmlschema-0/">https://www.w3.org/TR/xmlschema-0/</a>) starts with this
    example schema:</p><pre class="example">
&lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;

  &lt;xsd:annotation&gt;
    &lt;xsd:documentation xml:lang="en"&gt;
     Purchase order schema for Example.com.
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
    foreach e {name email} {
        defelement $e text
    }
}
      
    </pre>

<h2><a name="SECTid0x562e3ec480d0">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-Validation">Validation</a>, <a class="keyword" href="keyword-index.html#KW-Postvalidation">Postvalidation</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-SAX">SAX</a>
</p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>







|







1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
    foreach e {name email} {
        defelement $e text
    }
}
      
    </pre>

<h2><a name="SECTid0x5607ea11a850">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-Validation">Validation</a>, <a class="keyword" href="keyword-index.html#KW-Postvalidation">Postvalidation</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-SAX">SAX</a>
</p>
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>

Changes to doc/schema.n.

470
471
472
473
474
475
476








477
478
479
480
481
482
483
post-validating a DOM tree, there may be no position
information stored at some or all nodes. The
empty string is returned in these cases.
.IP "\fBcolumn\fR"
If the schema command is currently validating
this method returns the column part of the parsing
position information, and the empty string in all








other cases. If the schema command is currently
post-validating a DOM tree, there may be no position
information stored at some or all nodes. The
empty string is returned in these cases.
.IP "\fBdomNode\fR"
If the schema command isn't currently
post-validating a DOM tree this method returns the







>
>
>
>
>
>
>
>







470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
post-validating a DOM tree, there may be no position
information stored at some or all nodes. The
empty string is returned in these cases.
.IP "\fBcolumn\fR"
If the schema command is currently validating
this method returns the column part of the parsing
position information, and the empty string in all
other cases. If the schema command is currently
post-validating a DOM tree, there may be no position
information stored at some or all nodes. The
empty string is returned in these cases.
.IP "\fBbyteIndex\fR"
If the schema command is currently validating
this method returns the byte position of the parsing
position information, and the empty string in all
other cases. If the schema command is currently
post-validating a DOM tree, there may be no position
information stored at some or all nodes. The
empty string is returned in these cases.
.IP "\fBdomNode\fR"
If the schema command isn't currently
post-validating a DOM tree this method returns the

Changes to doc/tdomcmd.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tdom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5569427af2d0">NAME</a> · <a href="#SECTid0x556942762ce0">SYNOPSIS</a> · <a href="#SECTid0x5569428a4a30">DESCRIPTION</a> · <a href="#SECTid0x55694282bb80">SEE ALSO</a> · <a href="#SECTid0x55694282bf40">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
    <h2><a name="SECTid0x5569427af2d0">NAME</a></h2><p class="namesection">
<b class="names">tdom - </b><br>tdom is an expat parser object extension to create an in-memory
DOM tree from the input while parsing.</p>


  <h2><a name="SECTid0x556942762ce0">SYNOPSIS</a></h2><pre class="syntax">package require tdom

set parser [expat]

tdom $parser enable</pre>

  <h2><a name="SECTid0x5569428a4a30">DESCRIPTION</a></h2><p>
<i class="m">tdom</i> adds the C handler set "tdom" to an tcl expat
parser obj. This handler set builds an in-memory DOM tree out of the input,
parsed by the parser. A DOM tree created this way behave exactly like a DOM
tree created by the "dom" command (see there). In fact, tdom is only
another interface to the same functionality; it uses the code behind the
<tt class="samp">dom</tt> code for building the DOM tree.</p><dl class="commandlist">
      






|


|




|





|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tdom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5607ea0e6d90">NAME</a> · <a href="#SECTid0x5607ea10bb40">SYNOPSIS</a> · <a href="#SECTid0x5607ea10bd50">DESCRIPTION</a> · <a href="#SECTid0x5607e9f25ae0">SEE ALSO</a> · <a href="#SECTid0x5607e9f25e40">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
    <h2><a name="SECTid0x5607ea0e6d90">NAME</a></h2><p class="namesection">
<b class="names">tdom - </b><br>tdom is an expat parser object extension to create an in-memory
DOM tree from the input while parsing.</p>


  <h2><a name="SECTid0x5607ea10bb40">SYNOPSIS</a></h2><pre class="syntax">package require tdom

set parser [expat]

tdom $parser enable</pre>

  <h2><a name="SECTid0x5607ea10bd50">DESCRIPTION</a></h2><p>
<i class="m">tdom</i> adds the C handler set "tdom" to an tcl expat
parser obj. This handler set builds an in-memory DOM tree out of the input,
parsed by the parser. A DOM tree created this way behave exactly like a DOM
tree created by the "dom" command (see there). In fact, tdom is only
another interface to the same functionality; it uses the code behind the
<tt class="samp">dom</tt> code for building the DOM tree.</p><dl class="commandlist">
      
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<b class="cmd">tdom</b> <i class="m">parserObj</i> <b class="method">setExternalEntityResolver</b> <i class="m">script</i>
</dt>
        <dd></dd>
      

    </dl>

  <h2><a name="SECTid0x55694282bb80">SEE ALSO</a></h2><p class="seealso">dom, expat</p>

  <h2><a name="SECTid0x55694282bf40">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-SAX">SAX</a>, <a class="keyword" href="keyword-index.html#KW-Chandlerset">C handler set</a>
</p>

</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>







|

|








73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<b class="cmd">tdom</b> <i class="m">parserObj</i> <b class="method">setExternalEntityResolver</b> <i class="m">script</i>
</dt>
        <dd></dd>
      

    </dl>

  <h2><a name="SECTid0x5607e9f25ae0">SEE ALSO</a></h2><p class="seealso">dom, expat</p>

  <h2><a name="SECTid0x5607e9f25e40">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-SAX">SAX</a>, <a class="keyword" href="keyword-index.html#KW-Chandlerset">C handler set</a>
</p>

</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>

Changes to doc/tnc.html.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tnc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x556942859350">NAME</a> · <a href="#SECTid0x5569427635a0">SYNOPSIS</a> · <a href="#SECTid0x556942762640">DESCRIPTION</a> · <a href="#SECTid0x556942954d40">BUGS</a> · <a href="#SECTid0x5569429556b0">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x556942859350">NAME</a></h2><p class="namesection">
<b class="names">tnc - </b><br>tnc is an expat parser object extension, that validates the XML
stream against the document DTD while parsing.</p>
  
  <h2><a name="SECTid0x5569427635a0">SYNOPSIS</a></h2><pre class="syntax">package require tdom
package require tnc

set parser [expat]

tnc $parser enable</pre>

  <h2><a name="SECTid0x556942762640">DESCRIPTION</a></h2><p>
<i class="m">tnc</i> adds the C handler set "tnc" to a tcl expat parser
obj. This handler set is a simple DTD validator. If the validator detects a
validation error, it sets the interp result, signals error and stops
parsing. There isn't any validation error recovering. As a consequence, only
valid documents are completely parsed.</p><p>This handler set has only three methods:</p><dl class="commandlist">
      
        <dt>






|


|



|






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<html>
<head>
<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tnc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $"><meta charset="utf-8">
</head><body>
<div class="header">
<div class="navbar" align="center">
<a href="#SECTid0x5607ea1e22c0">NAME</a> · <a href="#SECTid0x5607ea1c7460">SYNOPSIS</a> · <a href="#SECTid0x5607ea1c7680">DESCRIPTION</a> · <a href="#SECTid0x5607ea1ef2e0">BUGS</a> · <a href="#SECTid0x5607ea1ef9a0">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x5607ea1e22c0">NAME</a></h2><p class="namesection">
<b class="names">tnc - </b><br>tnc is an expat parser object extension, that validates the XML
stream against the document DTD while parsing.</p>
  
  <h2><a name="SECTid0x5607ea1c7460">SYNOPSIS</a></h2><pre class="syntax">package require tdom
package require tnc

set parser [expat]

tnc $parser enable</pre>

  <h2><a name="SECTid0x5607ea1c7680">DESCRIPTION</a></h2><p>
<i class="m">tnc</i> adds the C handler set "tnc" to a tcl expat parser
obj. This handler set is a simple DTD validator. If the validator detects a
validation error, it sets the interp result, signals error and stops
parsing. There isn't any validation error recovering. As a consequence, only
valid documents are completely parsed.</p><p>This handler set has only three methods:</p><dl class="commandlist">
      
        <dt>
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
      

      </dl>
     </dd>
      
    </dl>

  <h2><a name="SECTid0x556942954d40">BUGS</a></h2><p>The validation error reports could be much more informative and
user-friendly.</p><p>The validator doesn't detect ambiguous content models (see XML
recomendation Section 3.2.1 and Appendix E). Most Java validators also doesn't,
but handle such content models right anyhow. Tnc does not; if your DTD has
such ambiguous content models, tnc can not used to validate documents against
such (not completely XML spec compliant) DTDs.</p><p>It isn't possible to validate XML documents with standalone="yes" in the
XML Declaration</p><p>Violations of the validity constraints Proper Group/PE Nesting and
Proper Conditional Section/PE Nesting are not detected. They could only happen
inside a invalid DTD, not in the content of a document.</p>
  <h2><a name="SECTid0x5569429556b0">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-Validation">Validation</a>, <a class="keyword" href="keyword-index.html#KW-DTD">DTD</a>
</p>
  
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>







|








|








116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
      

      </dl>
     </dd>
      
    </dl>

  <h2><a name="SECTid0x5607ea1ef2e0">BUGS</a></h2><p>The validation error reports could be much more informative and
user-friendly.</p><p>The validator doesn't detect ambiguous content models (see XML
recomendation Section 3.2.1 and Appendix E). Most Java validators also doesn't,
but handle such content models right anyhow. Tnc does not; if your DTD has
such ambiguous content models, tnc can not used to validate documents against
such (not completely XML spec compliant) DTDs.</p><p>It isn't possible to validate XML documents with standalone="yes" in the
XML Declaration</p><p>Violations of the validity constraints Proper Group/PE Nesting and
Proper Conditional Section/PE Nesting are not detected. They could only happen
inside a invalid DTD, not in the content of a document.</p>
  <h2><a name="SECTid0x5607ea1ef9a0">KEYWORDS</a></h2><p class="keywords">
<a class="keyword" href="keyword-index.html#KW-Validation">Validation</a>, <a class="keyword" href="keyword-index.html#KW-DTD">DTD</a>
</p>
  
</div><hr class="navsep"><div class="navbar" align="center">
<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a> · <a class="navaid" href="http://tdom.org">Repository</a>
</div>
</body>
</html>