Offset 5, 40 lines modified | Offset 5, 40 lines modified |
5 | <link·rel="stylesheet"·href="tclxml.css"> | 5 | <link·rel="stylesheet"·href="tclxml.css"> |
6 | </head> | 6 | </head> |
7 | <body><div·class="refentry"> | 7 | <body><div·class="refentry"> |
8 | <h1·class="title"><a·name="idm12029512">TclDOM</a></h1> | 8 | <h1·class="title"><a·name="idm12029512">TclDOM</a></h1> |
9 | <h2>Contents</h2> | 9 | <h2>Contents</h2> |
10 | <ul> | 10 | <ul> |
11 | <li><a·href="#synopsis">Synopsis</a></li> | 11 | <li><a·href="#synopsis">Synopsis</a></li> |
12 | <li><a·href="#idm8726600">Description</a></li> | 12 | <li><a·href="#idm8706120">Description</a></li> |
13 | <li><a·href="#idm8710984">Packages·and·Namespaces</a></li> | 13 | <li><a·href="#idm8690504">Packages·and·Namespaces</a></li> |
14 | <li><a·href="#idm8673864">Tokens</a></li> | 14 | <li><a·href="#idm8653384">Tokens</a></li> |
15 | <li><a·href="#idm8668744">Document·and·Node·Commands</a></li> | 15 | <li><a·href="#idm8648264">Document·and·Node·Commands</a></li> |
16 | <li><a·href="#idm8666312">DOM·Interfaces</a></li> | 16 | <li><a·href="#idm8645832">DOM·Interfaces</a></li> |
17 | <li><a·href="#idm8662216">Convenience·Commands·and·Methods</a></li> | 17 | <li><a·href="#idm8641736">Convenience·Commands·and·Methods</a></li> |
18 | <li> | 18 | <li> |
19 | <a·href="#idm8658632">Commands</a><ul> | 19 | <a·href="#idm8638152">Commands</a><ul> |
20 | <li> | 20 | <li> |
21 | <a·href="#idm8657608">::dom::DOMImplementation</a><ul><li><a·href="#idm8654920">Command·Options</a></li></ul> | 21 | <a·href="#idm8637128">::dom::DOMImplementation</a><ul><li><a·href="#idm8634440">Command·Options</a></li></ul> |
22 | </li> | 22 | </li> |
23 | <li><a·href="#idm8505288">::dom::document</a></li> | 23 | <li><a·href="#idm8484808">::dom::document</a></li> |
24 | <li><a·href="#idm8386504">dom::node</a></li> | 24 | <li><a·href="#idm8366024">dom::node</a></li> |
25 | <li><a·href="#idp12852792">dom::element</a></li> | 25 | <li><a·href="#idp12873272">dom::element</a></li> |
26 | <li><a·href="#idp12931896">dom::processinginstruction</a></li> | 26 | <li><a·href="#idp12952376">dom::processinginstruction</a></li> |
27 | <li><a·href="#idp12950456">dom::event</a></li> | 27 | <li><a·href="#idp12970936">dom::event</a></li> |
28 | </ul> | 28 | </ul> |
29 | </li> | 29 | </li> |
30 | <li><a·href="#idp13153464">Errors</a></li> | 30 | <li><a·href="#idp13173944">Errors</a></li> |
31 | <li> | 31 | <li> |
32 | <a·href="#idp13156152">Implementations</a><ul> | 32 | <a·href="#idp13176632">Implementations</a><ul> |
33 | <li> | 33 | <li> |
34 | <a·href="#idp13157560">Tcl·Implementation</a><ul><li><a·href="#idp13159352">Limitations</a></li></ul> | 34 | <a·href="#idp13178040">Tcl·Implementation</a><ul><li><a·href="#idp13179832">Limitations</a></li></ul> |
35 | </li> | 35 | </li> |
36 | <li> | 36 | <li> |
37 | <a·href="#idp13162936">libxml2·Implementation</a><ul><li><a·href="#idp13165240">Limitations</a></li></ul> | 37 | <a·href="#idp13183416">libxml2·Implementation</a><ul><li><a·href="#idp13185720">Limitations</a></li></ul> |
38 | </li> | 38 | </li> |
39 | </ul> | 39 | </ul> |
40 | </li> | 40 | </li> |
41 | </ul> | 41 | </ul> |
42 | <div·class="refnamediv"> | 42 | <div·class="refnamediv"> |
43 | <span·class="refname">::dom::DOMImplementation</span>,·<span·class="refname">::dom::hasfeature</span>,·<span·class="refname">::dom::create</span>,·<span·class="refname">::dom::destroy</span>,·<span·class="refname">::dom::parse</span>,·<span·class="refname">::dom::serialize</span>,·<span·class="refname">::dom::document</span>,·<span·class="refname">::dom::documenttype</span>,·<span·class="refname">::dom::node</span>,·<span·class="refname">::dom::element</span>,·<span·class="refname">::dom::event</span>,·<span·class="refname">::dom::selectNode</span>,·<span·class="refname">::dom::isNode</span>,·<span·class="refname">::dom::xinclude</span>,·<span·class="refname">::dom::prefix2namespaceURI</span>,·<span·class="refname">::dom::trim</span>·?·<span·class="refpurpose">Tcl·language·binding·for·the·W3C·Document·Object·Model</span> | 43 | <span·class="refname">::dom::DOMImplementation</span>,·<span·class="refname">::dom::hasfeature</span>,·<span·class="refname">::dom::create</span>,·<span·class="refname">::dom::destroy</span>,·<span·class="refname">::dom::parse</span>,·<span·class="refname">::dom::serialize</span>,·<span·class="refname">::dom::document</span>,·<span·class="refname">::dom::documenttype</span>,·<span·class="refname">::dom::node</span>,·<span·class="refname">::dom::element</span>,·<span·class="refname">::dom::event</span>,·<span·class="refname">::dom::selectNode</span>,·<span·class="refname">::dom::isNode</span>,·<span·class="refname">::dom::xinclude</span>,·<span·class="refname">::dom::prefix2namespaceURI</span>,·<span·class="refname">::dom::trim</span>·?·<span·class="refpurpose">Tcl·language·binding·for·the·W3C·Document·Object·Model</span> |
44 | </div> | 44 | </div> |
Offset 48, 73 lines modified | Offset 48, 73 lines modified |
48 | <a·name="idm9810632"></a><span·class="command"·id="idm9810376"><a·name="package_require_dom"></a><tt>package·require·dom</tt>·</span> | 48 | <a·name="idm9810632"></a><span·class="command"·id="idm9810376"><a·name="package_require_dom"></a><tt>package·require·dom</tt>·</span> |
49 | </div> | 49 | </div> |
50 | <br><span·class="pkgsynopsis"><pre>package·require·dom·?3.3?</pre></span><div·class="cmdsynopsis"·id="idm9807048"> | 50 | <br><span·class="pkgsynopsis"><pre>package·require·dom·?3.3?</pre></span><div·class="cmdsynopsis"·id="idm9807048"> |
51 | <a·name="idm9807048"></a><span·class="command"·id="idm9806792"><a·name="__dom__DOMImplementation"></a><tt>::dom::DOMImplementation</tt>·</span><em>method</em>·?args...?</div> | 51 | <a·name="idm9807048"></a><span·class="command"·id="idm9806792"><a·name="__dom__DOMImplementation"></a><tt>::dom::DOMImplementation</tt>·</span><em>method</em>·?args...?</div> |
52 | <div·class="cmdsynopsis"·id="idm9804488"> | 52 | <div·class="cmdsynopsis"·id="idm9804488"> |
53 | <a·name="idm9804488"></a><span·class="command"·id="idm9804232"><a·name="__dom__hasfeature"></a><tt>::dom::hasfeature</tt>·</span><em>feature</em>·<em>version</em> | 53 | <a·name="idm9804488"></a><span·class="command"·id="idm9804232"><a·name="__dom__hasfeature"></a><tt>::dom::hasfeature</tt>·</span><em>feature</em>·<em>version</em> |
54 | </div> | 54 | </div> |
55 | <div·class="cmdsynopsis"·id="idm8765896"> | 55 | <div·class="cmdsynopsis"·id="idm8745416"> |
56 | <a·name="idm8765896"></a><span·class="command"·id="idm8765640"><a·name="__dom__create"></a><tt>::dom::create</tt>·</span> | 56 | <a·name="idm8745416"></a><span·class="command"·id="idm8745160"><a·name="__dom__create"></a><tt>::dom::create</tt>·</span> |
57 | </div> | 57 | </div> |
58 | <div·class="cmdsynopsis"·id="idm8765128"> | 58 | <div·class="cmdsynopsis"·id="idm8744648"> |
59 | <a·name="idm8765128"></a><span·class="command"·id="idm8764872"><a·name="__dom__destroy"></a><tt>::dom::destroy</tt>·</span><em>token</em> | 59 | <a·name="idm8744648"></a><span·class="command"·id="idm8744392"><a·name="__dom__destroy"></a><tt>::dom::destroy</tt>·</span><em>token</em> |
60 | </div> | 60 | </div> |
61 | <div·class="cmdsynopsis"·id="idm8763592"> | 61 | <div·class="cmdsynopsis"·id="idm8743112"> |
62 | <a·name="idm8763592"></a><span·class="command"·id="idm8763336"><a·name="__dom__parse"></a><tt>::dom::parse</tt>·</span><em>xml</em>·?option·value...?</div> | 62 | <a·name="idm8743112"></a><span·class="command"·id="idm8742856"><a·name="__dom__parse"></a><tt>::dom::parse</tt>·</span><em>xml</em>·?option·value...?</div> |
63 | <div·class="cmdsynopsis"·id="idm8756552"> | 63 | <div·class="cmdsynopsis"·id="idm8736072"> |
64 | <a·name="idm8756552"></a><span·class="command"·id="idm8756296"><a·name="__dom__serialize"></a><tt>::dom::serialize</tt>·</span><em>token</em>·?option·value...?</div> | 64 | <a·name="idm8736072"></a><span·class="command"·id="idm8735816"><a·name="__dom__serialize"></a><tt>::dom::serialize</tt>·</span><em>token</em>·?option·value...?</div> |
65 | <div·class="cmdsynopsis"·id="idm8753608"> | 65 | <div·class="cmdsynopsis"·id="idm8733128"> |
66 | <a·name="idm8753608"></a><span·class="command"·id="idm8753352"><a·name="__dom__document"></a><tt>::dom::document</tt>·</span><em>method</em>·<em>token</em>·?args...?</div> | 66 | <a·name="idm8733128"></a><span·class="command"·id="idm8732872"><a·name="__dom__document"></a><tt>::dom::document</tt>·</span><em>method</em>·<em>token</em>·?args...?</div> |
67 | <div·class="cmdsynopsis"·id="idm8750280"> | 67 | <div·class="cmdsynopsis"·id="idm8729800"> |
68 | <a·name="idm8750280"></a><span·class="command"·id="idm8750024"><a·name="__dom__documenttype"></a><tt>::dom::documenttype</tt>·</span><em>method</em>·<em>token</em>·?args...?</div> | 68 | <a·name="idm8729800"></a><span·class="command"·id="idm8729544"><a·name="__dom__documenttype"></a><tt>::dom::documenttype</tt>·</span><em>method</em>·<em>token</em>·?args...?</div> |
69 | <div·class="cmdsynopsis"·id="idm8746952"> | 69 | <div·class="cmdsynopsis"·id="idm8726472"> |
70 | <a·name="idm8746952"></a><span·class="command"·id="idm8746696"><a·name="__dom__node"></a><tt>::dom::node</tt>·</span><em>method</em>·<em>token</em>·?args...?</div> | 70 | <a·name="idm8726472"></a><span·class="command"·id="idm8726216"><a·name="__dom__node"></a><tt>::dom::node</tt>·</span><em>method</em>·<em>token</em>·?args...?</div> |
71 | <div·class="cmdsynopsis"·id="idm8743624"> | 71 | <div·class="cmdsynopsis"·id="idm8723144"> |
72 | <a·name="idm8743624"></a><span·class="command"·id="idm8743368"><a·name="__dom__element"></a><tt>::dom::element</tt>·</span><em>method</em>·<em>token</em>·?args...?</div> | 72 | <a·name="idm8723144"></a><span·class="command"·id="idm8722888"><a·name="__dom__element"></a><tt>::dom::element</tt>·</span><em>method</em>·<em>token</em>·?args...?</div> |
73 | <div·class="cmdsynopsis"·id="idm8740296"> | 73 | <div·class="cmdsynopsis"·id="idm8719816"> |
74 | <a·name="idm8740296"></a><span·class="command"·id="idm8740040"><a·name="__dom__event"></a><tt>::dom::event</tt>·</span><em>method</em>·<em>token</em>·?args...?</div> | 74 | <a·name="idm8719816"></a><span·class="command"·id="idm8719560"><a·name="__dom__event"></a><tt>::dom::event</tt>·</span><em>method</em>·<em>token</em>·?args...?</div> |
75 | <div·class="cmdsynopsis"·id="idm8736968"> | 75 | <div·class="cmdsynopsis"·id="idm8716488"> |
76 | <a·name="idm8736968"></a><span·class="command"·id="idm8736712"><a·name="__dom__selectNode"></a><tt>::dom::selectNode</tt>·</span><em>token</em>·<em>xpath</em>·?option·value...?</div> | 76 | <a·name="idm8716488"></a><span·class="command"·id="idm8716232"><a·name="__dom__selectNode"></a><tt>::dom::selectNode</tt>·</span><em>token</em>·<em>xpath</em>·?option·value...?</div> |
77 | <div·class="cmdsynopsis"·id="idm8733640"> | 77 | <div·class="cmdsynopsis"·id="idm8713160"> |
78 | <a·name="idm8733640"></a><span·class="command"·id="idm8733384"><a·name="__dom__isNode"></a><tt>::dom::isNode</tt>·</span><em>token</em> | 78 | <a·name="idm8713160"></a><span·class="command"·id="idm8712904"><a·name="__dom__isNode"></a><tt>::dom::isNode</tt>·</span><em>token</em> |
79 | </div> | 79 | </div> |
80 | <div·class="cmdsynopsis"·id="idm8732104"> | 80 | <div·class="cmdsynopsis"·id="idm8711624"> |
81 | <a·name="idm8732104"></a><span·class="command"·id="idm8731848"><a·name="__dom__xinclude"></a><tt>::dom::xinclude</tt>·</span><em>doc</em> | 81 | <a·name="idm8711624"></a><span·class="command"·id="idm8711368"><a·name="__dom__xinclude"></a><tt>::dom::xinclude</tt>·</span><em>doc</em> |
82 | </div> | 82 | </div> |
83 | <div·class="cmdsynopsis"·id="idm8730568"> | 83 | <div·class="cmdsynopsis"·id="idm8710088"> |
84 | <a·name="idm8730568"></a><span·class="command"·id="idm8730312"><a·name="__dom__prefix2namespaceURI"></a><tt>::dom::prefix2namespaceURI</tt>·</span><em>node</em>·<em>prefix</em> | 84 | <a·name="idm8710088"></a><span·class="command"·id="idm8709832"><a·name="__dom__prefix2namespaceURI"></a><tt>::dom::prefix2namespaceURI</tt>·</span><em>node</em>·<em>prefix</em> |
85 | </div> | 85 | </div> |
86 | <div·class="cmdsynopsis"·id="idm8728264"> | 86 | <div·class="cmdsynopsis"·id="idm8707784"> |
87 | <a·name="idm8728264"></a><span·class="command"·id="idm8728008"><a·name="__dom__trim"></a><tt>::dom::trim</tt>·</span><em>doc</em> | 87 | <a·name="idm8707784"></a><span·class="command"·id="idm8707528"><a·name="__dom__trim"></a><tt>::dom::trim</tt>·</span><em>doc</em> |
88 | </div> | 88 | </div> |
89 | <h3>Tcl·Namespace·Usage</h3> | 89 | <h3>Tcl·Namespace·Usage</h3> |
90 | <br><tt>::dom</tt><br><tt>::dom::tcl</tt><br><tt>::dom::libxml2</tt><p></p> | 90 | <br><tt>::dom</tt><br><tt>::dom::tcl</tt><br><tt>::dom::libxml2</tt><p></p> |
91 | </div> | 91 | </div> |
92 | <div·class="refsect1"> | 92 | <div·class="refsect1"> |
93 | <h2> | 93 | <h2> |
94 | <a·name="idm8726600"></a>Description</h2> | 94 | <a·name="idm8706120"></a>Description</h2> |
95 | <p>TclDOM·is·a·Tcl·language·binding·for·the·<a·href="http://www.w3c.org/DOM/">W3C·Document·Object·Model</a>·(DOM).··DOM·provides·a·view·of·a·XML·(or·HTML)·document·as·a·tree·structure.··Currently,·TclDOM·only·supports·XML·documents.</p> | 95 | <p>TclDOM·is·a·Tcl·language·binding·for·the·<a·href="http://www.w3c.org/DOM/">W3C·Document·Object·Model</a>·(DOM).··DOM·provides·a·view·of·a·XML·(or·HTML)·document·as·a·tree·structure.··Currently,·TclDOM·only·supports·XML·documents.</p> |
96 | <p>The·package·implements·most·of·the·DOM·Level·1·interfaces·and·also·some·Level·2·and·Level·3·interfaces.··There·are·also·a·number·of·non-standard·commands·and·methods·provided·for·the·convenience·of·application·developers·(these·are·documented).</p> | 96 | <p>The·package·implements·most·of·the·DOM·Level·1·interfaces·and·also·some·Level·2·and·Level·3·interfaces.··There·are·also·a·number·of·non-standard·commands·and·methods·provided·for·the·convenience·of·application·developers·(these·are·documented).</p> |
97 | <p>The·DOM·specification·should·be·read·in·conjunction·with·this·reference·manual,·as·it·explains·the·meaning·and·purpose·of·the·various·interfaces.··This·manual·is·not·a·tutorial·on·how·to·use·the·DOM.</p> | 97 | <p>The·DOM·specification·should·be·read·in·conjunction·with·this·reference·manual,·as·it·explains·the·meaning·and·purpose·of·the·various·interfaces.··This·manual·is·not·a·tutorial·on·how·to·use·the·DOM.</p> |
98 | <p>TclDOM·also·provides·two·implementations·of·the·API:··a·pure-Tcl·implementation·and·a·C·implementation·based·on·the·Gnome·libxml2·library.</p> | 98 | <p>TclDOM·also·provides·two·implementations·of·the·API:··a·pure-Tcl·implementation·and·a·C·implementation·based·on·the·Gnome·libxml2·library.</p> |
99 | </div> | 99 | </div> |
100 | <div·class="refsect1"> | 100 | <div·class="refsect1"> |
101 | <h2> | 101 | <h2> |
102 | <a·name="idm8710984"></a>Packages·and·Namespaces</h2> | 102 | <a·name="idm8690504"></a>Packages·and·Namespaces</h2> |
103 | <p>TclDOM·defines·the·<tt>dom</tt>·package·and·also·a·Tcl·namespace·using·that·same·name.</p> | 103 | <p>TclDOM·defines·the·<tt>dom</tt>·package·and·also·a·Tcl·namespace·using·that·same·name.</p> |
104 | <p>Implementations·define·their·own·package·name·and·Tcl·namespace·within·the·<tt>::dom</tt>·Tcl·namespace:</p> | 104 | <p>Implementations·define·their·own·package·name·and·Tcl·namespace·within·the·<tt>::dom</tt>·Tcl·namespace:</p> |
105 | <dl> | 105 | <dl> |
106 | <span·class="term">Tcl·implementation</span><dd><p>Package·<tt>dom::tcl</tt>,·Tcl·namespace·<tt>::dom::tcl</tt>.</p></dd> | 106 | <span·class="term">Tcl·implementation</span><dd><p>Package·<tt>dom::tcl</tt>,·Tcl·namespace·<tt>::dom::tcl</tt>.</p></dd> |
107 | <span·class="term">libxml2</span><dd><p>Package·<tt>dom::libxml2</tt>,·Tcl·namespace·<tt>::dom::libxml2</tt>.</p></dd> | 107 | <span·class="term">libxml2</span><dd><p>Package·<tt>dom::libxml2</tt>,·Tcl·namespace·<tt>::dom::libxml2</tt>.</p></dd> |
108 | </dl> | 108 | </dl> |
109 | <p>Each·DOM·Document·is·allocated·a·Tcl·namespace·within·the·<tt>::dom</tt>·Tcl·namespace.··All·storage·for·the·document·and·commands·are·defined·within·that·Tcl·namespace.</p> | 109 | <p>Each·DOM·Document·is·allocated·a·Tcl·namespace·within·the·<tt>::dom</tt>·Tcl·namespace.··All·storage·for·the·document·and·commands·are·defined·within·that·Tcl·namespace.</p> |
110 | </div> | 110 | </div> |
111 | <div·class="refsect1"> | 111 | <div·class="refsect1"> |
112 | <h2> | 112 | <h2> |
113 | <a·name="idm8673864"></a>Tokens</h2> | 113 | <a·name="idm8653384"></a>Tokens</h2> |
114 | <p>The·TclDOM·API·uses·<em>tokens</em>·as·identifiers·for·nodes·within·the·document·tree.··This·technique·has·been·used·to·allow·alternate·implementations·of·TclDOM·to·be·efficient,·while·retaining·compatibility·with·the·pure-Tcl·implementation.</p> | 114 | <p>The·TclDOM·API·uses·<em>tokens</em>·as·identifiers·for·nodes·within·the·document·tree.··This·technique·has·been·used·to·allow·alternate·implementations·of·TclDOM·to·be·efficient,·while·retaining·compatibility·with·the·pure-Tcl·implementation.</p> |
115 | <p>The·format·of·the·token·itself·as·well·as·the·data·structure·referred·to·by·the·token·are·<em>not</em>·public·and·an·application·should·not·rely·on·these.··Instead,·an·application·should·use·the·accessor·methods·provided·by·the·API.</p> | 115 | <p>The·format·of·the·token·itself·as·well·as·the·data·structure·referred·to·by·the·token·are·<em>not</em>·public·and·an·application·should·not·rely·on·these.··Instead,·an·application·should·use·the·accessor·methods·provided·by·the·API.</p> |
116 | <p>There·is·no·requirement·to·always·use·the·same·token·for·a·node.··In·fact,·an·important·performance·optimisation·for·some·implementations·is·to·create·a·new·token·when·a·node·is·accessed,·regardless·of·whether·a·token·has·already·been·issued·for·that·node.··This·implies·that·in·order·to·test·whether·two·tokens·refer·to·the·same·node·it·is·not·sufficient·to·test·the·string·values·of·the·tokens;·the·<tt>isSameNode</tt>·method·must·be·used·for·this·purpose.··For·example,</p> | 116 | <p>There·is·no·requirement·to·always·use·the·same·token·for·a·node.··In·fact,·an·important·performance·optimisation·for·some·implementations·is·to·create·a·new·token·when·a·node·is·accessed,·regardless·of·whether·a·token·has·already·been·issued·for·that·node.··This·implies·that·in·order·to·test·whether·two·tokens·refer·to·the·same·node·it·is·not·sufficient·to·test·the·string·values·of·the·tokens;·the·<tt>isSameNode</tt>·method·must·be·used·for·this·purpose.··For·example,</p> |
117 | <div·class="informalexample"><pre><div·class="programlisting"><pre> | 117 | <div·class="informalexample"><pre><div·class="programlisting"><pre> |
118 | proc·NodeCompare1·{A·B}·{ | 118 | proc·NodeCompare1·{A·B}·{ |
119 | ····return·[string·equal·$A·$B] | 119 | ····return·[string·equal·$A·$B] |
120 | } | 120 | } |
Offset 122, 94 lines modified | Offset 122, 94 lines modified |
122 | ····return·[$A·isSameNode·$B] | 122 | ····return·[$A·isSameNode·$B] |
123 | } | 123 | } |
124 | </pre></div></pre></div> | 124 | </pre></div></pre></div> |
125 | <p>In·the·above·example,·<span·class="literal">NodeCompare2</span>·correctly·determines·whether·its·two·arguments·refer·to·the·same·node.</p> | 125 | <p>In·the·above·example,·<span·class="literal">NodeCompare2</span>·correctly·determines·whether·its·two·arguments·refer·to·the·same·node.</p> |
126 | </div> | 126 | </div> |
127 | <div·class="refsect1"> | 127 | <div·class="refsect1"> |
128 | <h2> | 128 | <h2> |
129 | <a·name="idm8668744"></a>Document·and·Node·Commands</h2> | 129 | <a·name="idm8648264"></a>Document·and·Node·Commands</h2> |
130 | <p>Each·Document·and·Node·has·a·Tcl·command·defined·that·may·be·used·to·control·the·object.··This·command·may·be·used·to·invoke·the·methods·by·the·<strong>::dom::document</strong>·command·(for·Documents)·or·the·<strong>::dom::node</strong>·command·(for·all·other·Nodes).··If·a·Document'·or·Node's·Tcl·command·is·destroyed·then·the·Document·or·Node·is·also·destroyed.</p> | 130 | <p>Each·Document·and·Node·has·a·Tcl·command·defined·that·may·be·used·to·control·the·object.··This·command·may·be·used·to·invoke·the·methods·by·the·<strong>::dom::document</strong>·command·(for·Documents)·or·the·<strong>::dom::node</strong>·command·(for·all·other·Nodes).··If·a·Document'·or·Node's·Tcl·command·is·destroyed·then·the·Document·or·Node·is·also·destroyed.</p> |
131 | </div> | 131 | </div> |
132 | <div·class="refsect1"> | 132 | <div·class="refsect1"> |
133 | <h2> | 133 | <h2> |
134 | <a·name="idm8666312"></a>DOM·Interfaces</h2> | 134 | <a·name="idm8645832"></a>DOM·Interfaces</h2> |
135 | <p>Each·<em>Interface</em>·in·the·DOM·specification·is·implemented·with·a·Tcl·command·in·the·<tt>dom</tt>·namespace.··A·few·interfaces·have·not·been·mapped·to·Tcl·commands·because·Tcl·already·provides·the·required·functionality,·for·example·the·<tt>CharacterData</tt>·interface.</p> | 135 | <p>Each·<em>Interface</em>·in·the·DOM·specification·is·implemented·with·a·Tcl·command·in·the·<tt>dom</tt>·namespace.··A·few·interfaces·have·not·been·mapped·to·Tcl·commands·because·Tcl·already·provides·the·required·functionality,·for·example·the·<tt>CharacterData</tt>·interface.</p> |
136 | <p><em>method</em>s·for·interfaces·are·methods·(subcommands)·of·the·corresponding·Tcl·command.</p> | 136 | <p><em>method</em>s·for·interfaces·are·methods·(subcommands)·of·the·corresponding·Tcl·command.</p> |
137 | <p>Each·<em>attribute</em>·of·an·interface·is·a·configuration·option·for·an·object·in·the·document·tree.</p> | 137 | <p>Each·<em>attribute</em>·of·an·interface·is·a·configuration·option·for·an·object·in·the·document·tree.</p> |
138 | </div> | 138 | </div> |
139 | <div·class="refsect1"> | 139 | <div·class="refsect1"> |
140 | <h2> | 140 | <h2> |
141 | <a·name="idm8662216"></a>Convenience·Commands·and·Methods</h2> | 141 | <a·name="idm8641736"></a>Convenience·Commands·and·Methods</h2> |
142 | <p>DOM·doesn't·always·provide·an·interface,·method·or·attribute·for·every·function·required.··For·example,·until·DOM·Level·3·for·was·no·standard·for·creating,·parsing·and·serializing·a·document.··Sometimes·using·the·standard·DOM·interface·is·awkward.··TclDOM·provides·a·number·of·non-standard·features·to·overcome·these·problems.</p> | 142 | <p>DOM·doesn't·always·provide·an·interface,·method·or·attribute·for·every·function·required.··For·example,·until·DOM·Level·3·for·was·no·standard·for·creating,·parsing·and·serializing·a·document.··Sometimes·using·the·standard·DOM·interface·is·awkward.··TclDOM·provides·a·number·of·non-standard·features·to·overcome·these·problems.</p> |
143 | <p>A·major·convenience·is·that·each·method·of·the·<tt>DOMImplementation</tt>·interface·is·also·defined·as·a·command.··For·example,·rather·than·using·<strong>dom::DOMImplementation·create</strong>·to·create·a·new·document,·the·shorter·command·<strong>dom::create</strong>·may·be·used.</p> | 143 | <p>A·major·convenience·is·that·each·method·of·the·<tt>DOMImplementation</tt>·interface·is·also·defined·as·a·command.··For·example,·rather·than·using·<strong>dom::DOMImplementation·create</strong>·to·create·a·new·document,·the·shorter·command·<strong>dom::create</strong>·may·be·used.</p> |
144 | <p>Implementations·may·also·provide·direct·access·to·specific·features.··Refer·to·the·documentation·for·a·DOM·implementation.</p> | 144 | <p>Implementations·may·also·provide·direct·access·to·specific·features.··Refer·to·the·documentation·for·a·DOM·implementation.</p> |
145 | </div> | 145 | </div> |
146 | <div·class="refsect1"> | 146 | <div·class="refsect1"> |
147 | <h2> | 147 | <h2> |
148 | <a·name="idm8658632"></a>Commands</h2> | 148 | <a·name="idm8638152"></a>Commands</h2> |
149 | <div·class="refsect2"> | 149 | <div·class="refsect2"> |
150 | <h3> | 150 | <h3> |
151 | <a·name="idm8657608"></a><strong>::dom::DOMImplementation</strong> | 151 | <a·name="idm8637128"></a><strong>::dom::DOMImplementation</strong> |
152 | </h3> | 152 | </h3> |
153 | <p>The·<strong>::dom::DOMImplementation</strong>·command·implements·the·<tt>DOMImplementation</tt>·DOM·interface.··It·is·used·to·provide·implementation-specific·features·not·explicitly·defined·in·the·DOM·specification.</p> | 153 | <p>The·<strong>::dom::DOMImplementation</strong>·command·implements·the·<tt>DOMImplementation</tt>·DOM·interface.··It·is·used·to·provide·implementation-specific·features·not·explicitly·defined·in·the·DOM·specification.</p> |
154 | <div·class="refsect3"> | 154 | <div·class="refsect3"> |
155 | <h4> | 155 | <h4> |
156 | <a·name="idm8654920"></a>Command·Options</h4> | 156 | <a·name="idm8634440"></a>Command·Options</h4> |
157 | <p>The·following·command·options·may·be·used.··These·are·also·available·as·commands.</p> | 157 | <p>The·following·command·options·may·be·used.··These·are·also·available·as·commands.</p> |
158 | <dl> | 158 | <dl> |
159 | <span·class="term"><span·class="methodname">hasFeature</span></span><dd> | 159 | <span·class="term"><span·class="methodname">hasFeature</span></span><dd> |
160 | <div·class="cmdsynopsis"·id="idm8651976"> | 160 | <div·class="cmdsynopsis"·id="idm8631496"> |
161 | <a·name="idm8651976"></a>hasFeature·<em>feature</em> | 161 | <a·name="idm8631496"></a>hasFeature·<em>feature</em> |
162 | </div> | 162 | </div> |
163 | <p>Provides·a·test·for·existence·of·a·feature.··Returns·<span·class="literal">1</span>·if·a·feature·is·implemented,·<span·class="literal">0</span>·otherwise.</p> | 163 | <p>Provides·a·test·for·existence·of·a·feature.··Returns·<span·class="literal">1</span>·if·a·feature·is·implemented,·<span·class="literal">0</span>·otherwise.</p> |
164 | </dd> | 164 | </dd> |
165 | <span·class="term"><span·class="methodname">create</span></span><dd> | 165 | <span·class="term"><span·class="methodname">create</span></span><dd> |
166 | <div·class="cmdsynopsis"·id="idm8647624"> | 166 | <div·class="cmdsynopsis"·id="idm8627144"> |
167 | <a·name="idm8647624"></a>create·<em>type</em> | 167 | <a·name="idm8627144"></a>create·<em>type</em> |
168 | </div> | 168 | </div> |
169 | <p>Creates·the·root·node·of·a·new·DOM·document.··The·document·element·type·may·be·specified·as·an·argument,·in·which·case·that·element·is·created.··The·return·value·is·a·token·referring·to·the·root·node·of·the·newly·created·document.··A·Tcl·command·is·also·created·with·the·same·name·as·the·document's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::document</strong>·command.</p> | 169 | <p>Creates·the·root·node·of·a·new·DOM·document.··The·document·element·type·may·be·specified·as·an·argument,·in·which·case·that·element·is·created.··The·return·value·is·a·token·referring·to·the·root·node·of·the·newly·created·document.··A·Tcl·command·is·also·created·with·the·same·name·as·the·document's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::document</strong>·command.</p> |
170 | <div·class="note"><p>Non-standard·method.··DOM·Level·2·introduced·the·<span·class="methodname">createDocument</span>·method.</p></div> | 170 | <div·class="note"><p>Non-standard·method.··DOM·Level·2·introduced·the·<span·class="methodname">createDocument</span>·method.</p></div> |
171 | </dd> | 171 | </dd> |
172 | <span·class="term"><span·class="methodname">createDocument</span></span><dd> | 172 | <span·class="term"><span·class="methodname">createDocument</span></span><dd> |
173 | <div·class="cmdsynopsis"·id="idm8642376"> | 173 | <div·class="cmdsynopsis"·id="idm8621896"> |
174 | <a·name="idm8642376"></a>createDocument·<em>nsURI</em>·<em>type</em>·<em>doctype</em> | 174 | <a·name="idm8621896"></a>createDocument·<em>nsURI</em>·<em>type</em>·<em>doctype</em> |
175 | </div> | 175 | </div> |
176 | <p>Creates·the·root·node·of·a·new·DOM·document.··The·document·element·namespace·URI·and·local-name·(element·type)·may·be·specified·as·an·argument,·in·which·case·that·element·is·created.··If·the·document·type·is·given·then·the·newly·created·document·is·configured·to·use·that·document·type.··The·return·value·is·a·token·referring·to·the·root·node·of·the·newly·created·document.··A·Tcl·command·is·also·created·with·the·same·name·as·the·document's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::document</strong>·command.</p> | 176 | <p>Creates·the·root·node·of·a·new·DOM·document.··The·document·element·namespace·URI·and·local-name·(element·type)·may·be·specified·as·an·argument,·in·which·case·that·element·is·created.··If·the·document·type·is·given·then·the·newly·created·document·is·configured·to·use·that·document·type.··The·return·value·is·a·token·referring·to·the·root·node·of·the·newly·created·document.··A·Tcl·command·is·also·created·with·the·same·name·as·the·document's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::document</strong>·command.</p> |
177 | </dd> | 177 | </dd> |
178 | <span·class="term"><span·class="methodname">createDocumentType</span></span><dd> | 178 | <span·class="term"><span·class="methodname">createDocumentType</span></span><dd> |
179 | <div·class="cmdsynopsis"·id="idm8636872"> | 179 | <div·class="cmdsynopsis"·id="idm8616392"> |
180 | <a·name="idm8636872"></a>createDocumentType·<em>name</em>·<em>publicid</em>·<em>systemid</em>·<em>internaldtd</em> | 180 | <a·name="idm8616392"></a>createDocumentType·<em>name</em>·<em>publicid</em>·<em>systemid</em>·<em>internaldtd</em> |
181 | </div> | 181 | </div> |
182 | <p>Creates·a·Document·Type·Declaration.··The·return·value·is·a·token·for·the·newly·created·document·type·declaration.··A·Tcl·command·is·also·created·with·the·same·name·as·the·document·type's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::documenttype</strong>·command.</p> | 182 | <p>Creates·a·Document·Type·Declaration.··The·return·value·is·a·token·for·the·newly·created·document·type·declaration.··A·Tcl·command·is·also·created·with·the·same·name·as·the·document·type's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::documenttype</strong>·command.</p> |
183 | </dd> | 183 | </dd> |
184 | <span·class="term"><span·class="methodname">createNode</span></span><dd> | 184 | <span·class="term"><span·class="methodname">createNode</span></span><dd> |
185 | <div·class="cmdsynopsis"·id="idm8626632"> | 185 | <div·class="cmdsynopsis"·id="idm8606152"> |
186 | <a·name="idm8626632"></a>createNode·<em>token</em>·<em>xpath</em> | 186 | <a·name="idm8606152"></a>createNode·<em>token</em>·<em>xpath</em> |
187 | </div> | 187 | </div> |
188 | <p>May·create·a·node·in·the·document.···<em><em>token</em></em>·specifies·a·context·for·the·XPath·expression·given·by··<em><em>xpath</em></em>.··The·expression·must·resolve·to·a·node.··If·the·node·exists·then·no·further·action·is·taken.··Otherwise·the·node·is·created.··The·token·of·the·matched·or·newly·created·node·is·returned.</p> | 188 | <p>May·create·a·node·in·the·document.···<em><em>token</em></em>·specifies·a·context·for·the·XPath·expression·given·by··<em><em>xpath</em></em>.··The·expression·must·resolve·to·a·node.··If·the·node·exists·then·no·further·action·is·taken.··Otherwise·the·node·is·created.··The·token·of·the·matched·or·newly·created·node·is·returned.</p> |
189 | <div·class="note"><p>Non-standard·method.</p></div> | 189 | <div·class="note"><p>Non-standard·method.</p></div> |
190 | </dd> | 190 | </dd> |
191 | <span·class="term"><span·class="methodname">destroy</span></span><dd> | 191 | <span·class="term"><span·class="methodname">destroy</span></span><dd> |
192 | <div·class="cmdsynopsis"·id="idm8620616"> | 192 | <div·class="cmdsynopsis"·id="idm8600136"> |
193 | <a·name="idm8620616"></a>destroy·<em>token</em> | 193 | <a·name="idm8600136"></a>destroy·<em>token</em> |
194 | </div> | 194 | </div> |
195 | <p>This·method·frees·all·data·structures·associated·with·a·DOM·document·or·node.··The··<em><em>token</em></em>·argument·must·refer·to·a·valid·token·for·any·document·or·any·node·in·the·tree·of·a·document.</p> | 195 | <p>This·method·frees·all·data·structures·associated·with·a·DOM·document·or·node.··The··<em><em>token</em></em>·argument·must·refer·to·a·valid·token·for·any·document·or·any·node·in·the·tree·of·a·document.</p> |
196 | <p>When·the·given·token·refers·to·a·DOM·document·then·the·entire·document·is·destroyed;·the·Tcl·namespace·for·the·document·is·deleted·and·all·document·and·node·commands·are·deleted.··All·tokens·for·the·document·or·nodes·in·the·document·become·invalid.</p> | 196 | <p>When·the·given·token·refers·to·a·DOM·document·then·the·entire·document·is·destroyed;·the·Tcl·namespace·for·the·document·is·deleted·and·all·document·and·node·commands·are·deleted.··All·tokens·for·the·document·or·nodes·in·the·document·become·invalid.</p> |
197 | <p>When·the·token·refers·to·a·node·the·node·is·removed·from·the·tree·before·it·is·destroyed.··If·the·node·has·children·or·attributes,·they·will·also·be·destroyed.··The·Tcl·command·for·the·node·is·deleted.</p> | 197 | <p>When·the·token·refers·to·a·node·the·node·is·removed·from·the·tree·before·it·is·destroyed.··If·the·node·has·children·or·attributes,·they·will·also·be·destroyed.··The·Tcl·command·for·the·node·is·deleted.</p> |
198 | </dd> | 198 | </dd> |
199 | <span·class="term"><span·class="methodname">isNode</span></span><dd> | 199 | <span·class="term"><span·class="methodname">isNode</span></span><dd> |
200 | <div·class="cmdsynopsis"·id="idm8615624"> | 200 | <div·class="cmdsynopsis"·id="idm8595144"> |
201 | <a·name="idm8615624"></a>isNode·<em>token</em> | 201 | <a·name="idm8595144"></a>isNode·<em>token</em> |
202 | </div> | 202 | </div> |
203 | <p>Tests·whether·the·given·token·is·a·valid·token·for·some·DOM·node.</p> | 203 | <p>Tests·whether·the·given·token·is·a·valid·token·for·some·DOM·node.</p> |
204 | <div·class="note"><p>Non-standard·method.</p></div> | 204 | <div·class="note"><p>Non-standard·method.</p></div> |
205 | </dd> | 205 | </dd> |
206 | <span·class="term"><span·class="methodname">parse</span></span><dd> | 206 | <span·class="term"><span·class="methodname">parse</span></span><dd> |
207 | <div·class="cmdsynopsis"·id="idm8611400"> | 207 | <div·class="cmdsynopsis"·id="idm8590920"> |
208 | <a·name="idm8611400"></a>parse·<em>xml</em>·"<em>option</em>·<em>value</em>"</div> | 208 | <a·name="idm8590920"></a>parse·<em>xml</em>·"<em>option</em>·<em>value</em>"</div> |
209 | <p>This·method·parses·XML·formatted·text·given·by·the··<em><em>xml</em></em>·argument·and·constructs·a·DOM·tree·for·the·document.··The·return·result·is·the·token·of·the·root·node·of·the·newly·created·document.··The·document·will·also·have·a·Tcl·command·associated·with·it,·see·the·<tt>createDocument</tt>·method.</p> | 209 | <p>This·method·parses·XML·formatted·text·given·by·the··<em><em>xml</em></em>·argument·and·constructs·a·DOM·tree·for·the·document.··The·return·result·is·the·token·of·the·root·node·of·the·newly·created·document.··The·document·will·also·have·a·Tcl·command·associated·with·it,·see·the·<tt>createDocument</tt>·method.</p> |
210 | <p>This·method·uses·the·<a·href="http://tclxml.sourceforge.net/">TclXML</a>·package·to·perform·the·parsing·operation.··The·<tt>dom</tt>·package·itself·does·not·include·an·XML·parser.··TclXML·supports·the·use·of·multiple·parser·implementations.··The··<em>-parser</em>·may·be·used·to·specify·which·XML·parser·class·to·use.</p> | 210 | <p>This·method·uses·the·<a·href="http://tclxml.sourceforge.net/">TclXML</a>·package·to·perform·the·parsing·operation.··The·<tt>dom</tt>·package·itself·does·not·include·an·XML·parser.··TclXML·supports·the·use·of·multiple·parser·implementations.··The··<em>-parser</em>·may·be·used·to·specify·which·XML·parser·class·to·use.</p> |
211 | <p>All·options·not·listed·below·are·passed·to·the·TclXML·parser.</p> | 211 | <p>All·options·not·listed·below·are·passed·to·the·TclXML·parser.</p> |
212 | <p>Valid·configuration·options·are:</p> | 212 | <p>Valid·configuration·options·are:</p> |
213 | <dl> | 213 | <dl> |
214 | <span·class="term"><span·class="arg">-baseuri</span>·<span·class="arg"><em>URI</em></span></span><dd> | 214 | <span·class="term"><span·class="arg">-baseuri</span>·<span·class="arg"><em>URI</em></span></span><dd> |
215 | <p>Gives·the·Base·URI·for·the·document.·Any·relative·URIs·specified·in·the·document·are·resolved·against·the·given·base·URI.·Examples·of·relative·URIs·include·external·entity·references.</p> | 215 | <p>Gives·the·Base·URI·for·the·document.·Any·relative·URIs·specified·in·the·document·are·resolved·against·the·given·base·URI.·Examples·of·relative·URIs·include·external·entity·references.</p> |
Offset 217, 29 lines modified | Offset 217, 29 lines modified |
217 | </dd> | 217 | </dd> |
218 | <span·class="term"><span·class="arg">-parser</span>·<span·class="arg">·"<span·class="arg">{}</span>·|·<span·class="arg">libxml2</span>·|·<span·class="arg">tcl</span>"</span></span><dd><p>This·option·specifies·the·name·of·a·TclXML·parser·class·to·use·to·parse·the·XML·data.··The·given·parser·class·must·be·registered·with·the·TclXML·package.··If·an·empty·string·is·given·then·the·default·parser·class·is·used.··If·an·explicit·value·is·given·and·that·parser·class·is·not·registered·then·the·command·will·fail,·despite·the·fact·that·another·parser·may·be·available.</p></dd> | 218 | <span·class="term"><span·class="arg">-parser</span>·<span·class="arg">·"<span·class="arg">{}</span>·|·<span·class="arg">libxml2</span>·|·<span·class="arg">tcl</span>"</span></span><dd><p>This·option·specifies·the·name·of·a·TclXML·parser·class·to·use·to·parse·the·XML·data.··The·given·parser·class·must·be·registered·with·the·TclXML·package.··If·an·empty·string·is·given·then·the·default·parser·class·is·used.··If·an·explicit·value·is·given·and·that·parser·class·is·not·registered·then·the·command·will·fail,·despite·the·fact·that·another·parser·may·be·available.</p></dd> |
219 | <span·class="term"><span·class="arg">-progresscommand</span>·<span·class="arg"><em>script</em></span></span><dd><p>This·option·specifies·a·Tcl·command·to·be·invoked·from·time·to·time·while·the·DOM·tree·is·being·constructed.··The·script·will·be·invoked·after·a·certain·number·of·element·start·tags·have·been·processed,·given·by·the··<em>-chunksize</em>·option.</p></dd> | 219 | <span·class="term"><span·class="arg">-progresscommand</span>·<span·class="arg"><em>script</em></span></span><dd><p>This·option·specifies·a·Tcl·command·to·be·invoked·from·time·to·time·while·the·DOM·tree·is·being·constructed.··The·script·will·be·invoked·after·a·certain·number·of·element·start·tags·have·been·processed,·given·by·the··<em>-chunksize</em>·option.</p></dd> |
220 | <span·class="term"><span·class="arg">-chunksize</span>·<span·class="arg"><em>integer</em></span></span><dd><p>This·option·specifies·how·many·element·start·tags·to·process·before·invoking·the·script·given·by·the··<em>-progresscommand</em>·option.</p></dd> | 220 | <span·class="term"><span·class="arg">-chunksize</span>·<span·class="arg"><em>integer</em></span></span><dd><p>This·option·specifies·how·many·element·start·tags·to·process·before·invoking·the·script·given·by·the··<em>-progresscommand</em>·option.</p></dd> |
221 | </dl> | 221 | </dl> |
222 | </dd> | 222 | </dd> |
223 | <span·class="term"><span·class="methodname">selectNode</span></span><dd> | 223 | <span·class="term"><span·class="methodname">selectNode</span></span><dd> |
224 | <div·class="cmdsynopsis"·id="idm8589000"> | 224 | <div·class="cmdsynopsis"·id="idm8568520"> |
225 | <a·name="idm8589000"></a>selectNode·<em>token</em>·<em>xpath</em>·?option·value...?</div> | 225 | <a·name="idm8568520"></a>selectNode·<em>token</em>·<em>xpath</em>·?option·value...?</div> |
226 | <p>Resolves·the·XPath·location·path·given·by··<em><em>xpath</em></em>.···<em><em>token</em></em>·is·the·initial·context·for·the·location·path.··Returns·the·resulting·nodeset·as·a·(static)·Tcl·list.</p> | 226 | <p>Resolves·the·XPath·location·path·given·by··<em><em>xpath</em></em>.···<em><em>token</em></em>·is·the·initial·context·for·the·location·path.··Returns·the·resulting·nodeset·as·a·(static)·Tcl·list.</p> |
227 | <p>The·following·options·may·be·specified:</p> | 227 | <p>The·following·options·may·be·specified:</p> |
228 | <dl> | 228 | <dl> |
229 | <span·class="term">·<em>-namespaces</em></span><dd> | 229 | <span·class="term">·<em>-namespaces</em></span><dd> |
230 | <p>The·value·for·this·option·is·a·list·of·prefix-URI·pairs.··Each·of·these·pairs·defines·an·XML·Namespace·and·its·prefix·for·the·purposes·of·evaluating·the·XPath·expression.··The·document·itself·may·use·a·different·prefix·for·the·same·XML·Namespace.</p> | 230 | <p>The·value·for·this·option·is·a·list·of·prefix-URI·pairs.··Each·of·these·pairs·defines·an·XML·Namespace·and·its·prefix·for·the·purposes·of·evaluating·the·XPath·expression.··The·document·itself·may·use·a·different·prefix·for·the·same·XML·Namespace.</p> |
231 | <p>This·option·may·be·repeated,·in·which·case·the·lists·of·namespace·pairs·are·merged·and·all·of·the·XML·Namespaces·registered.</p> | 231 | <p>This·option·may·be·repeated,·in·which·case·the·lists·of·namespace·pairs·are·merged·and·all·of·the·XML·Namespaces·registered.</p> |
232 | </dd> | 232 | </dd> |
233 | </dl> | 233 | </dl> |
234 | <div·class="note"><p>Non-standard·method.</p></div> | 234 | <div·class="note"><p>Non-standard·method.</p></div> |
235 | </dd> | 235 | </dd> |
236 | <span·class="term"><span·class="methodname">serialize</span></span><dd> | 236 | <span·class="term"><span·class="methodname">serialize</span></span><dd> |
237 | <div·class="cmdsynopsis"·id="idm8578760"> | 237 | <div·class="cmdsynopsis"·id="idm8558280"> |
238 | <a·name="idm8578760"></a>serialize·<em>token</em>·"<em>option</em>·<em>value</em>"</div> | 238 | <a·name="idm8558280"></a>serialize·<em>token</em>·"<em>option</em>·<em>value</em>"</div> |
239 | <p>This·method·returns·the·XML·formatted·text·corresponding·to·the·node·given·by··<em>token</em>.··The·text·is·guaranteed·to·be·a·well-formed·XML·document,·unless·the··<em>-method</em>·option·specifies·a·non-XML·output·method.</p> | 239 | <p>This·method·returns·the·XML·formatted·text·corresponding·to·the·node·given·by··<em>token</em>.··The·text·is·guaranteed·to·be·a·well-formed·XML·document,·unless·the··<em>-method</em>·option·specifies·a·non-XML·output·method.</p> |
240 | <p>Valid·configuration·options·are:</p> | 240 | <p>Valid·configuration·options·are:</p> |
241 | <dl> | 241 | <dl> |
242 | <span·class="term"><span·class="arg">-method</span>·<span·class="arg">xml|html|text</span></span><dd><p>Specifies·how·the·document·tree·is·to·be·serialized·as·text.··The·allowed·values·correspond·to·the·output·methods·defined·by·the·XSLT·v1.0·W3C·Recommendation.··The·<span·class="literal">xml</span>·method·produces·output·that·conforms·to·the·XML·syntax.··The·<span·class="literal">html</span>·method·produces·output·that·conforms·to·HTML·syntax.··The·<span·class="literal">text</span>·method·serializes·only·the·text·nodes·of·the·document·and·disables·all·output·escaping.</p></dd> | 242 | <span·class="term"><span·class="arg">-method</span>·<span·class="arg">xml|html|text</span></span><dd><p>Specifies·how·the·document·tree·is·to·be·serialized·as·text.··The·allowed·values·correspond·to·the·output·methods·defined·by·the·XSLT·v1.0·W3C·Recommendation.··The·<span·class="literal">xml</span>·method·produces·output·that·conforms·to·the·XML·syntax.··The·<span·class="literal">html</span>·method·produces·output·that·conforms·to·HTML·syntax.··The·<span·class="literal">text</span>·method·serializes·only·the·text·nodes·of·the·document·and·disables·all·output·escaping.</p></dd> |
243 | <span·class="term"><span·class="arg">-indent</span>·<span·class="arg"><em>boolean</em></span></span><dd><p>Specifies·that·the·output·is·to·be·"pretty-printed",·ie.·element·content·is·indented·to·provide·a·visual·indication·of·nesting·levels.</p></dd> | 243 | <span·class="term"><span·class="arg">-indent</span>·<span·class="arg"><em>boolean</em></span></span><dd><p>Specifies·that·the·output·is·to·be·"pretty-printed",·ie.·element·content·is·indented·to·provide·a·visual·indication·of·nesting·levels.</p></dd> |
244 | <span·class="term"><span·class="arg">-encoding</span>·<span·class="arg"><em>encoding</em></span></span><dd><p>Specifies·that·the·output·is·to·be·encoded·using·the·given·character·encoding.··If·the·encoding·is·<span·class="literal">utf-8</span>·(the·default)·then·the·output·is·treated·as·a·string·within·Tcl.··If·any·other·encoding·is·specified·then·the·output·is·treated·as·a·ByteArray·object·(ie.·as·binary).</p></dd> | 244 | <span·class="term"><span·class="arg">-encoding</span>·<span·class="arg"><em>encoding</em></span></span><dd><p>Specifies·that·the·output·is·to·be·encoded·using·the·given·character·encoding.··If·the·encoding·is·<span·class="literal">utf-8</span>·(the·default)·then·the·output·is·treated·as·a·string·within·Tcl.··If·any·other·encoding·is·specified·then·the·output·is·treated·as·a·ByteArray·object·(ie.·as·binary).</p></dd> |
245 | <span·class="term"><span·class="arg">-newline</span>·<span·class="arg"><em>elementlist</em></span></span><dd> | 245 | <span·class="term"><span·class="arg">-newline</span>·<span·class="arg"><em>elementlist</em></span></span><dd> |
Offset 279, 37 lines modified | Offset 279, 37 lines modified |
| |
279 | </pre></div> | 279 | </pre></div> |
280 | </pre></div></pre></div> | 280 | </pre></div></pre></div> |
281 | </dd> | 281 | </dd> |
282 | </dl> | 282 | </dl> |
283 | </dd> | 283 | </dd> |
284 | <span·class="term"><span·class="methodname">trim</span></span><dd> | 284 | <span·class="term"><span·class="methodname">trim</span></span><dd> |
285 | <div·class="cmdsynopsis"·id="idm8508360"> | 285 | <div·class="cmdsynopsis"·id="idm8487880"> |
286 | <a·name="idm8508360"></a>trim·<em>token</em> | 286 | <a·name="idm8487880"></a>trim·<em>token</em> |
287 | </div> | 287 | </div> |
288 | <p>This·method·removes·any·node·containing·only·white·space·from·the·document·tree·of·the·node·given·by··<em><em>token</em></em>.</p> | 288 | <p>This·method·removes·any·node·containing·only·white·space·from·the·document·tree·of·the·node·given·by··<em><em>token</em></em>.</p> |
289 | </dd> | 289 | </dd> |
290 | </dl> | 290 | </dl> |
291 | </div> | 291 | </div> |
292 | </div> | 292 | </div> |
293 | <div·class="refsect2"> | 293 | <div·class="refsect2"> |
294 | <h3> | 294 | <h3> |
295 | <a·name="idm8505288"></a><strong>::dom::document</strong> | 295 | <a·name="idm8484808"></a><strong>::dom::document</strong> |
296 | </h3> | 296 | </h3> |
297 | <p>This·command·implements·the·Document·interface·in·the·DOM·specification.··The·most·important·aspect·of·this·command·are·its·factory·methods·for·creating·nodes.</p> | 297 | <p>This·command·implements·the·Document·interface·in·the·DOM·specification.··The·most·important·aspect·of·this·command·are·its·factory·methods·for·creating·nodes.</p> |
298 | <p>The·methods·accepted·by·this·command·are·as·follows:</p> | 298 | <p>The·methods·accepted·by·this·command·are·as·follows:</p> |
299 | <dl> | 299 | <dl> |
300 | <span·class="term"><span·class="methodname">cget</span></span><dd> | 300 | <span·class="term"><span·class="methodname">cget</span></span><dd> |
301 | <div·class="cmdsynopsis"·id="idm8501576"> | 301 | <div·class="cmdsynopsis"·id="idm8481096"> |
302 | <a·name="idm8501576"></a><span·class="methodname">cget</span><em>token</em>·-option</div> | 302 | <a·name="idm8481096"></a><span·class="methodname">cget</span><em>token</em>·-option</div> |
303 | <p>This·method·returns·the·value·of·the·given·configuration·option.</p> | 303 | <p>This·method·returns·the·value·of·the·given·configuration·option.</p> |
304 | </dd> | 304 | </dd> |
305 | <span·class="term"><span·class="methodname">configure</span></span><dd> | 305 | <span·class="term"><span·class="methodname">configure</span></span><dd> |
306 | <div·class="cmdsynopsis"·id="idm8497736"> | 306 | <div·class="cmdsynopsis"·id="idm8477256"> |
307 | <a·name="idm8497736"></a><span·class="methodname">configure</span><em>token</em>·"<em>option</em>·<em>value</em>..."</div> | 307 | <a·name="idm8477256"></a><span·class="methodname">configure</span><em>token</em>·"<em>option</em>·<em>value</em>..."</div> |
308 | <p>This·method·sets·the·value·of·the·given·configuration·options.</p> | 308 | <p>This·method·sets·the·value·of·the·given·configuration·options.</p> |
309 | <p>Valid·configuration·options·are:</p> | 309 | <p>Valid·configuration·options·are:</p> |
310 | <dl> | 310 | <dl> |
311 | <span·class="term"><span·class="arg">-doctype</span></span><dd> | 311 | <span·class="term"><span·class="arg">-doctype</span></span><dd> |
312 | <p>Specifies·the·token·of·the·Document·Type·Declaration·node.</p> | 312 | <p>Specifies·the·token·of·the·Document·Type·Declaration·node.</p> |
313 | <p>This·is·a·read-only·option.··Use·the·factory·method·to·create·a·Document·Type·Declaration·node.</p> | 313 | <p>This·is·a·read-only·option.··Use·the·factory·method·to·create·a·Document·Type·Declaration·node.</p> |
314 | </dd> | 314 | </dd> |
Offset 324, 143 lines modified | Offset 324, 143 lines modified |
324 | <span·class="term"><span·class="arg">-implementation</span></span><dd> | 324 | <span·class="term"><span·class="arg">-implementation</span></span><dd> |
325 | <p>Specifies·the·token·of·the·document's·implementation.</p> | 325 | <p>Specifies·the·token·of·the·document's·implementation.</p> |
326 | <p>This·is·a·read-only·option.</p> | 326 | <p>This·is·a·read-only·option.</p> |
327 | </dd> | 327 | </dd> |
328 | </dl> | 328 | </dl> |
329 | </dd> | 329 | </dd> |
330 | <span·class="term"><span·class="methodname">createElement</span></span><dd> | 330 | <span·class="term"><span·class="methodname">createElement</span></span><dd> |
331 | <div·class="cmdsynopsis"·id="idm8480712"> | 331 | <div·class="cmdsynopsis"·id="idm8460232"> |
332 | <a·name="idm8480712"></a><span·class="methodname">createElement</span><em>token</em>·<em>type</em> | 332 | <a·name="idm8460232"></a><span·class="methodname">createElement</span><em>token</em>·<em>type</em> |
333 | </div> | 333 | </div> |
334 | <p>This·method·creates·an·element·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·element·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·element's·type·is·given·by·the··<em><em>type</em></em>·argument.··The·new·element·is·created·with·an·empty·attribute·list.</p> | 334 | <p>This·method·creates·an·element·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·element·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·element's·type·is·given·by·the··<em><em>type</em></em>·argument.··The·new·element·is·created·with·an·empty·attribute·list.</p> |
335 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> | 335 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> |
336 | </dd> | 336 | </dd> |
337 | <span·class="term"><span·class="methodname">createElementNS</span></span><dd> | 337 | <span·class="term"><span·class="methodname">createElementNS</span></span><dd> |
338 | <div·class="cmdsynopsis"·id="idm8473544"> | 338 | <div·class="cmdsynopsis"·id="idm8453064"> |
339 | <a·name="idm8473544"></a><span·class="methodname">createElementNS</span><em>token</em>·<em>nsuri</em>·<em>qualname</em> | 339 | <a·name="idm8453064"></a><span·class="methodname">createElementNS</span><em>token</em>·<em>nsuri</em>·<em>qualname</em> |
340 | </div> | 340 | </div> |
341 | <p>This·method·creates·an·element·node·in·an·XML·Namespace·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·element·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·element·is·created·in·the·XML·Namespace·given·by·the·namespace·URI··<em><em>nsuri</em></em>.··The·new·element's·qualifed·name·(QName)·is·given·by·the··<em><em>qualname</em></em>·argument.··Qualified·names·have·the·form·<span·class="literal">prefix:local-part</span>.··The·new·element·is·created·with·an·empty·attribute·list.</p> | 341 | <p>This·method·creates·an·element·node·in·an·XML·Namespace·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·element·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·element·is·created·in·the·XML·Namespace·given·by·the·namespace·URI··<em><em>nsuri</em></em>.··The·new·element's·qualifed·name·(QName)·is·given·by·the··<em><em>qualname</em></em>·argument.··Qualified·names·have·the·form·<span·class="literal">prefix:local-part</span>.··The·new·element·is·created·with·an·empty·attribute·list.</p> |
342 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> | 342 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> |
343 | </dd> | 343 | </dd> |
344 | <span·class="term"><span·class="methodname">createDocumentFragment</span></span><dd> | 344 | <span·class="term"><span·class="methodname">createDocumentFragment</span></span><dd> |
345 | <div·class="cmdsynopsis"·id="idm8464712"> | 345 | <div·class="cmdsynopsis"·id="idm8444232"> |
346 | <a·name="idm8464712"></a><span·class="methodname">createDocumentFragment</span><em>token</em> | 346 | <a·name="idm8444232"></a><span·class="methodname">createDocumentFragment</span><em>token</em> |
347 | </div> | 347 | </div> |
348 | <p>This·method·creates·a·documentFragment·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.</p> | 348 | <p>This·method·creates·a·documentFragment·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.</p> |
349 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> | 349 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> |
350 | </dd> | 350 | </dd> |
351 | <span·class="term"><span·class="methodname">createTextNode</span></span><dd> | 351 | <span·class="term"><span·class="methodname">createTextNode</span></span><dd> |
352 | <div·class="cmdsynopsis"·id="idm8459464"> | 352 | <div·class="cmdsynopsis"·id="idm8438984"> |
353 | <a·name="idm8459464"></a><span·class="methodname">createTextNode</span><em>token</em>·<em>text</em> | 353 | <a·name="idm8438984"></a><span·class="methodname">createTextNode</span><em>token</em>·<em>text</em> |
354 | </div> | 354 | </div> |
355 | <p>This·method·creates·a·textNode·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·textNode·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·textNode·is·created·with·its·value·set·to··<em><em>text</em></em>.</p> | 355 | <p>This·method·creates·a·textNode·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·textNode·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·textNode·is·created·with·its·value·set·to··<em><em>text</em></em>.</p> |
356 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> | 356 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> |
357 | </dd> | 357 | </dd> |
358 | <span·class="term"><span·class="methodname">createComment</span></span><dd> | 358 | <span·class="term"><span·class="methodname">createComment</span></span><dd> |
359 | <div·class="cmdsynopsis"·id="idm8452296"> | 359 | <div·class="cmdsynopsis"·id="idm8431816"> |
360 | <a·name="idm8452296"></a><span·class="methodname">createComment</span><em>token</em>·<em>data</em> | 360 | <a·name="idm8431816"></a><span·class="methodname">createComment</span><em>token</em>·<em>data</em> |
361 | </div> | 361 | </div> |
362 | <p>This·method·creates·a·comment·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·comment·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·comment·is·created·with·its·value·set·to··<em><em>data</em></em>.</p> | 362 | <p>This·method·creates·a·comment·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·comment·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·comment·is·created·with·its·value·set·to··<em><em>data</em></em>.</p> |
363 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> | 363 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> |
364 | </dd> | 364 | </dd> |
365 | <span·class="term"><span·class="methodname">createCDATASection</span></span><dd> | 365 | <span·class="term"><span·class="methodname">createCDATASection</span></span><dd> |
366 | <div·class="cmdsynopsis"·id="idm8445128"> | 366 | <div·class="cmdsynopsis"·id="idm8424648"> |
367 | <a·name="idm8445128"></a><span·class="methodname">createCDATASection</span><em>token</em>·<em>text</em> | 367 | <a·name="idm8424648"></a><span·class="methodname">createCDATASection</span><em>token</em>·<em>text</em> |
368 | </div> | 368 | </div> |
369 | <p>TclDOM·does·not·distinguish·between·textNodes·and·CDATASection·nodes.··Accordingly,·this·method·creates·a·textNode·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·textNode·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·node·is·created·with·its·value·set·to··<em><em>text</em></em>·and·has·the·attribute··<em>-cdatasection</em>·set·to·the·value·<span·class="literal">1</span>.</p> | 369 | <p>TclDOM·does·not·distinguish·between·textNodes·and·CDATASection·nodes.··Accordingly,·this·method·creates·a·textNode·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·textNode·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·node·is·created·with·its·value·set·to··<em><em>text</em></em>·and·has·the·attribute··<em>-cdatasection</em>·set·to·the·value·<span·class="literal">1</span>.</p> |
370 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> | 370 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> |
371 | </dd> | 371 | </dd> |
372 | <span·class="term"><span·class="methodname">createProcessingInstruction</span></span><dd> | 372 | <span·class="term"><span·class="methodname">createProcessingInstruction</span></span><dd> |
373 | <div·class="cmdsynopsis"·id="idm8437192"> | 373 | <div·class="cmdsynopsis"·id="idm8416712"> |
374 | <a·name="idm8437192"></a><span·class="methodname">createProcessingInstruction</span><em>token</em>·<em>target</em>·<em>data</em> | 374 | <a·name="idm8416712"></a><span·class="methodname">createProcessingInstruction</span><em>token</em>·<em>target</em>·<em>data</em> |
375 | </div> | 375 | </div> |
376 | <p>This·method·creates·a·processingInstruction·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·processingInstruction·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·node·is·created·with·its·name·set·to··<em><em>target</em></em>·and·its·value·set·to··<em><em>data</em></em>.</p> | 376 | <p>This·method·creates·a·processingInstruction·node·as·a·child·of·the·given·node·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element,·document·or·documentFragment.··The·new,·child·processingInstruction·is·added·as·the·last·child·of··<em><em>token</em></em>'s·list·of·children.··The·new·node·is·created·with·its·name·set·to··<em><em>target</em></em>·and·its·value·set·to··<em><em>data</em></em>.</p> |
377 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> | 377 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> |
378 | </dd> | 378 | </dd> |
379 | <span·class="term"><span·class="methodname">createAttribute</span></span><dd> | 379 | <span·class="term"><span·class="methodname">createAttribute</span></span><dd> |
380 | <div·class="cmdsynopsis"·id="idm8428872"> | 380 | <div·class="cmdsynopsis"·id="idm8408392"> |
381 | <a·name="idm8428872"></a><span·class="methodname">createAttribute</span><em>token</em>·<em>name</em> | 381 | <a·name="idm8408392"></a><span·class="methodname">createAttribute</span><em>token</em>·<em>name</em> |
382 | </div> | 382 | </div> |
383 | <p>This·method·creates·an·attribute·node·for·the·given·element·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element.··The·new·attribute·is·created·with·its·name·set·to··<em><em>name</em></em>·and·an·empty·value.</p> | 383 | <p>This·method·creates·an·attribute·node·for·the·given·element·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·element.··The·new·attribute·is·created·with·its·name·set·to··<em><em>name</em></em>·and·an·empty·value.</p> |
384 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> | 384 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::node</strong>·command.</p> |
385 | <div·class="note"><p>This·method·is·included·for·completeness·with·respect·to·the·DOM·specification.··The·preferred·method·for·setting·element·attributes·is·to·use·the·<strong>::dom::element</strong>·command.</p></div> | 385 | <div·class="note"><p>This·method·is·included·for·completeness·with·respect·to·the·DOM·specification.··The·preferred·method·for·setting·element·attributes·is·to·use·the·<strong>::dom::element</strong>·command.</p></div> |
386 | </dd> | 386 | </dd> |
387 | <span·class="term"><span·class="methodname">createEntity</span></span><dd> | 387 | <span·class="term"><span·class="methodname">createEntity</span></span><dd> |
388 | <div·class="cmdsynopsis"·id="idm8421192"> | 388 | <div·class="cmdsynopsis"·id="idm8400712"> |
389 | <a·name="idm8421192"></a><span·class="methodname">createEntity</span><em>token</em> | 389 | <a·name="idm8400712"></a><span·class="methodname">createEntity</span><em>token</em> |
390 | </div> | 390 | </div> |
391 | <p>Not·currently·implemented.</p> | 391 | <p>Not·currently·implemented.</p> |
392 | </dd> | 392 | </dd> |
393 | <span·class="term"><span·class="methodname">createEntityReference</span></span><dd> | 393 | <span·class="term"><span·class="methodname">createEntityReference</span></span><dd> |
394 | <div·class="cmdsynopsis"·id="idm8417736"> | 394 | <div·class="cmdsynopsis"·id="idm8397256"> |
395 | <a·name="idm8417736"></a><span·class="methodname">createEntityReference</span><em>token</em>·<em>name</em> | 395 | <a·name="idm8397256"></a><span·class="methodname">createEntityReference</span><em>token</em>·<em>name</em> |
396 | </div> | 396 | </div> |
397 | <p>Not·currently·implemented.</p> | 397 | <p>Not·currently·implemented.</p> |
398 | </dd> | 398 | </dd> |
399 | <span·class="term"><span·class="methodname">createEvent</span></span><dd> | 399 | <span·class="term"><span·class="methodname">createEvent</span></span><dd> |
400 | <div·class="cmdsynopsis"·id="idm8413512"> | 400 | <div·class="cmdsynopsis"·id="idm8393032"> |
401 | <a·name="idm8413512"></a><span·class="methodname">createEvent</span><em>token</em>·<em>name</em> | 401 | <a·name="idm8393032"></a><span·class="methodname">createEvent</span><em>token</em>·<em>name</em> |
402 | </div> | 402 | </div> |
403 | <p>This·method·creates·an·event·node·in·the·document·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·document.··The·event·type·is·specified·by··<em><em>name</em></em>.</p> | 403 | <p>This·method·creates·an·event·node·in·the·document·specified·by··<em><em>token</em></em>·and·returns·the·new·node's·token·as·its·result.···<em><em>token</em></em>·must·be·a·node·of·type·document.··The·event·type·is·specified·by··<em><em>name</em></em>.</p> |
404 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::event</strong>·command.</p> | 404 | <p>A·Tcl·command·is·created·with·the·same·name·as·the·new·node's·token.··This·command·is·a·shortcut·for·the·<strong>::dom::event</strong>·command.</p> |
405 | </dd> | 405 | </dd> |
406 | <span·class="term"><span·class="methodname">getElementsByTagName</span></span><dd> | 406 | <span·class="term"><span·class="methodname">getElementsByTagName</span></span><dd> |
407 | <div·class="cmdsynopsis"·id="idm8406984"> | 407 | <div·class="cmdsynopsis"·id="idm8386504"> |
408 | <a·name="idm8406984"></a><span·class="methodname">getElementsByTagName</span><em>token</em>·<em>name</em> | 408 | <a·name="idm8386504"></a><span·class="methodname">getElementsByTagName</span><em>token</em>·<em>name</em> |
409 | </div> | 409 | </div> |
410 | <p>This·method·searches·the·node·given·by·the·argument··<em><em>token</em></em>·for·child·elements·with·a·type·matching·the·argument··<em><em>name</em></em>.··The·name·<span·class="literal">*</span>·matches·all·elements.··All·descendants·of··<em><em>token</em></em>·are·searched.··This·method·returns·a·"live-list";·the·return·result·of·this·method·is·the·name·of·a·Tcl·variable,·the·content·of·which·is·a·Tcl·list·containing·tokens·for·all·elements·that·match.</p> | 410 | <p>This·method·searches·the·node·given·by·the·argument··<em><em>token</em></em>·for·child·elements·with·a·type·matching·the·argument··<em><em>name</em></em>.··The·name·<span·class="literal">*</span>·matches·all·elements.··All·descendants·of··<em><em>token</em></em>·are·searched.··This·method·returns·a·"live-list";·the·return·result·of·this·method·is·the·name·of·a·Tcl·variable,·the·content·of·which·is·a·Tcl·list·containing·tokens·for·all·elements·that·match.</p> |
411 | </dd> | 411 | </dd> |
412 | <span·class="term"><span·class="methodname">dtd</span></span><dd> | 412 | <span·class="term"><span·class="methodname">dtd</span></span><dd> |
413 | <div·class="cmdsynopsis"·id="idm8400840"> | 413 | <div·class="cmdsynopsis"·id="idm8380360"> |
414 | <a·name="idm8400840"></a><span·class="methodname">dtd</span>validate</div> | 414 | <a·name="idm8380360"></a><span·class="methodname">dtd</span>validate</div> |
415 | <p>This·method·performs·DTD·validation·upon·the·document.··If·the·method·returns·successfully,·then·the·document·is·valid.··Otherwise·the·document·is·invalid·and·the·error·returned·contains·the·reason.</p> | 415 | <p>This·method·performs·DTD·validation·upon·the·document.··If·the·method·returns·successfully,·then·the·document·is·valid.··Otherwise·the·document·is·invalid·and·the·error·returned·contains·the·reason.</p> |
416 | </dd> | 416 | </dd> |
417 | <span·class="term"><span·class="methodname">relaxng</span></span><dd> | 417 | <span·class="term"><span·class="methodname">relaxng</span></span><dd> |
418 | <div·class="cmdsynopsis"·id="idm8397768"> | 418 | <div·class="cmdsynopsis"·id="idm8377288"> |
419 | <a·name="idm8397768"></a><span·class="methodname"><em>submethod</em></span>·?<em>args</em>...?</div> | 419 | <a·name="idm8377288"></a><span·class="methodname"><em>submethod</em></span>·?<em>args</em>...?</div> |
420 | <p>This·method·performs·RELAX·NG·Schema·validation·upon·the·document.··RELAX·NG·Schema·validation·is·performed·in·two·steps.··First·the·document·is·compiled·into·a·schema·document.··Second,·the·schema·document·is·used·to·schema-validate·an·instance·document.</p> | 420 | <p>This·method·performs·RELAX·NG·Schema·validation·upon·the·document.··RELAX·NG·Schema·validation·is·performed·in·two·steps.··First·the·document·is·compiled·into·a·schema·document.··Second,·the·schema·document·is·used·to·schema-validate·an·instance·document.</p> |
421 | <p>Example:</p> | 421 | <p>Example:</p> |
422 | <div·class="informalexample"><pre><div·class="programlisting"><pre> | 422 | <div·class="informalexample"><pre><div·class="programlisting"><pre> |
423 | set·schema·[dom::parse·$XML] | 423 | set·schema·[dom::parse·$XML] |
424 | $schema·relaxng·compile | 424 | $schema·relaxng·compile |
425 | set·instance·[dom::parse·$XML2] | 425 | set·instance·[dom::parse·$XML2] |
426 | $schema·relaxng·validate·$instance | 426 | $schema·relaxng·validate·$instance |
427 | </pre></div></pre></div> | 427 | </pre></div></pre></div> |
428 | <p>If·the·document·is·changed·after·compiling,·then·schema·document·must·be·recompiled.</p> | 428 | <p>If·the·document·is·changed·after·compiling,·then·schema·document·must·be·recompiled.</p> |
429 | </dd> | 429 | </dd> |
430 | <span·class="term"><span·class="methodname">schema</span></span><dd> | 430 | <span·class="term"><span·class="methodname">schema</span></span><dd> |
431 | <div·class="cmdsynopsis"·id="idm8391624"> | 431 | <div·class="cmdsynopsis"·id="idm8371144"> |
432 | <a·name="idm8391624"></a><span·class="methodname"><em>submethod</em></span>·?<em>args</em>...?</div> | 432 | <a·name="idm8371144"></a><span·class="methodname"><em>submethod</em></span>·?<em>args</em>...?</div> |
433 | <p>This·method·performs·XML·Schema·validation·upon·the·document.··Schema·validation·is·performed·in·two·steps.··First·the·document·is·compiled·into·a·schema·document.··Second,·the·schema·document·is·used·to·schema-validate·an·instance·document.</p> | 433 | <p>This·method·performs·XML·Schema·validation·upon·the·document.··Schema·validation·is·performed·in·two·steps.··First·the·document·is·compiled·into·a·schema·document.··Second,·the·schema·document·is·used·to·schema-validate·an·instance·document.</p> |
434 | <p>Example:</p> | 434 | <p>Example:</p> |
435 | <div·class="informalexample"><pre><div·class="programlisting"><pre> | 435 | <div·class="informalexample"><pre><div·class="programlisting"><pre> |
436 | set·schema·[dom::parse·$XML] | 436 | set·schema·[dom::parse·$XML] |
437 | $schema·schema·compile | 437 | $schema·schema·compile |
438 | set·instance·[dom::parse·$XML2] | 438 | set·instance·[dom::parse·$XML2] |
439 | $schema·schema·validate·$instance | 439 | $schema·schema·validate·$instance |
440 | </pre></div></pre></div> | 440 | </pre></div></pre></div> |
441 | <p>If·the·document·is·changed·after·compiling,·then·schema·document·must·be·recompiled.</p> | 441 | <p>If·the·document·is·changed·after·compiling,·then·schema·document·must·be·recompiled.</p> |
442 | </dd> | 442 | </dd> |
443 | </dl> | 443 | </dl> |
444 | </div> | 444 | </div> |
445 | <div·class="refsect2"> | 445 | <div·class="refsect2"> |
446 | <h3> | 446 | <h3> |
447 | <a·name="idm8386504"></a><strong>dom::node</strong> | 447 | <a·name="idm8366024"></a><strong>dom::node</strong> |
448 | </h3> | 448 | </h3> |
449 | <p>This·command·implements·generic·functions·for·DOM·nodes.</p> | 449 | <p>This·command·implements·generic·functions·for·DOM·nodes.</p> |
450 | <p>The·methods·accepted·by·this·command·are·as·follows:</p> | 450 | <p>The·methods·accepted·by·this·command·are·as·follows:</p> |
451 | <dl> | 451 | <dl> |
452 | <span·class="term"><span·class="methodname">cget</span></span><dd> | 452 | <span·class="term"><span·class="methodname">cget</span></span><dd> |
453 | <div·class="cmdsynopsis"·id="idm8382792"> | 453 | <div·class="cmdsynopsis"·id="idm8362312"> |
454 | <a·name="idm8382792"></a><span·class="methodname">cget</span><em>token</em>·option</div> | 454 | <a·name="idm8362312"></a><span·class="methodname">cget</span><em>token</em>·option</div> |
455 | <p>This·method·returns·the·value·of·the·given·configuration·option·for·the·node·given·by··<em><em>token</em></em>.</p> | 455 | <p>This·method·returns·the·value·of·the·given·configuration·option·for·the·node·given·by··<em><em>token</em></em>.</p> |
456 | </dd> | 456 | </dd> |
457 | <span·class="term"><span·class="methodname">configure</span></span><dd> | 457 | <span·class="term"><span·class="methodname">configure</span></span><dd> |
458 | <div·class="cmdsynopsis"·id="idm8378440"> | 458 | <div·class="cmdsynopsis"·id="idm8357960"> |
459 | <a·name="idm8378440"></a><span·class="methodname">configure</span><em>token</em>·"<em>option</em>·<em>value</em>..."</div> | 459 | <a·name="idm8357960"></a><span·class="methodname">configure</span><em>token</em>·"<em>option</em>·<em>value</em>..."</div> |
460 | <p>This·method·sets·the·value·of·the·given·configuration·option·for·the·node·given·by··<em><em>token</em></em>.</p> | 460 | <p>This·method·sets·the·value·of·the·given·configuration·option·for·the·node·given·by··<em><em>token</em></em>.</p> |
461 | <p>Valid·configuration·options·are·as·follows:</p> | 461 | <p>Valid·configuration·options·are·as·follows:</p> |
462 | <dl> | 462 | <dl> |
463 | <span·class="term"><span·class="arg">-nodeName</span></span><dd> | 463 | <span·class="term"><span·class="arg">-nodeName</span></span><dd> |
464 | <p>Returns·the·node·name.··This·is·a·read-only·option.</p> | 464 | <p>Returns·the·node·name.··This·is·a·read-only·option.</p> |
465 | <p>The·DOM·specification·gives·the·meaning·of·names·for·different·types·of·nodes.··For·example,·the··<em>-nodeName</em>·option·of·an·element·node·is·the·element·type.</p> | 465 | <p>The·DOM·specification·gives·the·meaning·of·names·for·different·types·of·nodes.··For·example,·the··<em>-nodeName</em>·option·of·an·element·node·is·the·element·type.</p> |
466 | </dd> | 466 | </dd> |
Offset 473, 254 lines modified | Offset 473, 254 lines modified |
473 | <span·class="term">·<em>-nextSibling</em></span><dd><p>Returns·the·parent's·child·node·which·appears·after·this·node.··If·this·child·is·the·last·child·of·its·parent·then·returns·an·empty·string.··This·is·a·read-only·option.</p></dd> | 473 | <span·class="term">·<em>-nextSibling</em></span><dd><p>Returns·the·parent's·child·node·which·appears·after·this·node.··If·this·child·is·the·last·child·of·its·parent·then·returns·an·empty·string.··This·is·a·read-only·option.</p></dd> |
474 | <span·class="term">·<em>-attributes</em></span><dd><p>Returns·the·name·of·a·Tcl·array·variable·which·contains·the·attribute·list·for·an·element·node.··If·the·node·is·not·an·element·type·node·then·returns·an·empty·string.··The·indices·of·the·array·are·attribute·names,·and·the·values·of·the·array·elements·are·their·corresponding·attribute·values.··This·is·a·read-only·option.</p></dd> | 474 | <span·class="term">·<em>-attributes</em></span><dd><p>Returns·the·name·of·a·Tcl·array·variable·which·contains·the·attribute·list·for·an·element·node.··If·the·node·is·not·an·element·type·node·then·returns·an·empty·string.··The·indices·of·the·array·are·attribute·names,·and·the·values·of·the·array·elements·are·their·corresponding·attribute·values.··This·is·a·read-only·option.</p></dd> |
475 | <span·class="term">·<em>-nodeValue</em><span·class="arg"><em>data</em></span></span><dd><p>Specifies·the·value·of·a·node.··The·DOM·specification·gives·the·meaning·of·values·for·different·types·of·nodes.··For·example,·the··<em>-nodeValue</em>·option·of·a·textNode·node·is·the·node's·text.</p></dd> | 475 | <span·class="term">·<em>-nodeValue</em><span·class="arg"><em>data</em></span></span><dd><p>Specifies·the·value·of·a·node.··The·DOM·specification·gives·the·meaning·of·values·for·different·types·of·nodes.··For·example,·the··<em>-nodeValue</em>·option·of·a·textNode·node·is·the·node's·text.</p></dd> |
476 | <span·class="term">·<em>-id</em></span><dd><p>Read-only.·Returns·a·unique·identifier·for·the·node.·The·same·identifier·is·always·returned·for·the·same·node.</p></dd> | 476 | <span·class="term">·<em>-id</em></span><dd><p>Read-only.·Returns·a·unique·identifier·for·the·node.·The·same·identifier·is·always·returned·for·the·same·node.</p></dd> |
477 | </dl> | 477 | </dl> |
478 | </dd> | 478 | </dd> |
479 | <span·class="term"><span·class="methodname">insertBefore</span></span><dd> | 479 | <span·class="term"><span·class="methodname">insertBefore</span></span><dd> |
480 | <div·class="cmdsynopsis"·id="idp12682808"> | 480 | <div·class="cmdsynopsis"·id="idp12703288"> |
481 | <a·name="idp12682808"></a><span·class="methodname">insertBefore</span><em>token</em>·<em>newchild</em>·<em>refchild</em> | 481 | <a·name="idp12703288"></a><span·class="methodname">insertBefore</span><em>token</em>·<em>newchild</em>·<em>refchild</em> |
482 | </div> | 482 | </div> |
483 | <p>This·method·removes·the·node·given·by··<em><em>newchild</em></em>·from·its·parent.··If·no··<em><em>refchild</em></em>·argument·is·given·then··<em><em>newchild</em></em>·is·appended·to··<em><em>token</em></em>'s·list·of·children.··If·the··<em><em>refchild</em></em>·argument·is·given·then·this·method·adds··<em><em>newchild</em></em>·as·a·child·of··<em><em>token</em></em>.··The·new·child·node·is·positioned·before·the·node··<em><em>refchild</em></em>·in··<em><em>token</em></em>'s·list·of·children.··Returns·an·empty·string.</p> | 483 | <p>This·method·removes·the·node·given·by··<em><em>newchild</em></em>·from·its·parent.··If·no··<em><em>refchild</em></em>·argument·is·given·then··<em><em>newchild</em></em>·is·appended·to··<em><em>token</em></em>'s·list·of·children.··If·the··<em><em>refchild</em></em>·argument·is·given·then·this·method·adds··<em><em>newchild</em></em>·as·a·child·of··<em><em>token</em></em>.··The·new·child·node·is·positioned·before·the·node··<em><em>refchild</em></em>·in··<em><em>token</em></em>'s·list·of·children.··Returns·an·empty·string.</p> |
484 | </dd> | 484 | </dd> |
485 | <span·class="term"><span·class="methodname">replaceChild</span></span><dd> | 485 | <span·class="term"><span·class="methodname">replaceChild</span></span><dd> |
486 | <div·class="cmdsynopsis"·id="idp12692536"> | 486 | <div·class="cmdsynopsis"·id="idp12713016"> |
487 | <a·name="idp12692536"></a><span·class="methodname">replaceChild</span><em>token</em>·<em>newchild</em>·<em>oldchild</em> | 487 | <a·name="idp12713016"></a><span·class="methodname">replaceChild</span><em>token</em>·<em>newchild</em>·<em>oldchild</em> |
488 | </div> | 488 | </div> |
489 | <p>This·method·removes·the·node·given·by··<em><em>newchild</em></em>·from·its·parent.··It·then·also·removes·the·node·given·by··<em><em>oldchild</em></em>·from··<em><em>token</em></em>.···<em><em>newchild</em></em>·is·then·added·as·a·child·of··<em><em>token</em></em>·in··<em><em>oldchild</em></em>'s·original·position·in·the·list·of·children.··The·method·returns·the·token··<em><em>oldchild</em></em>,·which·will·now·have·no·parent.</p> | 489 | <p>This·method·removes·the·node·given·by··<em><em>newchild</em></em>·from·its·parent.··It·then·also·removes·the·node·given·by··<em><em>oldchild</em></em>·from··<em><em>token</em></em>.···<em><em>newchild</em></em>·is·then·added·as·a·child·of··<em><em>token</em></em>·in··<em><em>oldchild</em></em>'s·original·position·in·the·list·of·children.··The·method·returns·the·token··<em><em>oldchild</em></em>,·which·will·now·have·no·parent.</p> |
490 | </dd> | 490 | </dd> |
491 | <span·class="term"><span·class="methodname">removeChild</span></span><dd> | 491 | <span·class="term"><span·class="methodname">removeChild</span></span><dd> |
492 | <div·class="cmdsynopsis"·id="idp12701112"> | 492 | <div·class="cmdsynopsis"·id="idp12721592"> |
493 | <a·name="idp12701112"></a><span·class="methodname">removeChild</span><em>token</em>·<em>oldchild</em> | 493 | <a·name="idp12721592"></a><span·class="methodname">removeChild</span><em>token</em>·<em>oldchild</em> |
494 | </div> | 494 | </div> |
495 | <p>This·method·removes·the·node·given·by··<em><em>oldchild</em></em>·from·its·parent,··<em><em>token</em></em>.··The·method·returns·the·token··<em><em>oldchild</em></em>,·which·will·now·have·no·parent.</p> | 495 | <p>This·method·removes·the·node·given·by··<em><em>oldchild</em></em>·from·its·parent,··<em><em>token</em></em>.··The·method·returns·the·token··<em><em>oldchild</em></em>,·which·will·now·have·no·parent.</p> |
496 | </dd> | 496 | </dd> |
497 | <span·class="term"><span·class="methodname">appendChild</span></span><dd> | 497 | <span·class="term"><span·class="methodname">appendChild</span></span><dd> |
498 | <div·class="cmdsynopsis"·id="idm8551368"> | 498 | <div·class="cmdsynopsis"·id="idm8530888"> |
499 | <a·name="idm8551368"></a><span·class="methodname">appendChild</span><em>token</em>·<em>newchild</em> | 499 | <a·name="idm8530888"></a><span·class="methodname">appendChild</span><em>token</em>·<em>newchild</em> |
500 | </div> | 500 | </div> |
501 | <p>This·method·removes·the·node·given·by··<em><em>newchild</em></em>·from·its·parent.···<em><em>newchild</em></em>·is·then·appended·to·the·end·of·the·list·of·children·for·node··<em><em>token</em></em>.··The·method·returns·the·token··<em><em>newchild</em></em>.</p> | 501 | <p>This·method·removes·the·node·given·by··<em><em>newchild</em></em>·from·its·parent.···<em><em>newchild</em></em>·is·then·appended·to·the·end·of·the·list·of·children·for·node··<em><em>token</em></em>.··The·method·returns·the·token··<em><em>newchild</em></em>.</p> |
502 | </dd> | 502 | </dd> |
503 | <span·class="term"><span·class="methodname">hasChildNodes</span></span><dd> | 503 | <span·class="term"><span·class="methodname">hasChildNodes</span></span><dd> |
504 | <div·class="cmdsynopsis"·id="idm8532808"> | 504 | <div·class="cmdsynopsis"·id="idm8512328"> |
505 | <a·name="idm8532808"></a><span·class="methodname">hasChildNodes</span><em>token</em> | 505 | <a·name="idm8512328"></a><span·class="methodname">hasChildNodes</span><em>token</em> |
506 | </div> | 506 | </div> |
507 | <p>Returns·<span·class="literal">1</span>·if·the·given·node·has·any·child·nodes,·<span·class="literal">0</span>·otherwise.</p> | 507 | <p>Returns·<span·class="literal">1</span>·if·the·given·node·has·any·child·nodes,·<span·class="literal">0</span>·otherwise.</p> |
508 | </dd> | 508 | </dd> |
509 | <span·class="term"><span·class="methodname">isSameNode</span></span><dd> | 509 | <span·class="term"><span·class="methodname">isSameNode</span></span><dd> |
510 | <div·class="cmdsynopsis"·id="idm8528584"> | 510 | <div·class="cmdsynopsis"·id="idm8508104"> |
511 | <a·name="idm8528584"></a><span·class="methodname">isSameNode</span><em>token</em>·<em>ref</em> | 511 | <a·name="idm8508104"></a><span·class="methodname">isSameNode</span><em>token</em>·<em>ref</em> |
512 | </div> | 512 | </div> |
513 | <p>Returns·<span·class="literal">1</span>·if·the·given·node·is·the·same·node·as·the·node·given·by·the·<span·class="arg"><span·class="literal">ref</span></span>·token,·<span·class="literal">0</span>·otherwise.</p> | 513 | <p>Returns·<span·class="literal">1</span>·if·the·given·node·is·the·same·node·as·the·node·given·by·the·<span·class="arg"><span·class="literal">ref</span></span>·token,·<span·class="literal">0</span>·otherwise.</p> |
514 | </dd> | 514 | </dd> |
515 | <span·class="term"><span·class="methodname">cloneNode</span></span><dd> | 515 | <span·class="term"><span·class="methodname">cloneNode</span></span><dd> |
516 | <div·class="cmdsynopsis"·id="idm8523080"> | 516 | <div·class="cmdsynopsis"·id="idm8502600"> |
517 | <a·name="idm8523080"></a><span·class="methodname">cloneNode</span><em>token</em>·<em>deep</em> | 517 | <a·name="idm8502600"></a><span·class="methodname">cloneNode</span><em>token</em>·<em>deep</em> |
518 | </div> | 518 | </div> |
519 | <p>This·method·makes·a·copy·the·node·given·by··<em><em>token</em></em>.··If·the·argument··<em><em>deep</em></em>·is·not·specified·or·has·the·value·<span·class="literal">0</span>·then·only·the·node·itself·is·copied,·not·its·children.··If·the·argument··<em><em>deep</em></em>·has·the·value·<span·class="literal">1</span>·then··<em><em>token</em></em>'s·children·are·also·copied·recursively.··This·method·returns·the·token·of·the·newly·created·node.··This·new·node·will·have·no·parent.</p> | 519 | <p>This·method·makes·a·copy·the·node·given·by··<em><em>token</em></em>.··If·the·argument··<em><em>deep</em></em>·is·not·specified·or·has·the·value·<span·class="literal">0</span>·then·only·the·node·itself·is·copied,·not·its·children.··If·the·argument··<em><em>deep</em></em>·has·the·value·<span·class="literal">1</span>·then··<em><em>token</em></em>'s·children·are·also·copied·recursively.··This·method·returns·the·token·of·the·newly·created·node.··This·new·node·will·have·no·parent.</p> |
520 | </dd> | 520 | </dd> |
521 | <span·class="term"><span·class="methodname">children</span></span><dd> | 521 | <span·class="term"><span·class="methodname">children</span></span><dd> |
522 | <div·class="cmdsynopsis"·id="idm8515912"> | 522 | <div·class="cmdsynopsis"·id="idm8495432"> |
523 | <a·name="idm8515912"></a><span·class="methodname">children</span><em>token</em> | 523 | <a·name="idm8495432"></a><span·class="methodname">children</span><em>token</em> |
524 | </div> | 524 | </div> |
525 | <p>This·is·a·convenience·method·which·returns·the·list·of·child·nodes·for·the·given·node·as·a·(static)·Tcl·list.</p> | 525 | <p>This·is·a·convenience·method·which·returns·the·list·of·child·nodes·for·the·given·node·as·a·(static)·Tcl·list.</p> |
526 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> | 526 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> |
527 | </dd> | 527 | </dd> |
528 | <span·class="term"><span·class="methodname">parent</span></span><dd> | 528 | <span·class="term"><span·class="methodname">parent</span></span><dd> |
529 | <div·class="cmdsynopsis"·id="idm8512072"> | 529 | <div·class="cmdsynopsis"·id="idm8491592"> |
530 | <a·name="idm8512072"></a><span·class="methodname">parent</span><em>token</em> | 530 | <a·name="idm8491592"></a><span·class="methodname">parent</span><em>token</em> |
531 | </div> | 531 | </div> |
532 | <p>This·is·a·convenience·method·which·returns·the·parent·node·for·the·given·node.</p> | 532 | <p>This·is·a·convenience·method·which·returns·the·parent·node·for·the·given·node.</p> |
533 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> | 533 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> |
534 | </dd> | 534 | </dd> |
535 | <span·class="term"><span·class="methodname">path</span></span><dd> | 535 | <span·class="term"><span·class="methodname">path</span></span><dd> |
536 | <div·class="cmdsynopsis"·id="idp12790968"> | 536 | <div·class="cmdsynopsis"·id="idp12811448"> |
537 | <a·name="idp12790968"></a><span·class="methodname">path</span><em>token</em> | 537 | <a·name="idp12811448"></a><span·class="methodname">path</span><em>token</em> |
538 | </div> | 538 | </div> |
539 | <p>Returns·a·Tcl·list·of·the·ancestor·nodes·of·the·given·node,·starting·with·the·root·node.</p> | 539 | <p>Returns·a·Tcl·list·of·the·ancestor·nodes·of·the·given·node,·starting·with·the·root·node.</p> |
540 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> | 540 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> |
541 | </dd> | 541 | </dd> |
542 | <span·class="term"><span·class="methodname">createNode</span></span><dd> | 542 | <span·class="term"><span·class="methodname">createNode</span></span><dd> |
543 | <div·class="cmdsynopsis"·id="idp12794808"> | 543 | <div·class="cmdsynopsis"·id="idp12815288"> |
544 | <a·name="idp12794808"></a><span·class="methodname">createNode</span><em>token</em>·<em>xpath</em> | 544 | <a·name="idp12815288"></a><span·class="methodname">createNode</span><em>token</em>·<em>xpath</em> |
545 | </div> | 545 | </div> |
546 | <p>May·create·nodes·in·order·to·satisfy·the·given·XPath·location·path.··The·initial·context·for·the·location·path·is·the·node·<span·class="arg"><em>token</em></span>.··For·more·detail,·see·the·<strong>::dom::createNode</strong>·command.</p> | 546 | <p>May·create·nodes·in·order·to·satisfy·the·given·XPath·location·path.··The·initial·context·for·the·location·path·is·the·node·<span·class="arg"><em>token</em></span>.··For·more·detail,·see·the·<strong>::dom::createNode</strong>·command.</p> |
547 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> | 547 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> |
548 | </dd> | 548 | </dd> |
549 | <span·class="term"><span·class="methodname">selectNode</span></span><dd> | 549 | <span·class="term"><span·class="methodname">selectNode</span></span><dd> |
550 | <div·class="cmdsynopsis"·id="idp12800440"> | 550 | <div·class="cmdsynopsis"·id="idp12820920"> |
551 | <a·name="idp12800440"></a><span·class="methodname">selectNode</span><em>token</em>·<em>xpath</em> | 551 | <a·name="idp12820920"></a><span·class="methodname">selectNode</span><em>token</em>·<em>xpath</em> |
552 | </div> | 552 | </div> |
553 | <p>Returns·a·(static)·Tcl·list·of·nodes·selected·by·the·XPath·location·path·<span·class="arg"><em>xpath</em></span>.··The·initial·context·for·the·location·path·is·the·node··<span·class="arg"><em>token</em></span>.··For·more·detail,·see·the·<strong>::dom::selectNode</strong>·command.</p> | 553 | <p>Returns·a·(static)·Tcl·list·of·nodes·selected·by·the·XPath·location·path·<span·class="arg"><em>xpath</em></span>.··The·initial·context·for·the·location·path·is·the·node··<span·class="arg"><em>token</em></span>.··For·more·detail,·see·the·<strong>::dom::selectNode</strong>·command.</p> |
554 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> | 554 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> |
555 | </dd> | 555 | </dd> |
556 | <span·class="term"><span·class="methodname">stringValue</span></span><dd> | 556 | <span·class="term"><span·class="methodname">stringValue</span></span><dd> |
557 | <div·class="cmdsynopsis"·id="idp12806456"> | 557 | <div·class="cmdsynopsis"·id="idp12826936"> |
558 | <a·name="idp12806456"></a><span·class="methodname">stringValue</span><em>token</em> | 558 | <a·name="idp12826936"></a><span·class="methodname">stringValue</span><em>token</em> |
559 | </div> | 559 | </div> |
560 | <p>Returns·the·string·value·of·the·node·given·by·<span·class="arg"><em>token</em></span>.··The·string·value·of·a·node·is·defined·by·the·XPath·specification:·for·element·nodes·it·is·the·concatenation·of·the·string·values·of·all·descendant·text·nodes,·for·text·nodes·it·is·the·node's·character·data·value,·for·attribute·nodes·it·is·the·attribute·value,·for·comment·nodes·it·is·the·comment·data·and·for·processing·instruction·nodes·it·is·the·PI·data.</p> | 560 | <p>Returns·the·string·value·of·the·node·given·by·<span·class="arg"><em>token</em></span>.··The·string·value·of·a·node·is·defined·by·the·XPath·specification:·for·element·nodes·it·is·the·concatenation·of·the·string·values·of·all·descendant·text·nodes,·for·text·nodes·it·is·the·node's·character·data·value,·for·attribute·nodes·it·is·the·attribute·value,·for·comment·nodes·it·is·the·comment·data·and·for·processing·instruction·nodes·it·is·the·PI·data.</p> |
561 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> | 561 | <p>This·is·not·a·standard·DOM·method·for·this·interface.</p> |
562 | </dd> | 562 | </dd> |
563 | <span·class="term"><span·class="methodname">addEventListener</span></span><dd> | 563 | <span·class="term"><span·class="methodname">addEventListener</span></span><dd> |
564 | <div·class="cmdsynopsis"·id="idp12810808"> | 564 | <div·class="cmdsynopsis"·id="idp12831288"> |
565 | <a·name="idp12810808"></a><span·class="methodname">addEventListener</span><em>token</em>·<em>type</em>·<em>listener</em>·?option·value...?</div> | 565 | <a·name="idp12831288"></a><span·class="methodname">addEventListener</span><em>token</em>·<em>type</em>·<em>listener</em>·?option·value...?</div> |
566 | <p>Register·an·event·listener·for·the·node·given·by·<span·class="arg"><em>token</em></span>·listening·for·events·of·type··<span·class="arg"><em>type</em></span>.··The·event·mechanism·functions·as·described·in·the·W3C·DOM·Level·2·Event·module.</p> | 566 | <p>Register·an·event·listener·for·the·node·given·by·<span·class="arg"><em>token</em></span>·listening·for·events·of·type··<span·class="arg"><em>type</em></span>.··The·event·mechanism·functions·as·described·in·the·W3C·DOM·Level·2·Event·module.</p> |
567 | <p>When·an·event·of·type·<span·class="arg"><em>type</em></span>·occurs·the·script··<span·class="arg"><em>listener</em></span>·is·evaluated,·in·the·global·context.··The·token·of·the·event·node·is·appended·to·the·script.</p> | 567 | <p>When·an·event·of·type·<span·class="arg"><em>type</em></span>·occurs·the·script··<span·class="arg"><em>listener</em></span>·is·evaluated,·in·the·global·context.··The·token·of·the·event·node·is·appended·to·the·script.</p> |
568 | <p>If·the·<span·class="arg"><em>listener</em></span>·argument·is·omitted·then·the·listener·for·the·given·event·type·is·returned.</p> | 568 | <p>If·the·<span·class="arg"><em>listener</em></span>·argument·is·omitted·then·the·listener·for·the·given·event·type·is·returned.</p> |
569 | <p>Valid·options·are:</p> | 569 | <p>Valid·options·are:</p> |
570 | <dl> | 570 | <dl> |
571 | <span·class="term"><span·class="arg">-usecapture</span>·<span·class="arg"><em>boolean</em></span></span><dd><p>If·true·the·listener·is·triggered·in·the·event·capturing·phase.··If·false·the·listener·is·triggered·in·the·event·bubbling·phase.</p></dd> | 571 | <span·class="term"><span·class="arg">-usecapture</span>·<span·class="arg"><em>boolean</em></span></span><dd><p>If·true·the·listener·is·triggered·in·the·event·capturing·phase.··If·false·the·listener·is·triggered·in·the·event·bubbling·phase.</p></dd> |
572 | </dl> | 572 | </dl> |
573 | </dd> | 573 | </dd> |
574 | <span·class="term"><span·class="methodname">removeEventListener</span></span><dd> | 574 | <span·class="term"><span·class="methodname">removeEventListener</span></span><dd> |
575 | <div·class="cmdsynopsis"·id="idp12836408"> | 575 | <div·class="cmdsynopsis"·id="idp12856888"> |
576 | <a·name="idp12836408"></a><span·class="methodname">removeEventListener</span><em>token</em>·<em>type</em>·<em>listener</em>·?option·value...?</div> | 576 | <a·name="idp12856888"></a><span·class="methodname">removeEventListener</span><em>token</em>·<em>type</em>·<em>listener</em>·?option·value...?</div> |
577 | <p>Removes·an·event·listener·previously·registered·for·the·node·given·by·<span·class="arg"><em>token</em></span>·listening·for·events·of·type··<span·class="arg"><em>type</em></span>.</p> | 577 | <p>Removes·an·event·listener·previously·registered·for·the·node·given·by·<span·class="arg"><em>token</em></span>·listening·for·events·of·type··<span·class="arg"><em>type</em></span>.</p> |
578 | <p>Valid·options·are:</p> | 578 | <p>Valid·options·are:</p> |
579 | <dl> | 579 | <dl> |
580 | <span·class="term"><span·class="arg">-usecapture</span>·<span·class="arg"><em>boolean</em></span></span><dd><p>If·true·the·capturing·listener·is·removed.··If·false·the·bubbling·listener·is·removed.</p></dd> | 580 | <span·class="term"><span·class="arg">-usecapture</span>·<span·class="arg"><em>boolean</em></span></span><dd><p>If·true·the·capturing·listener·is·removed.··If·false·the·bubbling·listener·is·removed.</p></dd> |
581 | </dl> | 581 | </dl> |
582 | </dd> | 582 | </dd> |
583 | <span·class="term"><span·class="methodname">dispatchEvent</span></span><dd> | 583 | <span·class="term"><span·class="methodname">dispatchEvent</span></span><dd> |
584 | <div·class="cmdsynopsis"·id="idp12847288"> | 584 | <div·class="cmdsynopsis"·id="idp12867768"> |
585 | <a·name="idp12847288"></a><span·class="methodname">dispatchEvent</span><em>token</em>·<em>event</em> | 585 | <a·name="idp12867768"></a><span·class="methodname">dispatchEvent</span><em>token</em>·<em>event</em> |
586 | </div> | 586 | </div> |
587 | <p>Dispatches·the·event·given·by·<span·class="arg"><em>event</em></span>·with·target·node··<span·class="arg"><em>token</em></span>.··The·event·mechanism·functions·as·described·in·the·W3C·DOM·Level·2·Event·module.··The·event·enters·the·capturing·phase·first,·followed·by·the·bubbling·phase.··During·each·phase·any·event·listeners·registered·for·the·same·event·type·as·the·event··<span·class="arg"><em>event</em></span>·are·triggered;·their·script·is·evaluated.··Unless·the·script·invokes·the·<tt>stopPropagation</tt>·method·of·the·<strong>dom::event</strong>·command,·all·registered·event·listeners·will·be·triggered.··The·order·in·which·listeners·registered·at·a·particular·node·for·a·particular·phase·are·triggered·is·undefined.</p> | 587 | <p>Dispatches·the·event·given·by·<span·class="arg"><em>event</em></span>·with·target·node··<span·class="arg"><em>token</em></span>.··The·event·mechanism·functions·as·described·in·the·W3C·DOM·Level·2·Event·module.··The·event·enters·the·capturing·phase·first,·followed·by·the·bubbling·phase.··During·each·phase·any·event·listeners·registered·for·the·same·event·type·as·the·event··<span·class="arg"><em>event</em></span>·are·triggered;·their·script·is·evaluated.··Unless·the·script·invokes·the·<tt>stopPropagation</tt>·method·of·the·<strong>dom::event</strong>·command,·all·registered·event·listeners·will·be·triggered.··The·order·in·which·listeners·registered·at·a·particular·node·for·a·particular·phase·are·triggered·is·undefined.</p> |
588 | </dd> | 588 | </dd> |
589 | </dl> | 589 | </dl> |
590 | </div> | 590 | </div> |
591 | <div·class="refsect2"> | 591 | <div·class="refsect2"> |
592 | <h3> | 592 | <h3> |
593 | <a·name="idp12852792"></a><strong>dom::element</strong> | 593 | <a·name="idp12873272"></a><strong>dom::element</strong> |
594 | </h3> | 594 | </h3> |
595 | <p>This·command·provides·functions·for·element·type·nodes.</p> | 595 | <p>This·command·provides·functions·for·element·type·nodes.</p> |
596 | <p>Valid·methods·for·this·command·are·as·follows:</p> | 596 | <p>Valid·methods·for·this·command·are·as·follows:</p> |
597 | <dl> | 597 | <dl> |
598 | <span·class="term"><span·class="methodname">cget</span></span><dd> | 598 | <span·class="term"><span·class="methodname">cget</span></span><dd> |
599 | <div·class="cmdsynopsis"·id="idp12856504"> | 599 | <div·class="cmdsynopsis"·id="idp12876984"> |
600 | <a·name="idp12856504"></a><span·class="methodname">cget</span><em>token</em>·<em>option</em> | 600 | <a·name="idp12876984"></a><span·class="methodname">cget</span><em>token</em>·<em>option</em> |
601 | </div> | 601 | </div> |
602 | <p>This·method·returns·the·current·setting·of·configuration·options·for·an·element.··See·the·<span·class="methodname">configure</span>·method·for·the·list·of·valid·configuration·options.</p> | 602 | <p>This·method·returns·the·current·setting·of·configuration·options·for·an·element.··See·the·<span·class="methodname">configure</span>·method·for·the·list·of·valid·configuration·options.</p> |
603 | </dd> | 603 | </dd> |
604 | <span·class="term"><span·class="methodname">configure</span></span><dd> | 604 | <span·class="term"><span·class="methodname">configure</span></span><dd> |
605 | <div·class="cmdsynopsis"·id="idp12865208"> | 605 | <div·class="cmdsynopsis"·id="idp12885688"> |
606 | <a·name="idp12865208"></a><span·class="methodname">configure</span><em>token</em>·"<em>option</em>·<em>value</em>..."</div> | 606 | <a·name="idp12885688"></a><span·class="methodname">configure</span><em>token</em>·"<em>option</em>·<em>value</em>..."</div> |
607 | <p>This·method·sets·configuration·options·for·an·element.··Note·that·element·type·nodes·only·have·read-only·options.</p> | 607 | <p>This·method·sets·configuration·options·for·an·element.··Note·that·element·type·nodes·only·have·read-only·options.</p> |
608 | <p>Valid·configuration·options·are·as·follows:</p> | 608 | <p>Valid·configuration·options·are·as·follows:</p> |
609 | <dl> | 609 | <dl> |
610 | <span·class="term">·<em>-tagName</em><span·class="arg"><em>name</em></span></span><dd>The·tag·name,·or·element·type,·of·this·element.</dd> | 610 | <span·class="term">·<em>-tagName</em><span·class="arg"><em>name</em></span></span><dd>The·tag·name,·or·element·type,·of·this·element.</dd> |
611 | <span·class="term">·<em>-empty</em><span·class="arg"><em>boolean</em></span></span><dd> | 611 | <span·class="term">·<em>-empty</em><span·class="arg"><em>boolean</em></span></span><dd> |
612 | <p>Sets·whether·this·element·was·specified·as·an·empty·element·when·the·document·was·parsed.··That·is,·XML·empty·element·syntax·such·as·<span·class="literal"><Empty/></span>·was·used.</p> | 612 | <p>Sets·whether·this·element·was·specified·as·an·empty·element·when·the·document·was·parsed.··That·is,·XML·empty·element·syntax·such·as·<span·class="literal"><Empty/></span>·was·used.</p> |
613 | <p>This·option·has·no·effect·upon·output·(serialization)·of·the·XML·document.··Empty·element·syntax·is·automatically·used·where·appropriate.</p> | 613 | <p>This·option·has·no·effect·upon·output·(serialization)·of·the·XML·document.··Empty·element·syntax·is·automatically·used·where·appropriate.</p> |
614 | </dd> | 614 | </dd> |
615 | </dl> | 615 | </dl> |
616 | </dd> | 616 | </dd> |
617 | <span·class="term"><span·class="methodname">getAttribute</span></span><dd> | 617 | <span·class="term"><span·class="methodname">getAttribute</span></span><dd> |
618 | <div·class="cmdsynopsis"·id="idp12877368"> | 618 | <div·class="cmdsynopsis"·id="idp12897848"> |
619 | <a·name="idp12877368"></a><span·class="methodname">getAttribute</span><em>token</em>·<em>name</em> | 619 | <a·name="idp12897848"></a><span·class="methodname">getAttribute</span><em>token</em>·<em>name</em> |
620 | </div> | 620 | </div> |
621 | <p>This·method·returns·the·attribute·value·of·the·attribute·given·by··<em><em>name</em></em>.··If·the·attribute·does·not·exist,·then·an·empty·string·is·returned.</p> | 621 | <p>This·method·returns·the·attribute·value·of·the·attribute·given·by··<em><em>name</em></em>.··If·the·attribute·does·not·exist,·then·an·empty·string·is·returned.</p> |
622 | </dd> | 622 | </dd> |
623 | <span·class="term"><span·class="methodname">setAttribute</span></span><dd> | 623 | <span·class="term"><span·class="methodname">setAttribute</span></span><dd> |
624 | <div·class="cmdsynopsis"·id="idp12882104"> | 624 | <div·class="cmdsynopsis"·id="idp12902584"> |
625 | <a·name="idp12882104"></a><span·class="methodname">setAttribute</span><em>token</em>·<em>name</em>·<em>value</em> | 625 | <a·name="idp12902584"></a><span·class="methodname">setAttribute</span><em>token</em>·<em>name</em>·<em>value</em> |
626 | </div> | 626 | </div> |
627 | <p>This·method·sets·the·attribute·value·of·the·attribute·given·by··<em><em>name</em></em>.··If·the·attribute·already·exists·then·its·value·is·replaced,·otherwise·the·attribute·is·created.</p> | 627 | <p>This·method·sets·the·attribute·value·of·the·attribute·given·by··<em><em>name</em></em>.··If·the·attribute·already·exists·then·its·value·is·replaced,·otherwise·the·attribute·is·created.</p> |
628 | </dd> | 628 | </dd> |
629 | <span·class="term"><span·class="methodname">removeAttribute</span></span><dd> | 629 | <span·class="term"><span·class="methodname">removeAttribute</span></span><dd> |
630 | <div·class="cmdsynopsis"·id="idp12887608"> | 630 | <div·class="cmdsynopsis"·id="idp12908088"> |
631 | <a·name="idp12887608"></a><span·class="methodname">removeAttribute</span><em>token</em>·<em>name</em> | 631 | <a·name="idp12908088"></a><span·class="methodname">removeAttribute</span><em>token</em>·<em>name</em> |
632 | </div> | 632 | </div> |
633 | <p>This·method·deletes·the·attribute·given·by··<em><em>name</em></em>.··If·the·attribute·does·not·exist·then·the·method·has·no·effect.</p> | 633 | <p>This·method·deletes·the·attribute·given·by··<em><em>name</em></em>.··If·the·attribute·does·not·exist·then·the·method·has·no·effect.</p> |
634 | </dd> | 634 | </dd> |
635 | <span·class="term"><span·class="methodname">getAttributeNode</span></span><dd> | 635 | <span·class="term"><span·class="methodname">getAttributeNode</span></span><dd> |
636 | <div·class="cmdsynopsis"·id="idp12892344"> | 636 | <div·class="cmdsynopsis"·id="idp12912824"> |
637 | <a·name="idp12892344"></a><span·class="methodname">getAttributeNode</span><em>token</em>·<em>name</em> | 637 | <a·name="idp12912824"></a><span·class="methodname">getAttributeNode</span><em>token</em>·<em>name</em> |
638 | </div> | 638 | </div> |
639 | <p>Not·implemented.</p> | 639 | <p>Not·implemented.</p> |
640 | </dd> | 640 | </dd> |
641 | <span·class="term"><span·class="methodname">setAttributeNode</span></span><dd> | 641 | <span·class="term"><span·class="methodname">setAttributeNode</span></span><dd> |
642 | <div·class="cmdsynopsis"·id="idp12896568"> | 642 | <div·class="cmdsynopsis"·id="idp12917048"> |
643 | <a·name="idp12896568"></a><span·class="methodname">setAttributeNode</span><em>token</em>·<em>name</em> | 643 | <a·name="idp12917048"></a><span·class="methodname">setAttributeNode</span><em>token</em>·<em>name</em> |
644 | </div> | 644 | </div> |
645 | <p>Not·implemented.</p> | 645 | <p>Not·implemented.</p> |
646 | </dd> | 646 | </dd> |
647 | <span·class="term"><span·class="methodname">removeAttributeNode</span></span><dd> | 647 | <span·class="term"><span·class="methodname">removeAttributeNode</span></span><dd> |
648 | <div·class="cmdsynopsis"·id="idp12900792"> | 648 | <div·class="cmdsynopsis"·id="idp12921272"> |
649 | <a·name="idp12900792"></a><span·class="methodname">removeAttributeNode</span><em>token</em>·<em>name</em> | 649 | <a·name="idp12921272"></a><span·class="methodname">removeAttributeNode</span><em>token</em>·<em>name</em> |
650 | </div> | 650 | </div> |
651 | <p>Not·implemented.</p> | 651 | <p>Not·implemented.</p> |
652 | </dd> | 652 | </dd> |
653 | <span·class="term"><span·class="methodname">getAttributeNS</span></span><dd> | 653 | <span·class="term"><span·class="methodname">getAttributeNS</span></span><dd> |
654 | <div·class="cmdsynopsis"·id="idp12905016"> | 654 | <div·class="cmdsynopsis"·id="idp12925496"> |
655 | <a·name="idp12905016"></a><span·class="methodname">getAttributeNS</span><em>token</em>·<em>ns</em>·<em>name</em> | 655 | <a·name="idp12925496"></a><span·class="methodname">getAttributeNS</span><em>token</em>·<em>ns</em>·<em>name</em> |
656 | </div> | 656 | </div> |
657 | <p>This·method·returns·the·attribute·value·of·the·attribute·given·by··<em><em>name</em></em>·in·the·XML·namespace·<span·class="arg"><em>ns</em></span>.··If·the·attribute·does·not·exist,·then·an·empty·string·is·returned.</p> | 657 | <p>This·method·returns·the·attribute·value·of·the·attribute·given·by··<em><em>name</em></em>·in·the·XML·namespace·<span·class="arg"><em>ns</em></span>.··If·the·attribute·does·not·exist,·then·an·empty·string·is·returned.</p> |
658 | </dd> | 658 | </dd> |
659 | <span·class="term"><span·class="methodname">setAttributeNS</span></span><dd> | 659 | <span·class="term"><span·class="methodname">setAttributeNS</span></span><dd> |
660 | <div·class="cmdsynopsis"·id="idp12911032"> | 660 | <div·class="cmdsynopsis"·id="idp12931512"> |
661 | <a·name="idp12911032"></a><span·class="methodname">setAttributeNS</span><em>token</em>·<em>ns</em>·<em>name</em>·<em>value</em> | 661 | <a·name="idp12931512"></a><span·class="methodname">setAttributeNS</span><em>token</em>·<em>ns</em>·<em>name</em>·<em>value</em> |
662 | </div> | 662 | </div> |
663 | <p>This·method·sets·the·attribute·value·of·the·attribute·given·by··<em><em>name</em></em>·in·the·XML·namespace·<span·class="arg"><em>ns</em></span>.··If·the·attribute·already·exists·then·its·value·is·replaced,·otherwise·the·attribute·is·created.</p> | 663 | <p>This·method·sets·the·attribute·value·of·the·attribute·given·by··<em><em>name</em></em>·in·the·XML·namespace·<span·class="arg"><em>ns</em></span>.··If·the·attribute·already·exists·then·its·value·is·replaced,·otherwise·the·attribute·is·created.</p> |
664 | </dd> | 664 | </dd> |
665 | <span·class="term"><span·class="methodname">removeAttributeNS</span></span><dd> | 665 | <span·class="term"><span·class="methodname">removeAttributeNS</span></span><dd> |
666 | <div·class="cmdsynopsis"·id="idp12917816"> | 666 | <div·class="cmdsynopsis"·id="idp12938296"> |
667 | <a·name="idp12917816"></a><span·class="methodname">removeAttributeNS</span><em>token</em>·<em>ns</em>·<em>name</em> | 667 | <a·name="idp12938296"></a><span·class="methodname">removeAttributeNS</span><em>token</em>·<em>ns</em>·<em>name</em> |
668 | </div> | 668 | </div> |
669 | <p>This·method·deletes·the·attribute·given·by··<em><em>name</em></em>·in·the·XML·namespace·<span·class="arg"><em>ns</em></span>.··If·the·attribute·does·not·exist·then·the·method·has·no·effect.</p> | 669 | <p>This·method·deletes·the·attribute·given·by··<em><em>name</em></em>·in·the·XML·namespace·<span·class="arg"><em>ns</em></span>.··If·the·attribute·does·not·exist·then·the·method·has·no·effect.</p> |
670 | </dd> | 670 | </dd> |
671 | <span·class="term"><span·class="methodname">getElementsByTagName</span></span><dd> | 671 | <span·class="term"><span·class="methodname">getElementsByTagName</span></span><dd> |
672 | <div·class="cmdsynopsis"·id="idp12923832"> | 672 | <div·class="cmdsynopsis"·id="idp12944312"> |
673 | <a·name="idp12923832"></a><span·class="methodname">getElementsByTagName</span><em>token</em>·<em>name</em> | 673 | <a·name="idp12944312"></a><span·class="methodname">getElementsByTagName</span><em>token</em>·<em>name</em> |
674 | </div> | 674 | </div> |
675 | <p>This·method·searches·the·node·given·by·the·argument··<em><em>token</em></em>·for·descendant·child·elements·with·a·type·matching·the·argument··<em><em>name</em></em>.··The·wildcard·character·<span·class="literal">*</span>·matches·any·element·type.··The·return·result·is·a·"live-list"·which·is·represented·by·a·Tcl·variable.··This·method·returns·the·name·of·the·Tcl·variable·that·contains·the·list·of·tokens·that·match.</p> | 675 | <p>This·method·searches·the·node·given·by·the·argument··<em><em>token</em></em>·for·descendant·child·elements·with·a·type·matching·the·argument··<em><em>name</em></em>.··The·wildcard·character·<span·class="literal">*</span>·matches·any·element·type.··The·return·result·is·a·"live-list"·which·is·represented·by·a·Tcl·variable.··This·method·returns·the·name·of·the·Tcl·variable·that·contains·the·list·of·tokens·that·match.</p> |
676 | </dd> | 676 | </dd> |
677 | <span·class="term"><span·class="methodname">normalize</span></span><dd> | 677 | <span·class="term"><span·class="methodname">normalize</span></span><dd> |
678 | <div·class="cmdsynopsis"·id="idp12929464"> | 678 | <div·class="cmdsynopsis"·id="idp12949944"> |
679 | <a·name="idp12929464"></a><span·class="methodname">normalize</span><em>token</em> | 679 | <a·name="idp12949944"></a><span·class="methodname">normalize</span><em>token</em> |
680 | </div> | 680 | </div> |
681 | <p>This·method·recursively·coalesces·textNodes·within·the·children·of·the·given·node.··textNodes·which·are·adjacent·in·the·DOM·tree·cannot·be·distinguished·in·the·serialized·XML·document.</p> | 681 | <p>This·method·recursively·coalesces·textNodes·within·the·children·of·the·given·node.··textNodes·which·are·adjacent·in·the·DOM·tree·cannot·be·distinguished·in·the·serialized·XML·document.</p> |
682 | </dd> | 682 | </dd> |
683 | </dl> | 683 | </dl> |
684 | </div> | 684 | </div> |
685 | <div·class="refsect2"> | 685 | <div·class="refsect2"> |
686 | <h3> | 686 | <h3> |
687 | <a·name="idp12931896"></a><strong>dom::processinginstruction</strong> | 687 | <a·name="idp12952376"></a><strong>dom::processinginstruction</strong> |
688 | </h3> | 688 | </h3> |
689 | <p>This·command·provides·functions·for·processingInstruction·type·nodes.</p> | 689 | <p>This·command·provides·functions·for·processingInstruction·type·nodes.</p> |
690 | <p>Valid·methods·for·this·command·are·as·follows:</p> | 690 | <p>Valid·methods·for·this·command·are·as·follows:</p> |
691 | <dl> | 691 | <dl> |
692 | <span·class="term"><span·class="methodname">cget</span></span><dd> | 692 | <span·class="term"><span·class="methodname">cget</span></span><dd> |
693 | <div·class="cmdsynopsis"·id="idp12935608"> | 693 | <div·class="cmdsynopsis"·id="idp12956088"> |
694 | <a·name="idp12935608"></a><span·class="methodname">cget</span><em>token</em>·<em>option</em> | 694 | <a·name="idp12956088"></a><span·class="methodname">cget</span><em>token</em>·<em>option</em> |
695 | </div> | 695 | </div> |
696 | <p>This·method·returns·the·current·setting·of·configuration·options·for·an·element.··See·the·<span·class="methodname">configure</span>·method·for·the·list·of·valid·configuration·options.</p> | 696 | <p>This·method·returns·the·current·setting·of·configuration·options·for·an·element.··See·the·<span·class="methodname">configure</span>·method·for·the·list·of·valid·configuration·options.</p> |
697 | </dd> | 697 | </dd> |
698 | <span·class="term"><span·class="methodname">configure</span></span><dd> | 698 | <span·class="term"><span·class="methodname">configure</span></span><dd> |
699 | <div·class="cmdsynopsis"·id="idp12940216"> | 699 | <div·class="cmdsynopsis"·id="idp12960696"> |
700 | <a·name="idp12940216"></a><span·class="methodname">configure</span><em>token</em>·"<em>option</em>·<em>value</em>..."</div> | 700 | <a·name="idp12960696"></a><span·class="methodname">configure</span><em>token</em>·"<em>option</em>·<em>value</em>..."</div> |
701 | <p>This·method·sets·configuration·options·for·a·processing·instruction.</p> | 701 | <p>This·method·sets·configuration·options·for·a·processing·instruction.</p> |
702 | <p>Valid·configuration·options·are·as·follows:</p> | 702 | <p>Valid·configuration·options·are·as·follows:</p> |
703 | <dl> | 703 | <dl> |
704 | <span·class="term">·<em>-target</em><span·class="arg"><em>name</em></span></span><dd>This·option·sets·the·target·of·the·processing·instruction.··This·is·a·read-only·configuration·option.</dd> | 704 | <span·class="term">·<em>-target</em><span·class="arg"><em>name</em></span></span><dd>This·option·sets·the·target·of·the·processing·instruction.··This·is·a·read-only·configuration·option.</dd> |
705 | <span·class="term">·<em>-data</em><span·class="arg"><em>data</em></span></span><dd><p>This·option·sets·the·data·of·the·processing·instruction.</p></dd> | 705 | <span·class="term">·<em>-data</em><span·class="arg"><em>data</em></span></span><dd><p>This·option·sets·the·data·of·the·processing·instruction.</p></dd> |
706 | </dl> | 706 | </dl> |
707 | </dd> | 707 | </dd> |
708 | </dl> | 708 | </dl> |
709 | </div> | 709 | </div> |
710 | <div·class="refsect2"> | 710 | <div·class="refsect2"> |
711 | <h3> | 711 | <h3> |
712 | <a·name="idp12950456"></a><strong>dom::event</strong> | 712 | <a·name="idp12970936"></a><strong>dom::event</strong> |
713 | </h3> | 713 | </h3> |
714 | <p>This·command·provides·functions·for·event·type·nodes.</p> | 714 | <p>This·command·provides·functions·for·event·type·nodes.</p> |
715 | <p>Valid·methods·for·this·command·are·as·follows:</p> | 715 | <p>Valid·methods·for·this·command·are·as·follows:</p> |
716 | <dl> | 716 | <dl> |
717 | <span·class="term"><span·class="methodname">cget</span></span><dd> | 717 | <span·class="term"><span·class="methodname">cget</span></span><dd> |
718 | <div·class="cmdsynopsis"·id="idp12954168"> | 718 | <div·class="cmdsynopsis"·id="idp12974648"> |
719 | <a·name="idp12954168"></a><span·class="methodname">cget</span><em>token</em> | 719 | <a·name="idp12974648"></a><span·class="methodname">cget</span><em>token</em> |
720 | </div> | 720 | </div> |
721 | <p>This·method·retrieves·configuration·options·for·an·event.</p> | 721 | <p>This·method·retrieves·configuration·options·for·an·event.</p> |
722 | <p>Valid·configuration·options·are·as·follows:</p> | 722 | <p>Valid·configuration·options·are·as·follows:</p> |
723 | <dl> | 723 | <dl> |
724 | <span·class="term">·<em>-altKey</em></span><dd>This·option·determines·whether·the·ALT·modifier·key·has·been·specified·for·this·event.</dd> | 724 | <span·class="term">·<em>-altKey</em></span><dd>This·option·determines·whether·the·ALT·modifier·key·has·been·specified·for·this·event.</dd> |
725 | <span·class="term">·<em>-attrName</em></span><dd>This·option·gives·the·name·of·the·attribute·associated·with·this·event.</dd> | 725 | <span·class="term">·<em>-attrName</em></span><dd>This·option·gives·the·name·of·the·attribute·associated·with·this·event.</dd> |
726 | <span·class="term">·<em>-bubbles</em></span><dd>This·option·determines·whether·the·event·uses·the·bubbling·phase.</dd> | 726 | <span·class="term">·<em>-bubbles</em></span><dd>This·option·determines·whether·the·event·uses·the·bubbling·phase.</dd> |
Offset 745, 66 lines modified | Offset 745, 66 lines modified |
745 | <div·class="note">The·implementation·of·this·method·depends·on·the·<span·class="methodname">Tcl_GetTime</span>·function.This·function·only·became·publically·available·in·Tcl·8.4.··If·a·version·of·Tcl·prior·to·8.4·is·being·used,·then·this·option·will·have·the·value·<span·class="literal">0</span>.</div> | 745 | <div·class="note">The·implementation·of·this·method·depends·on·the·<span·class="methodname">Tcl_GetTime</span>·function.This·function·only·became·publically·available·in·Tcl·8.4.··If·a·version·of·Tcl·prior·to·8.4·is·being·used,·then·this·option·will·have·the·value·<span·class="literal">0</span>.</div> |
746 | </dd> | 746 | </dd> |
747 | <span·class="term">·<em>-type</em></span><dd>The·type·of·this·event.</dd> | 747 | <span·class="term">·<em>-type</em></span><dd>The·type·of·this·event.</dd> |
748 | <span·class="term">·<em>-view</em></span><dd>This·option·gives·whether·the·view·of·the·event.</dd> | 748 | <span·class="term">·<em>-view</em></span><dd>This·option·gives·whether·the·view·of·the·event.</dd> |
749 | </dl> | 749 | </dl> |
750 | </dd> | 750 | </dd> |
751 | <span·class="term"><span·class="methodname">configure</span></span><dd> | 751 | <span·class="term"><span·class="methodname">configure</span></span><dd> |
752 | <div·class="cmdsynopsis"·id="idp12994360"> | 752 | <div·class="cmdsynopsis"·id="idp13014840"> |
753 | <a·name="idp12994360"></a><span·class="methodname">configure</span><em>token</em>·"<em>option</em>·<em>value</em>..."</div> | 753 | <a·name="idp13014840"></a><span·class="methodname">configure</span><em>token</em>·"<em>option</em>·<em>value</em>..."</div> |
754 | <p>This·method·sets·the·configuration·options·for·an·event.··However,·all·event·options·are·read-only.··See·the·<span·class="methodname">cget</span>·method·for·the·list·of·valid·configuration·options.</p> | 754 | <p>This·method·sets·the·configuration·options·for·an·event.··However,·all·event·options·are·read-only.··See·the·<span·class="methodname">cget</span>·method·for·the·list·of·valid·configuration·options.</p> |
755 | </dd> | 755 | </dd> |
756 | <span·class="term"><span·class="methodname">stopPropagation</span></span><dd> | 756 | <span·class="term"><span·class="methodname">stopPropagation</span></span><dd> |
757 | <div·class="cmdsynopsis"·id="idp13000248"> | 757 | <div·class="cmdsynopsis"·id="idp13020728"> |
758 | <a·name="idp13000248"></a><span·class="methodname">stopPropagation</span><em>token</em> | 758 | <a·name="idp13020728"></a><span·class="methodname">stopPropagation</span><em>token</em> |
759 | </div> | 759 | </div> |
760 | <p>This·method·cancels·further·propagation·of·the·event.</p> | 760 | <p>This·method·cancels·further·propagation·of·the·event.</p> |
761 | <div·class="note">Invoking·this·method·does·not·prevent·event·listeners·at·the·current·node·from·being·triggered.</div> | 761 | <div·class="note">Invoking·this·method·does·not·prevent·event·listeners·at·the·current·node·from·being·triggered.</div> |
762 | </dd> | 762 | </dd> |
763 | <span·class="term"><span·class="methodname">preventDefault</span></span><dd> | 763 | <span·class="term"><span·class="methodname">preventDefault</span></span><dd> |
764 | <div·class="cmdsynopsis"·id="idp13004088"> | 764 | <div·class="cmdsynopsis"·id="idp13024568"> |
765 | <a·name="idp13004088"></a><span·class="methodname">preventDefault</span><em>token</em> | 765 | <a·name="idp13024568"></a><span·class="methodname">preventDefault</span><em>token</em> |
766 | </div> | 766 | </div> |
767 | <p>This·method·stops·the·default·action·for·this·event·from·occurring.</p> | 767 | <p>This·method·stops·the·default·action·for·this·event·from·occurring.</p> |
768 | </dd> | 768 | </dd> |
769 | <span·class="term"><span·class="methodname">initEvent</span></span><dd> | 769 | <span·class="term"><span·class="methodname">initEvent</span></span><dd> |
770 | <div·class="cmdsynopsis"·id="idp13007544"> | 770 | <div·class="cmdsynopsis"·id="idp13028024"> |
771 | <a·name="idp13007544"></a><span·class="methodname">initEvent</span><em>token</em>·<em>type</em>·<em>bubbles</em>·<em>cancelable</em> | 771 | <a·name="idp13028024"></a><span·class="methodname">initEvent</span><em>token</em>·<em>type</em>·<em>bubbles</em>·<em>cancelable</em> |
772 | </div> | 772 | </div> |
773 | <p>Initialise·the·event.</p> | 773 | <p>Initialise·the·event.</p> |
774 | <p><span·class="arg"><em>type</em></span>·gives·the·type·of·the·event.··Any·of·the·event·types·defined·by·the·W3C·DOM·Level·2·Event·module·may·be·specified,·or·a·user-defined·event·type·may·be·used·instead.</p> | 774 | <p><span·class="arg"><em>type</em></span>·gives·the·type·of·the·event.··Any·of·the·event·types·defined·by·the·W3C·DOM·Level·2·Event·module·may·be·specified,·or·a·user-defined·event·type·may·be·used·instead.</p> |
775 | <p><span·class="arg"><em>bubbles</em></span>·indicates·whether·the·event·will·enter·the·bubbling·phase·after·the·capturing·phase.···<span·class="arg"><em>cancelable</em></span>·indicates·whether·the·event·may·be·cancelled.</p> | 775 | <p><span·class="arg"><em>bubbles</em></span>·indicates·whether·the·event·will·enter·the·bubbling·phase·after·the·capturing·phase.···<span·class="arg"><em>cancelable</em></span>·indicates·whether·the·event·may·be·cancelled.</p> |
776 | </dd> | 776 | </dd> |
777 | <span·class="term"><span·class="methodname">initUIEvent</span></span><dd> | 777 | <span·class="term"><span·class="methodname">initUIEvent</span></span><dd> |
778 | <div·class="cmdsynopsis"·id="idp13027640"> | 778 | <div·class="cmdsynopsis"·id="idp13048120"> |
779 | <a·name="idp13027640"></a><span·class="methodname">initUIEvent</span><em>token</em>·<em>type</em>·<em>bubbles</em>·<em>cancelable</em>·<em>view</em>·<em>detail</em> | 779 | <a·name="idp13048120"></a><span·class="methodname">initUIEvent</span><em>token</em>·<em>type</em>·<em>bubbles</em>·<em>cancelable</em>·<em>view</em>·<em>detail</em> |
780 | </div> | 780 | </div> |
781 | <p>Initialise·a·user·interface·event.··See·<tt>initEvent</tt>·for·further·information.</p> | 781 | <p>Initialise·a·user·interface·event.··See·<tt>initEvent</tt>·for·further·information.</p> |
782 | <p><span·class="arg"><em>view</em></span>·gives·the·view·for·the·event·(not·supported·by·TclDOM).···<span·class="arg"><em>detail</em></span>·provides·extra·data·for·the·event.</p> | 782 | <p><span·class="arg"><em>view</em></span>·gives·the·view·for·the·event·(not·supported·by·TclDOM).···<span·class="arg"><em>detail</em></span>·provides·extra·data·for·the·event.</p> |
783 | </dd> | 783 | </dd> |
784 | <span·class="term"><span·class="methodname">initMouseEvent</span></span><dd> | 784 | <span·class="term"><span·class="methodname">initMouseEvent</span></span><dd> |
785 | <div·class="cmdsynopsis"·id="idp13036600"> | 785 | <div·class="cmdsynopsis"·id="idp13057080"> |
786 | <a·name="idp13036600"></a><span·class="methodname">initMouseEvent</span><em>token</em>·<em>type</em>·<em>bubbles</em>·<em>cancelable</em>·<em>view</em>·<em>detail</em>·<em>screenX</em>·<em>screenY</em>·<em>clientX</em>·<em>clientY</em>·<em>ctrlKey</em>·<em>altKey</em>·<em>shiftKey</em>·<em>metaKey</em>·<em>button</em>·<em>relatedNode</em> | 786 | <a·name="idp13057080"></a><span·class="methodname">initMouseEvent</span><em>token</em>·<em>type</em>·<em>bubbles</em>·<em>cancelable</em>·<em>view</em>·<em>detail</em>·<em>screenX</em>·<em>screenY</em>·<em>clientX</em>·<em>clientY</em>·<em>ctrlKey</em>·<em>altKey</em>·<em>shiftKey</em>·<em>metaKey</em>·<em>button</em>·<em>relatedNode</em> |
787 | </div> | 787 | </div> |
788 | <p>Initialise·a·mouse·event.··See·<tt>initUIEvent</tt>·for·further·information.</p> | 788 | <p>Initialise·a·mouse·event.··See·<tt>initUIEvent</tt>·for·further·information.</p> |
789 | <p><span·class="arg"><em>screenX</em></span>·and··<span·class="arg"><em>screenY</em></span>·give·the·coordinates·at·which·the·event·occurred·relative·to·the·screen.···<span·class="arg"><em>screenX</em></span>·and··<span·class="arg"><em>screenY</em></span>·give·the·coordinates·at·which·the·event·occurred·relative·to·the·window.</p> | 789 | <p><span·class="arg"><em>screenX</em></span>·and··<span·class="arg"><em>screenY</em></span>·give·the·coordinates·at·which·the·event·occurred·relative·to·the·screen.···<span·class="arg"><em>screenX</em></span>·and··<span·class="arg"><em>screenY</em></span>·give·the·coordinates·at·which·the·event·occurred·relative·to·the·window.</p> |
790 | <p><span·class="arg"><em>ctrlKey</em></span>,··<span·class="arg"><em>altKey</em></span>,··<span·class="arg"><em>shiftKey</em></span>,··<span·class="arg"><em>metaKey</em></span>·indicate·whether·the·respective·modifier·key·was·pressed·when·the·event·occurred.</p> | 790 | <p><span·class="arg"><em>ctrlKey</em></span>,··<span·class="arg"><em>altKey</em></span>,··<span·class="arg"><em>shiftKey</em></span>,··<span·class="arg"><em>metaKey</em></span>·indicate·whether·the·respective·modifier·key·was·pressed·when·the·event·occurred.</p> |
791 | <p><span·class="arg"><em>button</em></span>·indicates·which·button,·if·any,·was·pressed·when·the·event·occurred.</p> | 791 | <p><span·class="arg"><em>button</em></span>·indicates·which·button,·if·any,·was·pressed·when·the·event·occurred.</p> |
792 | <p><span·class="arg"><em>relatedNode</em></span>·specifies·that·a·DOM·node·is·associated·with·the·event.</p> | 792 | <p><span·class="arg"><em>relatedNode</em></span>·specifies·that·a·DOM·node·is·associated·with·the·event.</p> |
793 | </dd> | 793 | </dd> |
794 | <span·class="term"><span·class="methodname">initMutationEvent</span></span><dd> | 794 | <span·class="term"><span·class="methodname">initMutationEvent</span></span><dd> |
795 | <div·class="cmdsynopsis"·id="idp13058104"> | 795 | <div·class="cmdsynopsis"·id="idp13078584"> |
796 | <a·name="idp13058104"></a><span·class="methodname">initMutationEvent</span><em>token</em>·<em>type</em>·<em>bubbles</em>·<em>cancelable</em>·<em>relatedNode</em>·<em>prevValue</em>·<em>newValue</em>·<em>attrName</em> | 796 | <a·name="idp13078584"></a><span·class="methodname">initMutationEvent</span><em>token</em>·<em>type</em>·<em>bubbles</em>·<em>cancelable</em>·<em>relatedNode</em>·<em>prevValue</em>·<em>newValue</em>·<em>attrName</em> |
797 | </div> | 797 | </div> |
798 | <p>Initialise·a·tree·mutation·event·event.··See·<tt>initEvent</tt>·for·further·information.</p> | 798 | <p>Initialise·a·tree·mutation·event·event.··See·<tt>initEvent</tt>·for·further·information.</p> |
799 | <p><span·class="arg"><em>relatedNode</em></span>·specifies·a·DOM·node·to·associate·with·the·event.···<span·class="arg"><em>prevValue</em></span>·gives·the·previous·value·of·the·node.···<span·class="arg"><em>newValue</em></span>·gives·the·new·value·of·the·node.···<span·class="arg"><em>attrName</em></span>·gives·the·name·of·the·attribute·where·the·event·is·modifying·an·attribute·value.</p> | 799 | <p><span·class="arg"><em>relatedNode</em></span>·specifies·a·DOM·node·to·associate·with·the·event.···<span·class="arg"><em>prevValue</em></span>·gives·the·previous·value·of·the·node.···<span·class="arg"><em>newValue</em></span>·gives·the·new·value·of·the·node.···<span·class="arg"><em>attrName</em></span>·gives·the·name·of·the·attribute·where·the·event·is·modifying·an·attribute·value.</p> |
800 | </dd> | 800 | </dd> |
801 | <span·class="term"><span·class="methodname">postUIEvent</span></span><dd> | 801 | <span·class="term"><span·class="methodname">postUIEvent</span></span><dd> |
802 | <div·class="cmdsynopsis"·id="idp13073720"> | 802 | <div·class="cmdsynopsis"·id="idp13094200"> |
803 | <a·name="idp13073720"></a><span·class="methodname">postUIEvent</span><em>token</em>·<em>type</em>·?option·<em>value</em>...?</div> | 803 | <a·name="idp13094200"></a><span·class="methodname">postUIEvent</span><em>token</em>·<em>type</em>·?option·<em>value</em>...?</div> |
804 | <p>Non-standard·convenience·method·that·handles·posting·an·user·interface·event·with·<span·class="arg"><em>token</em></span>·as·the·target·node.··This·method·performs·the·following·functions:</p> | 804 | <p>Non-standard·convenience·method·that·handles·posting·an·user·interface·event·with·<span·class="arg"><em>token</em></span>·as·the·target·node.··This·method·performs·the·following·functions:</p> |
805 | <ol> | 805 | <ol> |
806 | <li><p>Create·an·event·node,</p></li> | 806 | <li><p>Create·an·event·node,</p></li> |
807 | <li><p>Initialise·the·event·node·(using·default·values·where·required),</p></li> | 807 | <li><p>Initialise·the·event·node·(using·default·values·where·required),</p></li> |
808 | <li><p>Dispatch·the·event,</p></li> | 808 | <li><p>Dispatch·the·event,</p></li> |
809 | <li><p>Destroy·the·event·node.</p></li> | 809 | <li><p>Destroy·the·event·node.</p></li> |
810 | </ol> | 810 | </ol> |
Offset 814, 16 lines modified | Offset 814, 16 lines modified |
814 | <span·class="term">·<em>-bubbles</em></span><dd><p>Indicates·whether·the·event·bubbles.</p></dd> | 814 | <span·class="term">·<em>-bubbles</em></span><dd><p>Indicates·whether·the·event·bubbles.</p></dd> |
815 | <span·class="term">·<em>-cancelable</em></span><dd><p>Indicates·whether·the·event·can·be·cancelled.</p></dd> | 815 | <span·class="term">·<em>-cancelable</em></span><dd><p>Indicates·whether·the·event·can·be·cancelled.</p></dd> |
816 | <span·class="term">·<em>-view</em></span><dd><p>The·view.</p></dd> | 816 | <span·class="term">·<em>-view</em></span><dd><p>The·view.</p></dd> |
817 | <span·class="term">·<em>-detail</em></span><dd><p>Extra·data·for·the·event.</p></dd> | 817 | <span·class="term">·<em>-detail</em></span><dd><p>Extra·data·for·the·event.</p></dd> |
818 | </dl> | 818 | </dl> |
819 | </dd> | 819 | </dd> |
820 | <span·class="term"><span·class="methodname">postMouseEvent</span></span><dd> | 820 | <span·class="term"><span·class="methodname">postMouseEvent</span></span><dd> |
821 | <div·class="cmdsynopsis"·id="idp13092920"> | 821 | <div·class="cmdsynopsis"·id="idp13113400"> |
822 | <a·name="idp13092920"></a><span·class="methodname">postMouseEvent</span><em>token</em>·<em>type</em>·?option·<em>value</em>...?</div> | 822 | <a·name="idp13113400"></a><span·class="methodname">postMouseEvent</span><em>token</em>·<em>type</em>·?option·<em>value</em>...?</div> |
823 | <p>Non-standard·convenience·method·that·handles·posting·a·mouse·event·with·<span·class="arg"><em>token</em></span>·as·the·target·node.··This·method·performs·the·following·functions:</p> | 823 | <p>Non-standard·convenience·method·that·handles·posting·a·mouse·event·with·<span·class="arg"><em>token</em></span>·as·the·target·node.··This·method·performs·the·following·functions:</p> |
824 | <ol> | 824 | <ol> |
825 | <li><p>Create·an·event·node,</p></li> | 825 | <li><p>Create·an·event·node,</p></li> |
826 | <li><p>Initialise·the·event·node·(using·default·values·where·required),</p></li> | 826 | <li><p>Initialise·the·event·node·(using·default·values·where·required),</p></li> |
827 | <li><p>Dispatch·the·event,</p></li> | 827 | <li><p>Dispatch·the·event,</p></li> |
828 | <li><p>Destroy·the·event·node.</p></li> | 828 | <li><p>Destroy·the·event·node.</p></li> |
829 | </ol> | 829 | </ol> |
Offset 843, 16 lines modified | Offset 843, 16 lines modified |
843 | <span·class="term">·<em>-shiftKey</em></span><dd><p>Indicates·whether·the·shift·modifier·key·was·pressed.</p></dd> | 843 | <span·class="term">·<em>-shiftKey</em></span><dd><p>Indicates·whether·the·shift·modifier·key·was·pressed.</p></dd> |
844 | <span·class="term">·<em>-metaKey</em></span><dd><p>Indicates·whether·the·meta·modifier·key·was·pressed.</p></dd> | 844 | <span·class="term">·<em>-metaKey</em></span><dd><p>Indicates·whether·the·meta·modifier·key·was·pressed.</p></dd> |
845 | <span·class="term">·<em>-button</em></span><dd><p>Gives·the·button·pressed.</p></dd> | 845 | <span·class="term">·<em>-button</em></span><dd><p>Gives·the·button·pressed.</p></dd> |
846 | <span·class="term">·<em>-relatedNode</em></span><dd><p>Gives·a·node·to·associate·with·the·event.</p></dd> | 846 | <span·class="term">·<em>-relatedNode</em></span><dd><p>Gives·a·node·to·associate·with·the·event.</p></dd> |
847 | </dl> | 847 | </dl> |
848 | </dd> | 848 | </dd> |
849 | <span·class="term"><span·class="methodname">postMutationEvent</span></span><dd> | 849 | <span·class="term"><span·class="methodname">postMutationEvent</span></span><dd> |
850 | <div·class="cmdsynopsis"·id="idp13131320"> | 850 | <div·class="cmdsynopsis"·id="idp13151800"> |
851 | <a·name="idp13131320"></a><span·class="methodname">postMutationEvent</span><em>token</em>·<em>type</em>·?option·<em>value</em>...?</div> | 851 | <a·name="idp13151800"></a><span·class="methodname">postMutationEvent</span><em>token</em>·<em>type</em>·?option·<em>value</em>...?</div> |
852 | <p>Non-standard·convenience·method·that·handles·posting·a·mutation·event·with·<span·class="arg"><em>token</em></span>·as·the·target·node.··This·method·performs·the·following·functions:</p> | 852 | <p>Non-standard·convenience·method·that·handles·posting·a·mutation·event·with·<span·class="arg"><em>token</em></span>·as·the·target·node.··This·method·performs·the·following·functions:</p> |
853 | <ol> | 853 | <ol> |
854 | <li><p>Create·an·event·node,</p></li> | 854 | <li><p>Create·an·event·node,</p></li> |
855 | <li><p>Initialise·the·event·node·(using·default·values·where·required),</p></li> | 855 | <li><p>Initialise·the·event·node·(using·default·values·where·required),</p></li> |
856 | <li><p>Dispatch·the·event,</p></li> | 856 | <li><p>Dispatch·the·event,</p></li> |
857 | <li><p>Destroy·the·event·node.</p></li> | 857 | <li><p>Destroy·the·event·node.</p></li> |
858 | </ol> | 858 | </ol> |
Offset 868, 44 lines modified | Offset 868, 44 lines modified |
868 | </dl> | 868 | </dl> |
869 | </dd> | 869 | </dd> |
870 | </dl> | 870 | </dl> |
871 | </div> | 871 | </div> |
872 | </div> | 872 | </div> |
873 | <div·class="refsect1"> | 873 | <div·class="refsect1"> |
874 | <h2> | 874 | <h2> |
875 | <a·name="idp13153464"></a>Errors</h2> | 875 | <a·name="idp13173944"></a>Errors</h2> |
876 | <p>If·an·operation·results·in·an·error·condition,·an·error·message·is·returned·as·a·structured·Tcl·list.··The·list·has·members·as·follows:</p> | 876 | <p>If·an·operation·results·in·an·error·condition,·an·error·message·is·returned·as·a·structured·Tcl·list.··The·list·has·members·as·follows:</p> |
877 | <div·class="informalexample"><pre><div·class="programlisting"><pre>{domain·level·code·node·line·message·int1·int2·string1·string2·string3}</pre></div></pre></div> | 877 | <div·class="informalexample"><pre><div·class="programlisting"><pre>{domain·level·code·node·line·message·int1·int2·string1·string2·string3}</pre></div></pre></div> |
878 | <p>The·format·of·the·list·is·described·in·the·TclXML·manual·page.</p> | 878 | <p>The·format·of·the·list·is·described·in·the·TclXML·manual·page.</p> |
879 | </div> | 879 | </div> |
880 | <div·class="refsect1"> | 880 | <div·class="refsect1"> |
881 | <h2> | 881 | <h2> |
882 | <a·name="idp13156152"></a>Implementations</h2> | 882 | <a·name="idp13176632"></a>Implementations</h2> |
883 | <p>This·section·documents·the·various·implmentations·of·the·TclDOM·API.</p> | 883 | <p>This·section·documents·the·various·implmentations·of·the·TclDOM·API.</p> |
884 | <div·class="refsect2"> | 884 | <div·class="refsect2"> |
885 | <h3> | 885 | <h3> |
886 | <a·name="idp13157560"></a>Tcl·Implementation</h3> | 886 | <a·name="idp13178040"></a>Tcl·Implementation</h3> |
887 | <p>The·Tcl·implementation·is·provided·by·the·<tt>dom::tcl</tt>·package.</p> | 887 | <p>The·Tcl·implementation·is·provided·by·the·<tt>dom::tcl</tt>·package.</p> |
888 | <div·class="refsect3"> | 888 | <div·class="refsect3"> |
889 | <h4> | 889 | <h4> |
890 | <a·name="idp13159352"></a>Limitations</h4> | 890 | <a·name="idp13179832"></a>Limitations</h4> |
891 | <p>This·implementation·is·not·able·to·preform·the·following·functions:</p> | 891 | <p>This·implementation·is·not·able·to·preform·the·following·functions:</p> |
892 | <ul> | 892 | <ul> |
893 | <li><p>Validation:·DTD,·XML·Schema·or·RelaxNG·validation·are·not·supported.</p></li> | 893 | <li><p>Validation:·DTD,·XML·Schema·or·RelaxNG·validation·are·not·supported.</p></li> |
894 | <li><p>Character·encodings:·The·TclDOM/tcl·implementation·itself·does·not·handle·character·encodings·other·than·utf-8.··Character·encodings·are·handled·by·Tcl·itself.</p></li> | 894 | <li><p>Character·encodings:·The·TclDOM/tcl·implementation·itself·does·not·handle·character·encodings·other·than·utf-8.··Character·encodings·are·handled·by·Tcl·itself.</p></li> |
895 | </ul> | 895 | </ul> |
896 | </div> | 896 | </div> |
897 | </div> | 897 | </div> |
898 | <div·class="refsect2"> | 898 | <div·class="refsect2"> |
899 | <h3> | 899 | <h3> |
900 | <a·name="idp13162936"></a>libxml2·Implementation</h3> | 900 | <a·name="idp13183416"></a>libxml2·Implementation</h3> |
901 | <p>The·TclDOM/libxml2·implementation·is·a·wrapper·for·the·<a·href="http://xmlsoft.org/">Gnome·libxml2·library</a>.··It·is·provided·by·the·<tt>dom::libxml2</tt>·package.··It·is·a·high-performance·library,·making·use·of·Tcl·objects·for·fast·access·to·tree·nodes.</p> | 901 | <p>The·TclDOM/libxml2·implementation·is·a·wrapper·for·the·<a·href="http://xmlsoft.org/">Gnome·libxml2·library</a>.··It·is·provided·by·the·<tt>dom::libxml2</tt>·package.··It·is·a·high-performance·library,·making·use·of·Tcl·objects·for·fast·access·to·tree·nodes.</p> |
902 | <div·class="refsect3"> | 902 | <div·class="refsect3"> |
903 | <h4> | 903 | <h4> |
904 | <a·name="idp13165240"></a>Limitations</h4> | 904 | <a·name="idp13185720"></a>Limitations</h4> |
905 | <ul> | 905 | <ul> |
906 | <li><p>The·TclXML/libxml2·parser·must·be·used·to·parse·an·XML·document.··It·is·not·possible·to·use·any·other·parser·class.</p></li> | 906 | <li><p>The·TclXML/libxml2·parser·must·be·used·to·parse·an·XML·document.··It·is·not·possible·to·use·any·other·parser·class.</p></li> |
907 | <li><p>The·importNode·method·has·not·been·implemented.</p></li> | 907 | <li><p>The·importNode·method·has·not·been·implemented.</p></li> |
908 | </ul> | 908 | </ul> |
909 | </div> | 909 | </div> |
910 | </div> | 910 | </div> |
911 | </div> | 911 | </div> |