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

Overview
Comment:Merged from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | schema
Files: files | file ages | folders
SHA3-256: 5cf43bf74a9ee11dba048f76a90632424835458c7047e4cf3e5113201f7e6f92
User & Date: rolf 2019-08-16 15:20:17
Context
2019-08-23
17:36
Cleanly close open keyspace constraints even in case of error recovering by skiping the remaining content model of the enclosing element after validation error. Fixed interleave checking (which could miss to complained about missing childs in the interleave content). check-in: 37403bd128 user: rolf tags: schema
2019-08-17
01:40
wip check-in: f8161e258e user: rolf tags: wip
2019-08-16
15:20
Merged from trunk. check-in: 5cf43bf74a user: rolf tags: schema
13:57
Even a bit better wording, probably (at least the native speaker say so). check-in: a3edd2a308 user: rolf tags: trunk
2019-08-12
21:11
Fix for [011e259c69]. check-in: cafa5160c0 user: rolf tags: schema
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

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
25
...
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213

214
215
216
217
218
219
220
221
222
223
224
225
...
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
<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="#SECTid0xd75c60">NAME</a> · <a href="#SECTid0xc89db0">SYNOPSIS</a> · <a href="#SECTid0xd6fd90"> DESCRIPTION </a> · <a href="#SECTid0xdd72b0">SEE ALSO</a> · <a href="#SECTid0xdd7640">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0xd75c60">NAME</a></h2><p class="namesection">
<b class="names">domNode - </b><br>Manipulates an instance of a DOM node object</p>



  <h2><a name="SECTid0xc89db0">SYNOPSIS</a></h2><pre class="syntax">$nodeObject <i class="m">method</i> <i class="m">arg arg ...</i>
</pre><pre class="syntax">domNode <i class="m">nodeToken</i> <i class="m">method</i> <i class="m">arg arg ...</i>
</pre>
  <h2><a name="SECTid0xd6fd90"> 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
................................................................................
        <dt>
<b class="method">setAttributeNS</b> <i class="m">uri qualifiedName newValue
?uri qualifiedName newValue ...?</i> </dt>
        <dd>
<p>Sets the value for one or more full qualified
attributes. Every attribute <i class="m">qualifiedName</i> with the namespace URI
<i class="m">uri</i> will be set to <i class="m">newValue</i>. This will create a new attribute, if
it wasn't avialble before. If you want to set an attribute within a namespace
you must specify the attribute name with prefix, even if you want to set an
already existing attribute to a new value. While searching, if the attribute
already exists, only the given <i class="m">uri</i> and the localname of the
<i class="m">qualifiedName</i> is used.</p>

        <pre class="example">$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue</pre>

<p>If the uri is the empty string and the attribute name hasn't a prefix, this
method has the same effect as the method <b>setAttribute</b>.</p>


        <pre class="example">$node setAttributeNS "" attri "some Value"</pre>

<p>With the exceptions of the special prefixes "xmlns" and "xml" you
always must provide a non empty <i class="m">uri</i>, if your <i class="m">qualifiedName</i> has a
prefix. It is not recommended to set xml namespace declarations. The effects are complicated and not always obvious up to resulting a not well-formed serializations after further processing.</p>
</dd>
      

      
        <dt>
<b class="method">removeAttributeNS</b> <i class="m">uri</i> <i class="m">localName</i>
................................................................................
      

    </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="SECTid0xdd72b0">SEE ALSO</a></h2><p class="seealso">dom, domDoc</p>
  
  <h2><a name="SECTid0xdd7640">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>






|


|




|


|







 







|







|
|
>




|







 







|

|








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
...
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
...
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
<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="#SECTid0x561e82e6b640">NAME</a> · <a href="#SECTid0x561e82d945a0">SYNOPSIS</a> · <a href="#SECTid0x561e82e49c80"> DESCRIPTION </a> · <a href="#SECTid0x561e82ebbf40">SEE ALSO</a> · <a href="#SECTid0x561e82ebc2d0">KEYWORDS</a>
</div><hr class="navsep">
</div><div class="body">
  <h2><a name="SECTid0x561e82e6b640">NAME</a></h2><p class="namesection">
<b class="names">domNode - </b><br>Manipulates an instance of a DOM node object</p>



  <h2><a name="SECTid0x561e82d945a0">SYNOPSIS</a></h2><pre class="syntax">$nodeObject <i class="m">method</i> <i class="m">arg arg ...</i>
</pre><pre class="syntax">domNode <i class="m">nodeToken</i> <i class="m">method</i> <i class="m">arg arg ...</i>
</pre>
  <h2><a name="SECTid0x561e82e49c80"> 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
................................................................................
        <dt>
<b class="method">setAttributeNS</b> <i class="m">uri qualifiedName newValue
?uri qualifiedName newValue ...?</i> </dt>
        <dd>
<p>Sets the value for one or more full qualified
attributes. Every attribute <i class="m">qualifiedName</i> with the namespace URI
<i class="m">uri</i> will be set to <i class="m">newValue</i>. This will create a new attribute, if
it wasn't available before. If you want to set an attribute within a namespace
you must specify the attribute name with prefix, even if you want to set an
already existing attribute to a new value. While searching, if the attribute
already exists, only the given <i class="m">uri</i> and the localname of the
<i class="m">qualifiedName</i> is used.</p>

        <pre class="example">$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue</pre>

<p>If the uri is the empty string and the attribute name doesn't have
a prefix, this method has the same effect as the method
<b>setAttribute</b>.</p>

        <pre class="example">$node setAttributeNS "" attri "some Value"</pre>

<p>With the exceptions of the special prefixes "xmlns" and "xml" you
always must provide a non empty <i class="m">uri</i> if your <i class="m">qualifiedName</i> has a
prefix. It is not recommended to set xml namespace declarations. The effects are complicated and not always obvious up to resulting a not well-formed serializations after further processing.</p>
</dd>
      

      
        <dt>
<b class="method">removeAttributeNS</b> <i class="m">uri</i> <i class="m">localName</i>
................................................................................
      

    </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="SECTid0x561e82ebbf40">SEE ALSO</a></h2><p class="seealso">dom, domDoc</p>
  
  <h2><a name="SECTid0x561e82ebc2d0">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/domNode.n.

284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304

305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
\&\fB\fBsetAttributeNS\fP \fIuri qualifiedName newValue ?uri qualifiedName newValue ...?\fB
\&\fR
.RS
.PP
Sets the value for one or more full qualified
attributes. Every attribute \fIqualifiedName\fR with the namespace URI
\&\fIuri\fR will be set to \fInewValue\fR. This will create a new attribute, if
it wasn't avialble before. If you want to set an attribute within a namespace
you must specify the attribute name with prefix, even if you want to set an
already existing attribute to a new value. While searching, if the attribute
already exists, only the given \fIuri\fR and the localname of the
\&\fIqualifiedName\fR is used.


        
.CS
$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue
.CE
.PP
If the uri is the empty string and the attribute name hasn't a prefix, this
method has the same effect as the method \fBsetAttribute\fR.



        
.CS
$node setAttributeNS "" attri "some Value"
.CE
.PP
With the exceptions of the special prefixes "xmlns" and "xml" you
always must provide a non empty \fIuri\fR, if your \fIqualifiedName\fR has a
prefix. It is not recommended to set xml namespace declarations. The effects are complicated and not always obvious up to resulting a not well-formed serializations after further processing.
.RE
.TP
\&\fB\fBremoveAttributeNS\fP \fIuri\fB \fIlocalName\fB
\&\fRRemoves the attribute with the local name \fIlocalName\fR within
the namespace \fIuri\fR.
.TP







|











|
|
>








|







284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
\&\fB\fBsetAttributeNS\fP \fIuri qualifiedName newValue ?uri qualifiedName newValue ...?\fB
\&\fR
.RS
.PP
Sets the value for one or more full qualified
attributes. Every attribute \fIqualifiedName\fR with the namespace URI
\&\fIuri\fR will be set to \fInewValue\fR. This will create a new attribute, if
it wasn't available before. If you want to set an attribute within a namespace
you must specify the attribute name with prefix, even if you want to set an
already existing attribute to a new value. While searching, if the attribute
already exists, only the given \fIuri\fR and the localname of the
\&\fIqualifiedName\fR is used.


        
.CS
$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue
.CE
.PP
If the uri is the empty string and the attribute name doesn't have
a prefix, this method has the same effect as the method
\&\fBsetAttribute\fR.


        
.CS
$node setAttributeNS "" attri "some Value"
.CE
.PP
With the exceptions of the special prefixes "xmlns" and "xml" you
always must provide a non empty \fIuri\fR if your \fIqualifiedName\fR has a
prefix. It is not recommended to set xml namespace declarations. The effects are complicated and not always obvious up to resulting a not well-formed serializations after further processing.
.RE
.TP
\&\fB\fBremoveAttributeNS\fP \fIuri\fB \fIlocalName\fB
\&\fRRemoves the attribute with the local name \fIlocalName\fR within
the namespace \fIuri\fR.
.TP

Changes to doc/domNode.xml.

180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

197
198
199
200
201
202
203
204
205
206
207
208

      <commanddef>
        <command><method>setAttributeNS</method> <m>uri qualifiedName newValue
?uri qualifiedName newValue ...?</m> </command>
        <desc><p>Sets the value for one or more full qualified
attributes. Every attribute <m>qualifiedName</m> with the namespace URI
<m>uri</m> will be set to <m>newValue</m>. This will create a new attribute, if
it wasn't avialble before. If you want to set an attribute within a namespace
you must specify the attribute name with prefix, even if you want to set an
already existing attribute to a new value. While searching, if the attribute
already exists, only the given <m>uri</m> and the localname of the
<m>qualifiedName</m> is used.</p>

        <example>$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue</example>

<p>If the uri is the empty string and the attribute name hasn't a prefix, this
method has the same effect as the method <b>setAttribute</b>.</p>


        <example>$node setAttributeNS "" attri "some Value"</example>

<p>With the exceptions of the special prefixes "xmlns" and "xml" you
always must provide a non empty <m>uri</m>, if your <m>qualifiedName</m> has a
prefix. It is not recommended to set xml namespace declarations. The effects are complicated and not always obvious up to resulting a not well-formed serializations after further processing.</p></desc>
      </commanddef>

      <commanddef>
        <command><method>removeAttributeNS</method> <m>uri</m> <m>localName</m></command>
        <desc>Removes the attribute with the local name <m>localName</m> within
 the namespace <m>uri</m>.</desc>







|







|
|
>




|







180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209

      <commanddef>
        <command><method>setAttributeNS</method> <m>uri qualifiedName newValue
?uri qualifiedName newValue ...?</m> </command>
        <desc><p>Sets the value for one or more full qualified
attributes. Every attribute <m>qualifiedName</m> with the namespace URI
<m>uri</m> will be set to <m>newValue</m>. This will create a new attribute, if
it wasn't available before. If you want to set an attribute within a namespace
you must specify the attribute name with prefix, even if you want to set an
already existing attribute to a new value. While searching, if the attribute
already exists, only the given <m>uri</m> and the localname of the
<m>qualifiedName</m> is used.</p>

        <example>$node setAttributeNS "http://some.uri.com/wow" prefix:attr1 attrValue</example>

<p>If the uri is the empty string and the attribute name has no
prefix, this method has the same effect as the method
<b>setAttribute</b>.</p>

        <example>$node setAttributeNS "" attri "some Value"</example>

<p>With the exceptions of the special prefixes "xmlns" and "xml" you
always must provide a non empty <m>uri</m> if your <m>qualifiedName</m> has a
prefix. It is not recommended to set xml namespace declarations. The effects are complicated and not always obvious up to resulting a not well-formed serializations after further processing.</p></desc>
      </commanddef>

      <commanddef>
        <command><method>removeAttributeNS</method> <m>uri</m> <m>localName</m></command>
        <desc>Removes the attribute with the local name <m>localName</m> within
 the namespace <m>uri</m>.</desc>

Changes to tests/xpath.bench.

77
78
79
80
81
82
83






































84
85
86
87
88
89
90
        }
    } -body {
        $root selectNodes {e1[myfunc() = '']}
    } -post {
        $doc delete
    }







































}

dom createNodeCmd elementNode e2

dom createDocument root doc
$doc documentElement root
$root appendFromScript {







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







77
78
79
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
        }
    } -body {
        $root selectNodes {e1[myfunc() = '']}
    } -post {
        $doc delete
    }

}

foreach nrOf {1 10 50 100} {

    bench -desc "string(<nodeset with $nrOf nodes>)" -pre {
        dom createDocument root doc
        $doc documentElement root
        $root appendFromScript {
            for {set x 0} {$x < $nrOf} {incr x} {
                e1
            }
        }
        $root selectNodes -cache 1 string(e1)
    } -body {
        $root selectNodes -cache 1 string(e1)
    } -post {
        $doc delete
    }

}

foreach nrOf {1 10 50 100} {

    bench -desc "count(<nodeset with $nrOf nodes>)" -pre {
        dom createDocument root doc
        $doc documentElement root
        $root appendFromScript {
            for {set x 0} {$x < $nrOf} {incr x} {
                e1
            }
        }
        $root selectNodes -cache 1 count(e1)
    } -body {
        $root selectNodes -cache 1 count(e1)
    } -post {
        $doc delete
    }

}

dom createNodeCmd elementNode e2

dom createDocument root doc
$doc documentElement root
$root appendFromScript {

Changes to tests/xpath.test.

1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
    catch {$doc selectNodes concat([string repeat 1 250],1,1)}
    $doc delete
} {}

test xpath-5.59 {afl-fuzz found floating point exception in mod calulation} {
    set doc [dom createDocument doc]
    set result [list]
    lappend result [$doc selectNodes "1111111111111 mod -1"]
    lappend result [$doc selectNodes "111111111111111111111111111111111111111 mod -1"]
    $doc delete
    set result
} {0 NaN}

test xpath-5.60 {afl-fuzz found floating point exception in mod calulation} {
    set doc [dom createDocument doc]







|







1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
    catch {$doc selectNodes concat([string repeat 1 250],1,1)}
    $doc delete
} {}

test xpath-5.59 {afl-fuzz found floating point exception in mod calulation} {
    set doc [dom createDocument doc]
    set result [list]
    lappend result [$doc selectNodes "1111111111 mod -1"]
    lappend result [$doc selectNodes "111111111111111111111111111111111111111 mod -1"]
    $doc delete
    set result
} {0 NaN}

test xpath-5.60 {afl-fuzz found floating point exception in mod calulation} {
    set doc [dom createDocument doc]