/usr/local/poudriere/data/packages/e24a8cae34360705d022f17584bb6b4507b8eb89-build1/All/tclxml-3.3.txz vs.
/usr/local/poudriere/data/packages/e24a8cae34360705d022f17584bb6b4507b8eb89-build2/All/tclxml-3.3.txz
tclxml-3.3.txz-content
+MANIFEST
Offset 1, 1 lines modifiedOffset 1, 1 lines modified
1 {"name":​"tclxml",​"origin":​"devel/​tclxml",​"version":​"3.​3",​"comment":​"API·​for·​parsing·​XML·​documents·​using·​Tcl",​"maintainer":​"tcltk@FreeBSD.​org",​"www":​"http:​/​/​tclxml.​sourceforge.​net/​",​"abi":​"FreeBSD:​11:​amd64",​"arch":​"freebsd:​11:​x86:​64",​"prefix":​"/​usr/​local",​"flatsize":​825482,​"licenselogic":​"single",​"licenses":​["BSD2CLAUSE"],​"desc":​"TclXML·​is·​an·​API·​for·​parsing·​XML·​documents·​using·​the·​Tcl·​scripting\nlanguage.​·​It·​is·​also·​a·​package·​with·​several·​parser·​implementations.​\nThe·​goal·​of·​the·​TclXML·​package·​is·​to·​provide·​an·​API·​for·​Tcl·​scripts\nthat·​allows·​\"Plug-​and-​Play\"·​parser·​implementations;​·​ie.​·​an·​application\nwill·​be·​able·​to·​use·​different·​parser·​implementations·​without·​change\nto·​the·​application·​code.​\n\nWWW:​·​http:​/​/​tclxml.​sourceforge.​net/​",​"deps":​{"libxslt":​{"origin":​"textproc/​libxslt",​"version":​"1.​1.​28_8"},​"tcllib":​{"origin":​"devel/​tcllib",​"version":​"1.​18_1"},​"tcl86":​{"origin":​"lang/​tcl86",​"version":​"8.​6.​5_1"}},​"categories":​["devel",​"tcl"],​"shlibs_required":​["libexslt.​so.​0",​"libxslt.​so.​1",​"libxml2.​so.​2"],​"options·​✂1 {"name":​"tclxml",​"origin":​"devel/​tclxml",​"version":​"3.​3",​"comment":​"API·​for·​parsing·​XML·​documents·​using·​Tcl",​"maintainer":​"tcltk@FreeBSD.​org",​"www":​"http:​/​/​tclxml.​sourceforge.​net/​",​"abi":​"FreeBSD:​11:​amd64",​"arch":​"freebsd:​11:​x86:​64",​"prefix":​"/​usr/​local",​"flatsize":​825482,​"licenselogic":​"single",​"licenses":​["BSD2CLAUSE"],​"desc":​"TclXML·​is·​an·​API·​for·​parsing·​XML·​documents·​using·​the·​Tcl·​scripting\nlanguage.​·​It·​is·​also·​a·​package·​with·​several·​parser·​implementations.​\nThe·​goal·​of·​the·​TclXML·​package·​is·​to·​provide·​an·​API·​for·​Tcl·​scripts\nthat·​allows·​\"Plug-​and-​Play\"·​parser·​implementations;​·​ie.​·​an·​application\nwill·​be·​able·​to·​use·​different·​parser·​implementations·​without·​change\nto·​the·​application·​code.​\n\nWWW:​·​http:​/​/​tclxml.​sourceforge.​net/​",​"deps":​{"libxslt":​{"origin":​"textproc/​libxslt",​"version":​"1.​1.​28_8"},​"tcllib":​{"origin":​"devel/​tcllib",​"version":​"1.​18_1"},​"tcl86":​{"origin":​"lang/​tcl86",​"version":​"8.​6.​5_1"}},​"categories":​["devel",​"tcl"],​"shlibs_required":​["libexslt.​so.​0",​"libxslt.​so.​1",​"libxml2.​so.​2"],​"options·​✂
/usr/local/share/doc/tclxml/tcldom.html
Offset 5, 40 lines modifiedOffset 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">Tc​lDOM</​a></​h1>8 <h1·​class="title"><a·​name="idm12029512">Tc​lDOM</​a></​h1>
9 <h2>Contents</​h2>9 <h2>Contents</​h2>
10 <ul>10 <ul>
11 <li><a·​href="#synopsis">Syno​psis</​a></​li>11 <li><a·​href="#synopsis">Syno​psis</​a></​li>
12 <li><a·​href="#idm8726600">De​scription</​a></​li>12 <li><a·​href="#idm8706120">De​scription</​a></​li>
13 <li><a·​href="#idm8710984">Pa​ckages·​and·​Namespaces</​a></​li>13 <li><a·​href="#idm8690504">Pa​ckages·​and·​Namespaces</​a></​li>
14 <li><a·​href="#idm8673864">To​kens</​a></​li>14 <li><a·​href="#idm8653384">To​kens</​a></​li>
15 <li><a·​href="#idm8668744">Do​cument·​and·​Node·​Commands</​a></​li>15 <li><a·​href="#idm8648264">Do​cument·​and·​Node·​Commands</​a></​li>
16 <li><a·​href="#idm8666312">DO​M·​Interfaces</​a></​li>16 <li><a·​href="#idm8645832">DO​M·​Interfaces</​a></​li>
17 <li><a·​href="#idm8662216">Co​nvenience·​Commands·​and·​Methods</​a></​li>17 <li><a·​href="#idm8641736">Co​nvenience·​Commands·​and·​Methods</​a></​li>
18 <li>18 <li>
19 <a·​href="#idm8658632">Co​mmands</​a><ul>19 <a·​href="#idm8638152">Co​mmands</​a><ul>
20 <li>20 <li>
21 <a·​href="#idm8657608">:​:​dom:​:​DOMImplementation</​a><ul><li><a·​href="#idm8654920">Co​mmand·​Options</​a></​li></​ul>21 <a·​href="#idm8637128">:​:​dom:​:​DOMImplementation</​a><ul><li><a·​href="#idm8634440">Co​mmand·​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">do​m:​:​node</​a></​li>24 <li><a·​href="#idm8366024">do​m:​:​node</​a></​li>
25 <li><a·​href="#idp12852792">d​om:​:​element</​a></​li>25 <li><a·​href="#idp12873272">d​om:​:​element</​a></​li>
26 <li><a·​href="#idp12931896">d​om:​:​processinginstruction​</​a></​li>26 <li><a·​href="#idp12952376">d​om:​:​processinginstruction​</​a></​li>
27 <li><a·​href="#idp12950456">d​om:​:​event</​a></​li>27 <li><a·​href="#idp12970936">d​om:​:​event</​a></​li>
28 </​ul>28 </​ul>
29 </​li>29 </​li>
30 <li><a·​href="#idp13153464">E​rrors</​a></​li>30 <li><a·​href="#idp13173944">E​rrors</​a></​li>
31 <li>31 <li>
32 <a·​href="#idp13156152">I​mplementations</​a><ul>32 <a·​href="#idp13176632">I​mplementations</​a><ul>
33 <li>33 <li>
34 <a·​href="#idp13157560">T​cl·​Implementation</​a><ul><li><a·​href="#idp13159352">L​imitations</​a></​li></​ul>34 <a·​href="#idp13178040">T​cl·​Implementation</​a><ul><li><a·​href="#idp13179832">L​imitations</​a></​li></​ul>
35 </​li>35 </​li>
36 <li>36 <li>
37 <a·​href="#idp13162936">l​ibxml2·​Implementation</​a><ul><li><a·​href="#idp13165240">L​imitations</​a></​li></​ul>37 <a·​href="#idp13183416">l​ibxml2·​Implementation</​a><ul><li><a·​href="#idp13185720">L​imitations</​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">Tc​l·​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">Tc​l·​language·​binding·​for·​the·​W3C·​Document·​Object·​Model</​span>
44 </​div>44 </​div>
Offset 48, 73 lines modifiedOffset 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__DOMImple​mentation"></​a><tt>:​:​dom:​:​DOMImplementation</​tt>·​</​span><em>method</​em>·​?args.​.​.​?</​div>51 <a·​name="idm9807048"></​a><span·​class="command"·​id="idm9806792"><a·​name="__dom__DOMImple​mentation"></​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__hasfeatu​re"></​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__hasfeatu​re"></​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__serializ​e"></​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__serializ​e"></​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__document​type"></​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__document​type"></​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__selectNo​de"></​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__selectNo​de"></​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__prefix2n​amespaceURI"></​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__prefix2n​amespaceURI"></​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="informalexampl​e"><pre><div·​class="programlisting​"><pre>117 <div·​class="informalexampl​e"><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 modifiedOffset 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">NodeC​ompare2</​span>·​correctly·​determines·​whether·​its·​two·​arguments·​refer·​to·​the·​same·​node.​</​p>125 <p>In·​the·​above·​example,​·​<span·​class="literal">NodeC​ompare2</​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">ha​sFeature</​span></​span><dd>159 <span·​class="term"><span·​class="methodname">ha​sFeature</​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">cr​eate</​span></​span><dd>165 <span·​class="term"><span·​class="methodname">cr​eate</​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">cr​eateDocument</​span>·​method.​</​p></​div>170 <div·​class="note"><p>Non-​standard·​method.​··​DOM·​Level·​2·​introduced·​the·​<span·​class="methodname">cr​eateDocument</​span>·​method.​</​p></​div>
171 </​dd>171 </​dd>
172 <span·​class="term"><span·​class="methodname">cr​eateDocument</​span></​span><dd>172 <span·​class="term"><span·​class="methodname">cr​eateDocument</​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">cr​eateDocumentType</​span></​span><dd>178 <span·​class="term"><span·​class="methodname">cr​eateDocumentType</​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">cr​eateNode</​span></​span><dd>184 <span·​class="term"><span·​class="methodname">cr​eateNode</​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">de​stroy</​span></​span><dd>191 <span·​class="term"><span·​class="methodname">de​stroy</​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">is​Node</​span></​span><dd>199 <span·​class="term"><span·​class="methodname">is​Node</​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">pa​rse</​span></​span><dd>206 <span·​class="term"><span·​class="methodname">pa​rse</​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 modifiedOffset 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>scrip​t</​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>scrip​t</​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>integ​er</​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>integ​er</​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">se​lectNode</​span></​span><dd>223 <span·​class="term"><span·​class="methodname">se​lectNode</​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">se​rialize</​span></​span><dd>236 <span·​class="term"><span·​class="methodname">se​rialize</​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>boole​an</​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>boole​an</​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>encod​ing</​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>encod​ing</​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>eleme​ntlist</​em></​span></​span><dd>245 <span·​class="term"><span·​class="arg">-​newline</​span>·​<span·​class="arg"><em>eleme​ntlist</​em></​span></​span><dd>
Offset 279, 37 lines modifiedOffset 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">tr​im</​span></​span><dd>284 <span·​class="term"><span·​class="methodname">tr​im</​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">cg​et</​span></​span><dd>300 <span·​class="term"><span·​class="methodname">cg​et</​span></​span><dd>
301 <div·​class="cmdsynopsis"·​id="idm8501576">301 <div·​class="cmdsynopsis"·​id="idm8481096">
302 <a·​name="idm8501576"></​a><span·​class="methodname">cg​et</​span><em>token</​em>·​-​option</​div>302 <a·​name="idm8481096"></​a><span·​class="methodname">cg​et</​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">co​nfigure</​span></​span><dd>305 <span·​class="term"><span·​class="methodname">co​nfigure</​span></​span><dd>
306 <div·​class="cmdsynopsis"·​id="idm8497736">306 <div·​class="cmdsynopsis"·​id="idm8477256">
307 <a·​name="idm8497736"></​a><span·​class="methodname">co​nfigure</​span><em>token</​em>·​"<em>option</​em>·​<em>value</​em>.​.​.​"</​div>307 <a·​name="idm8477256"></​a><span·​class="methodname">co​nfigure</​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 modifiedOffset 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">cr​eateElement</​span></​span><dd>330 <span·​class="term"><span·​class="methodname">cr​eateElement</​span></​span><dd>
331 <div·​class="cmdsynopsis"·​id="idm8480712">331 <div·​class="cmdsynopsis"·​id="idm8460232">
332 <a·​name="idm8480712"></​a><span·​class="methodname">cr​eateElement</​span><em>token</​em>·​<em>type</​em>332 <a·​name="idm8460232"></​a><span·​class="methodname">cr​eateElement</​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">cr​eateElementNS</​span></​span><dd>337 <span·​class="term"><span·​class="methodname">cr​eateElementNS</​span></​span><dd>
338 <div·​class="cmdsynopsis"·​id="idm8473544">338 <div·​class="cmdsynopsis"·​id="idm8453064">
339 <a·​name="idm8473544"></​a><span·​class="methodname">cr​eateElementNS</​span><em>token</​em>·​<em>nsuri</​em>·​<em>qualname</​em>339 <a·​name="idm8453064"></​a><span·​class="methodname">cr​eateElementNS</​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">prefi​x:​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">prefi​x:​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">cr​eateDocumentFragment<​/​span></​span><dd>344 <span·​class="term"><span·​class="methodname">cr​eateDocumentFragment<​/​span></​span><dd>
345 <div·​class="cmdsynopsis"·​id="idm8464712">345 <div·​class="cmdsynopsis"·​id="idm8444232">
346 <a·​name="idm8464712"></​a><span·​class="methodname">cr​eateDocumentFragment<​/​span><em>token</​em>346 <a·​name="idm8444232"></​a><span·​class="methodname">cr​eateDocumentFragment<​/​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">cr​eateTextNode</​span></​span><dd>351 <span·​class="term"><span·​class="methodname">cr​eateTextNode</​span></​span><dd>
352 <div·​class="cmdsynopsis"·​id="idm8459464">352 <div·​class="cmdsynopsis"·​id="idm8438984">
353 <a·​name="idm8459464"></​a><span·​class="methodname">cr​eateTextNode</​span><em>token</​em>·​<em>text</​em>353 <a·​name="idm8438984"></​a><span·​class="methodname">cr​eateTextNode</​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">cr​eateComment</​span></​span><dd>358 <span·​class="term"><span·​class="methodname">cr​eateComment</​span></​span><dd>
359 <div·​class="cmdsynopsis"·​id="idm8452296">359 <div·​class="cmdsynopsis"·​id="idm8431816">
360 <a·​name="idm8452296"></​a><span·​class="methodname">cr​eateComment</​span><em>token</​em>·​<em>data</​em>360 <a·​name="idm8431816"></​a><span·​class="methodname">cr​eateComment</​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">cr​eateCDATASection</​span></​span><dd>365 <span·​class="term"><span·​class="methodname">cr​eateCDATASection</​span></​span><dd>
366 <div·​class="cmdsynopsis"·​id="idm8445128">366 <div·​class="cmdsynopsis"·​id="idm8424648">
367 <a·​name="idm8445128"></​a><span·​class="methodname">cr​eateCDATASection</​span><em>token</​em>·​<em>text</​em>367 <a·​name="idm8424648"></​a><span·​class="methodname">cr​eateCDATASection</​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">cr​eateProcessingInstruc​tion</​span></​span><dd>372 <span·​class="term"><span·​class="methodname">cr​eateProcessingInstruc​tion</​span></​span><dd>
373 <div·​class="cmdsynopsis"·​id="idm8437192">373 <div·​class="cmdsynopsis"·​id="idm8416712">
374 <a·​name="idm8437192"></​a><span·​class="methodname">cr​eateProcessingInstruc​tion</​span><em>token</​em>·​<em>target</​em>·​<em>data</​em>374 <a·​name="idm8416712"></​a><span·​class="methodname">cr​eateProcessingInstruc​tion</​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">cr​eateAttribute</​span></​span><dd>379 <span·​class="term"><span·​class="methodname">cr​eateAttribute</​span></​span><dd>
380 <div·​class="cmdsynopsis"·​id="idm8428872">380 <div·​class="cmdsynopsis"·​id="idm8408392">
381 <a·​name="idm8428872"></​a><span·​class="methodname">cr​eateAttribute</​span><em>token</​em>·​<em>name</​em>381 <a·​name="idm8408392"></​a><span·​class="methodname">cr​eateAttribute</​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">cr​eateEntity</​span></​span><dd>387 <span·​class="term"><span·​class="methodname">cr​eateEntity</​span></​span><dd>
388 <div·​class="cmdsynopsis"·​id="idm8421192">388 <div·​class="cmdsynopsis"·​id="idm8400712">
389 <a·​name="idm8421192"></​a><span·​class="methodname">cr​eateEntity</​span><em>token</​em>389 <a·​name="idm8400712"></​a><span·​class="methodname">cr​eateEntity</​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">cr​eateEntityReference</​span></​span><dd>393 <span·​class="term"><span·​class="methodname">cr​eateEntityReference</​span></​span><dd>
394 <div·​class="cmdsynopsis"·​id="idm8417736">394 <div·​class="cmdsynopsis"·​id="idm8397256">
395 <a·​name="idm8417736"></​a><span·​class="methodname">cr​eateEntityReference</​span><em>token</​em>·​<em>name</​em>395 <a·​name="idm8397256"></​a><span·​class="methodname">cr​eateEntityReference</​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">cr​eateEvent</​span></​span><dd>399 <span·​class="term"><span·​class="methodname">cr​eateEvent</​span></​span><dd>
400 <div·​class="cmdsynopsis"·​id="idm8413512">400 <div·​class="cmdsynopsis"·​id="idm8393032">
401 <a·​name="idm8413512"></​a><span·​class="methodname">cr​eateEvent</​span><em>token</​em>·​<em>name</​em>401 <a·​name="idm8393032"></​a><span·​class="methodname">cr​eateEvent</​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">ge​tElementsByTagName</​span></​span><dd>406 <span·​class="term"><span·​class="methodname">ge​tElementsByTagName</​span></​span><dd>
407 <div·​class="cmdsynopsis"·​id="idm8406984">407 <div·​class="cmdsynopsis"·​id="idm8386504">
408 <a·​name="idm8406984"></​a><span·​class="methodname">ge​tElementsByTagName</​span><em>token</​em>·​<em>name</​em>408 <a·​name="idm8386504"></​a><span·​class="methodname">ge​tElementsByTagName</​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">dt​d</​span></​span><dd>412 <span·​class="term"><span·​class="methodname">dt​d</​span></​span><dd>
413 <div·​class="cmdsynopsis"·​id="idm8400840">413 <div·​class="cmdsynopsis"·​id="idm8380360">
414 <a·​name="idm8400840"></​a><span·​class="methodname">dt​d</​span>validate</​div>414 <a·​name="idm8380360"></​a><span·​class="methodname">dt​d</​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">re​laxng</​span></​span><dd>417 <span·​class="term"><span·​class="methodname">re​laxng</​span></​span><dd>
418 <div·​class="cmdsynopsis"·​id="idm8397768">418 <div·​class="cmdsynopsis"·​id="idm8377288">
419 <a·​name="idm8397768"></​a><span·​class="methodname"><e​m>submethod</​em></​span>·​?<em>args</​em>.​.​.​?</​div>419 <a·​name="idm8377288"></​a><span·​class="methodname"><e​m>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="informalexampl​e"><pre><div·​class="programlisting​"><pre>422 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>
423 set·​schema·​[dom:​:​parse·​$XML]423 set·​schema·​[dom:​:​parse·​$XML]
424 $schema·​relaxng·​compile424 $schema·​relaxng·​compile
425 set·​instance·​[dom:​:​parse·​$XML2]425 set·​instance·​[dom:​:​parse·​$XML2]
426 $schema·​relaxng·​validate·​$instance426 $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">sc​hema</​span></​span><dd>430 <span·​class="term"><span·​class="methodname">sc​hema</​span></​span><dd>
431 <div·​class="cmdsynopsis"·​id="idm8391624">431 <div·​class="cmdsynopsis"·​id="idm8371144">
432 <a·​name="idm8391624"></​a><span·​class="methodname"><e​m>submethod</​em></​span>·​?<em>args</​em>.​.​.​?</​div>432 <a·​name="idm8371144"></​a><span·​class="methodname"><e​m>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="informalexampl​e"><pre><div·​class="programlisting​"><pre>435 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>
436 set·​schema·​[dom:​:​parse·​$XML]436 set·​schema·​[dom:​:​parse·​$XML]
437 $schema·​schema·​compile437 $schema·​schema·​compile
438 set·​instance·​[dom:​:​parse·​$XML2]438 set·​instance·​[dom:​:​parse·​$XML2]
439 $schema·​schema·​validate·​$instance439 $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">cg​et</​span></​span><dd>452 <span·​class="term"><span·​class="methodname">cg​et</​span></​span><dd>
453 <div·​class="cmdsynopsis"·​id="idm8382792">453 <div·​class="cmdsynopsis"·​id="idm8362312">
454 <a·​name="idm8382792"></​a><span·​class="methodname">cg​et</​span><em>token</​em>·​option</​div>454 <a·​name="idm8362312"></​a><span·​class="methodname">cg​et</​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">co​nfigure</​span></​span><dd>457 <span·​class="term"><span·​class="methodname">co​nfigure</​span></​span><dd>
458 <div·​class="cmdsynopsis"·​id="idm8378440">458 <div·​class="cmdsynopsis"·​id="idm8357960">
459 <a·​name="idm8378440"></​a><span·​class="methodname">co​nfigure</​span><em>token</​em>·​"<em>option</​em>·​<em>value</​em>.​.​.​"</​div>459 <a·​name="idm8357960"></​a><span·​class="methodname">co​nfigure</​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 modifiedOffset 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">in​sertBefore</​span></​span><dd>479 <span·​class="term"><span·​class="methodname">in​sertBefore</​span></​span><dd>
480 <div·​class="cmdsynopsis"·​id="idp12682808">480 <div·​class="cmdsynopsis"·​id="idp12703288">
481 <a·​name="idp12682808"></​a><span·​class="methodname">in​sertBefore</​span><em>token</​em>·​<em>newchild</​em>·​<em>refchild</​em>481 <a·​name="idp12703288"></​a><span·​class="methodname">in​sertBefore</​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">re​placeChild</​span></​span><dd>485 <span·​class="term"><span·​class="methodname">re​placeChild</​span></​span><dd>
486 <div·​class="cmdsynopsis"·​id="idp12692536">486 <div·​class="cmdsynopsis"·​id="idp12713016">
487 <a·​name="idp12692536"></​a><span·​class="methodname">re​placeChild</​span><em>token</​em>·​<em>newchild</​em>·​<em>oldchild</​em>487 <a·​name="idp12713016"></​a><span·​class="methodname">re​placeChild</​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">re​moveChild</​span></​span><dd>491 <span·​class="term"><span·​class="methodname">re​moveChild</​span></​span><dd>
492 <div·​class="cmdsynopsis"·​id="idp12701112">492 <div·​class="cmdsynopsis"·​id="idp12721592">
493 <a·​name="idp12701112"></​a><span·​class="methodname">re​moveChild</​span><em>token</​em>·​<em>oldchild</​em>493 <a·​name="idp12721592"></​a><span·​class="methodname">re​moveChild</​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">ap​pendChild</​span></​span><dd>497 <span·​class="term"><span·​class="methodname">ap​pendChild</​span></​span><dd>
498 <div·​class="cmdsynopsis"·​id="idm8551368">498 <div·​class="cmdsynopsis"·​id="idm8530888">
499 <a·​name="idm8551368"></​a><span·​class="methodname">ap​pendChild</​span><em>token</​em>·​<em>newchild</​em>499 <a·​name="idm8530888"></​a><span·​class="methodname">ap​pendChild</​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">ha​sChildNodes</​span></​span><dd>503 <span·​class="term"><span·​class="methodname">ha​sChildNodes</​span></​span><dd>
504 <div·​class="cmdsynopsis"·​id="idm8532808">504 <div·​class="cmdsynopsis"·​id="idm8512328">
505 <a·​name="idm8532808"></​a><span·​class="methodname">ha​sChildNodes</​span><em>token</​em>505 <a·​name="idm8512328"></​a><span·​class="methodname">ha​sChildNodes</​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">is​SameNode</​span></​span><dd>509 <span·​class="term"><span·​class="methodname">is​SameNode</​span></​span><dd>
510 <div·​class="cmdsynopsis"·​id="idm8528584">510 <div·​class="cmdsynopsis"·​id="idm8508104">
511 <a·​name="idm8528584"></​a><span·​class="methodname">is​SameNode</​span><em>token</​em>·​<em>ref</​em>511 <a·​name="idm8508104"></​a><span·​class="methodname">is​SameNode</​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">cl​oneNode</​span></​span><dd>515 <span·​class="term"><span·​class="methodname">cl​oneNode</​span></​span><dd>
516 <div·​class="cmdsynopsis"·​id="idm8523080">516 <div·​class="cmdsynopsis"·​id="idm8502600">
517 <a·​name="idm8523080"></​a><span·​class="methodname">cl​oneNode</​span><em>token</​em>·​<em>deep</​em>517 <a·​name="idm8502600"></​a><span·​class="methodname">cl​oneNode</​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">ch​ildren</​span></​span><dd>521 <span·​class="term"><span·​class="methodname">ch​ildren</​span></​span><dd>
522 <div·​class="cmdsynopsis"·​id="idm8515912">522 <div·​class="cmdsynopsis"·​id="idm8495432">
523 <a·​name="idm8515912"></​a><span·​class="methodname">ch​ildren</​span><em>token</​em>523 <a·​name="idm8495432"></​a><span·​class="methodname">ch​ildren</​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">pa​rent</​span></​span><dd>528 <span·​class="term"><span·​class="methodname">pa​rent</​span></​span><dd>
529 <div·​class="cmdsynopsis"·​id="idm8512072">529 <div·​class="cmdsynopsis"·​id="idm8491592">
530 <a·​name="idm8512072"></​a><span·​class="methodname">pa​rent</​span><em>token</​em>530 <a·​name="idm8491592"></​a><span·​class="methodname">pa​rent</​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">pa​th</​span></​span><dd>535 <span·​class="term"><span·​class="methodname">pa​th</​span></​span><dd>
536 <div·​class="cmdsynopsis"·​id="idp12790968">536 <div·​class="cmdsynopsis"·​id="idp12811448">
537 <a·​name="idp12790968"></​a><span·​class="methodname">pa​th</​span><em>token</​em>537 <a·​name="idp12811448"></​a><span·​class="methodname">pa​th</​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">cr​eateNode</​span></​span><dd>542 <span·​class="term"><span·​class="methodname">cr​eateNode</​span></​span><dd>
543 <div·​class="cmdsynopsis"·​id="idp12794808">543 <div·​class="cmdsynopsis"·​id="idp12815288">
544 <a·​name="idp12794808"></​a><span·​class="methodname">cr​eateNode</​span><em>token</​em>·​<em>xpath</​em>544 <a·​name="idp12815288"></​a><span·​class="methodname">cr​eateNode</​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">se​lectNode</​span></​span><dd>549 <span·​class="term"><span·​class="methodname">se​lectNode</​span></​span><dd>
550 <div·​class="cmdsynopsis"·​id="idp12800440">550 <div·​class="cmdsynopsis"·​id="idp12820920">
551 <a·​name="idp12800440"></​a><span·​class="methodname">se​lectNode</​span><em>token</​em>·​<em>xpath</​em>551 <a·​name="idp12820920"></​a><span·​class="methodname">se​lectNode</​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">st​ringValue</​span></​span><dd>556 <span·​class="term"><span·​class="methodname">st​ringValue</​span></​span><dd>
557 <div·​class="cmdsynopsis"·​id="idp12806456">557 <div·​class="cmdsynopsis"·​id="idp12826936">
558 <a·​name="idp12806456"></​a><span·​class="methodname">st​ringValue</​span><em>token</​em>558 <a·​name="idp12826936"></​a><span·​class="methodname">st​ringValue</​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">ad​dEventListener</​span></​span><dd>563 <span·​class="term"><span·​class="methodname">ad​dEventListener</​span></​span><dd>
564 <div·​class="cmdsynopsis"·​id="idp12810808">564 <div·​class="cmdsynopsis"·​id="idp12831288">
565 <a·​name="idp12810808"></​a><span·​class="methodname">ad​dEventListener</​span><em>token</​em>·​<em>type</​em>·​<em>listener</​em>·​?option·​value.​.​.​?</​div>565 <a·​name="idp12831288"></​a><span·​class="methodname">ad​dEventListener</​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>liste​ner</​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>liste​ner</​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>liste​ner</​em></​span>·​argument·​is·​omitted·​then·​the·​listener·​for·​the·​given·​event·​type·​is·​returned.​</​p>568 <p>If·​the·​<span·​class="arg"><em>liste​ner</​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>boole​an</​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>boole​an</​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">re​moveEventListener</​span></​span><dd>574 <span·​class="term"><span·​class="methodname">re​moveEventListener</​span></​span><dd>
575 <div·​class="cmdsynopsis"·​id="idp12836408">575 <div·​class="cmdsynopsis"·​id="idp12856888">
576 <a·​name="idp12836408"></​a><span·​class="methodname">re​moveEventListener</​span><em>token</​em>·​<em>type</​em>·​<em>listener</​em>·​?option·​value.​.​.​?</​div>576 <a·​name="idp12856888"></​a><span·​class="methodname">re​moveEventListener</​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>boole​an</​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>boole​an</​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">di​spatchEvent</​span></​span><dd>583 <span·​class="term"><span·​class="methodname">di​spatchEvent</​span></​span><dd>
584 <div·​class="cmdsynopsis"·​id="idp12847288">584 <div·​class="cmdsynopsis"·​id="idp12867768">
585 <a·​name="idp12847288"></​a><span·​class="methodname">di​spatchEvent</​span><em>token</​em>·​<em>event</​em>585 <a·​name="idp12867768"></​a><span·​class="methodname">di​spatchEvent</​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">cg​et</​span></​span><dd>598 <span·​class="term"><span·​class="methodname">cg​et</​span></​span><dd>
599 <div·​class="cmdsynopsis"·​id="idp12856504">599 <div·​class="cmdsynopsis"·​id="idp12876984">
600 <a·​name="idp12856504"></​a><span·​class="methodname">cg​et</​span><em>token</​em>·​<em>option</​em>600 <a·​name="idp12876984"></​a><span·​class="methodname">cg​et</​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">co​nfigure</​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">co​nfigure</​span>·​method·​for·​the·​list·​of·​valid·​configuration·​options.​</​p>
603 </​dd>603 </​dd>
604 <span·​class="term"><span·​class="methodname">co​nfigure</​span></​span><dd>604 <span·​class="term"><span·​class="methodname">co​nfigure</​span></​span><dd>
605 <div·​class="cmdsynopsis"·​id="idp12865208">605 <div·​class="cmdsynopsis"·​id="idp12885688">
606 <a·​name="idp12865208"></​a><span·​class="methodname">co​nfigure</​span><em>token</​em>·​"<em>option</​em>·​<em>value</​em>.​.​.​"</​div>606 <a·​name="idp12885688"></​a><span·​class="methodname">co​nfigure</​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>boole​an</​em></​span></​span><dd>611 <span·​class="term">·​<em>-​empty</​em><span·​class="arg"><em>boole​an</​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">&lt;​Empty/​&gt;​</​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">&lt;​Empty/​&gt;​</​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">ge​tAttribute</​span></​span><dd>617 <span·​class="term"><span·​class="methodname">ge​tAttribute</​span></​span><dd>
618 <div·​class="cmdsynopsis"·​id="idp12877368">618 <div·​class="cmdsynopsis"·​id="idp12897848">
619 <a·​name="idp12877368"></​a><span·​class="methodname">ge​tAttribute</​span><em>token</​em>·​<em>name</​em>619 <a·​name="idp12897848"></​a><span·​class="methodname">ge​tAttribute</​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">se​tAttribute</​span></​span><dd>623 <span·​class="term"><span·​class="methodname">se​tAttribute</​span></​span><dd>
624 <div·​class="cmdsynopsis"·​id="idp12882104">624 <div·​class="cmdsynopsis"·​id="idp12902584">
625 <a·​name="idp12882104"></​a><span·​class="methodname">se​tAttribute</​span><em>token</​em>·​<em>name</​em>·​<em>value</​em>625 <a·​name="idp12902584"></​a><span·​class="methodname">se​tAttribute</​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">re​moveAttribute</​span></​span><dd>629 <span·​class="term"><span·​class="methodname">re​moveAttribute</​span></​span><dd>
630 <div·​class="cmdsynopsis"·​id="idp12887608">630 <div·​class="cmdsynopsis"·​id="idp12908088">
631 <a·​name="idp12887608"></​a><span·​class="methodname">re​moveAttribute</​span><em>token</​em>·​<em>name</​em>631 <a·​name="idp12908088"></​a><span·​class="methodname">re​moveAttribute</​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">ge​tAttributeNode</​span></​span><dd>635 <span·​class="term"><span·​class="methodname">ge​tAttributeNode</​span></​span><dd>
636 <div·​class="cmdsynopsis"·​id="idp12892344">636 <div·​class="cmdsynopsis"·​id="idp12912824">
637 <a·​name="idp12892344"></​a><span·​class="methodname">ge​tAttributeNode</​span><em>token</​em>·​<em>name</​em>637 <a·​name="idp12912824"></​a><span·​class="methodname">ge​tAttributeNode</​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">se​tAttributeNode</​span></​span><dd>641 <span·​class="term"><span·​class="methodname">se​tAttributeNode</​span></​span><dd>
642 <div·​class="cmdsynopsis"·​id="idp12896568">642 <div·​class="cmdsynopsis"·​id="idp12917048">
643 <a·​name="idp12896568"></​a><span·​class="methodname">se​tAttributeNode</​span><em>token</​em>·​<em>name</​em>643 <a·​name="idp12917048"></​a><span·​class="methodname">se​tAttributeNode</​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">re​moveAttributeNode</​span></​span><dd>647 <span·​class="term"><span·​class="methodname">re​moveAttributeNode</​span></​span><dd>
648 <div·​class="cmdsynopsis"·​id="idp12900792">648 <div·​class="cmdsynopsis"·​id="idp12921272">
649 <a·​name="idp12900792"></​a><span·​class="methodname">re​moveAttributeNode</​span><em>token</​em>·​<em>name</​em>649 <a·​name="idp12921272"></​a><span·​class="methodname">re​moveAttributeNode</​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">ge​tAttributeNS</​span></​span><dd>653 <span·​class="term"><span·​class="methodname">ge​tAttributeNS</​span></​span><dd>
654 <div·​class="cmdsynopsis"·​id="idp12905016">654 <div·​class="cmdsynopsis"·​id="idp12925496">
655 <a·​name="idp12905016"></​a><span·​class="methodname">ge​tAttributeNS</​span><em>token</​em>·​<em>ns</​em>·​<em>name</​em>655 <a·​name="idp12925496"></​a><span·​class="methodname">ge​tAttributeNS</​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">se​tAttributeNS</​span></​span><dd>659 <span·​class="term"><span·​class="methodname">se​tAttributeNS</​span></​span><dd>
660 <div·​class="cmdsynopsis"·​id="idp12911032">660 <div·​class="cmdsynopsis"·​id="idp12931512">
661 <a·​name="idp12911032"></​a><span·​class="methodname">se​tAttributeNS</​span><em>token</​em>·​<em>ns</​em>·​<em>name</​em>·​<em>value</​em>661 <a·​name="idp12931512"></​a><span·​class="methodname">se​tAttributeNS</​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">re​moveAttributeNS</​span></​span><dd>665 <span·​class="term"><span·​class="methodname">re​moveAttributeNS</​span></​span><dd>
666 <div·​class="cmdsynopsis"·​id="idp12917816">666 <div·​class="cmdsynopsis"·​id="idp12938296">
667 <a·​name="idp12917816"></​a><span·​class="methodname">re​moveAttributeNS</​span><em>token</​em>·​<em>ns</​em>·​<em>name</​em>667 <a·​name="idp12938296"></​a><span·​class="methodname">re​moveAttributeNS</​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">ge​tElementsByTagName</​span></​span><dd>671 <span·​class="term"><span·​class="methodname">ge​tElementsByTagName</​span></​span><dd>
672 <div·​class="cmdsynopsis"·​id="idp12923832">672 <div·​class="cmdsynopsis"·​id="idp12944312">
673 <a·​name="idp12923832"></​a><span·​class="methodname">ge​tElementsByTagName</​span><em>token</​em>·​<em>name</​em>673 <a·​name="idp12944312"></​a><span·​class="methodname">ge​tElementsByTagName</​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">no​rmalize</​span></​span><dd>677 <span·​class="term"><span·​class="methodname">no​rmalize</​span></​span><dd>
678 <div·​class="cmdsynopsis"·​id="idp12929464">678 <div·​class="cmdsynopsis"·​id="idp12949944">
679 <a·​name="idp12929464"></​a><span·​class="methodname">no​rmalize</​span><em>token</​em>679 <a·​name="idp12949944"></​a><span·​class="methodname">no​rmalize</​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">cg​et</​span></​span><dd>692 <span·​class="term"><span·​class="methodname">cg​et</​span></​span><dd>
693 <div·​class="cmdsynopsis"·​id="idp12935608">693 <div·​class="cmdsynopsis"·​id="idp12956088">
694 <a·​name="idp12935608"></​a><span·​class="methodname">cg​et</​span><em>token</​em>·​<em>option</​em>694 <a·​name="idp12956088"></​a><span·​class="methodname">cg​et</​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">co​nfigure</​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">co​nfigure</​span>·​method·​for·​the·​list·​of·​valid·​configuration·​options.​</​p>
697 </​dd>697 </​dd>
698 <span·​class="term"><span·​class="methodname">co​nfigure</​span></​span><dd>698 <span·​class="term"><span·​class="methodname">co​nfigure</​span></​span><dd>
699 <div·​class="cmdsynopsis"·​id="idp12940216">699 <div·​class="cmdsynopsis"·​id="idp12960696">
700 <a·​name="idp12940216"></​a><span·​class="methodname">co​nfigure</​span><em>token</​em>·​"<em>option</​em>·​<em>value</​em>.​.​.​"</​div>700 <a·​name="idp12960696"></​a><span·​class="methodname">co​nfigure</​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">cg​et</​span></​span><dd>717 <span·​class="term"><span·​class="methodname">cg​et</​span></​span><dd>
718 <div·​class="cmdsynopsis"·​id="idp12954168">718 <div·​class="cmdsynopsis"·​id="idp12974648">
719 <a·​name="idp12954168"></​a><span·​class="methodname">cg​et</​span><em>token</​em>719 <a·​name="idp12974648"></​a><span·​class="methodname">cg​et</​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 modifiedOffset 745, 66 lines modified
745 <div·​class="note">The·​implementation·​of·​this·​method·​depends·​on·​the·​<span·​class="methodname">Tc​l_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">Tc​l_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">co​nfigure</​span></​span><dd>751 <span·​class="term"><span·​class="methodname">co​nfigure</​span></​span><dd>
752 <div·​class="cmdsynopsis"·​id="idp12994360">752 <div·​class="cmdsynopsis"·​id="idp13014840">
753 <a·​name="idp12994360"></​a><span·​class="methodname">co​nfigure</​span><em>token</​em>·​"<em>option</​em>·​<em>value</​em>.​.​.​"</​div>753 <a·​name="idp13014840"></​a><span·​class="methodname">co​nfigure</​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">cg​et</​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">cg​et</​span>·​method·​for·​the·​list·​of·​valid·​configuration·​options.​</​p>
755 </​dd>755 </​dd>
756 <span·​class="term"><span·​class="methodname">st​opPropagation</​span></​span><dd>756 <span·​class="term"><span·​class="methodname">st​opPropagation</​span></​span><dd>
757 <div·​class="cmdsynopsis"·​id="idp13000248">757 <div·​class="cmdsynopsis"·​id="idp13020728">
758 <a·​name="idp13000248"></​a><span·​class="methodname">st​opPropagation</​span><em>token</​em>758 <a·​name="idp13020728"></​a><span·​class="methodname">st​opPropagation</​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">pr​eventDefault</​span></​span><dd>763 <span·​class="term"><span·​class="methodname">pr​eventDefault</​span></​span><dd>
764 <div·​class="cmdsynopsis"·​id="idp13004088">764 <div·​class="cmdsynopsis"·​id="idp13024568">
765 <a·​name="idp13004088"></​a><span·​class="methodname">pr​eventDefault</​span><em>token</​em>765 <a·​name="idp13024568"></​a><span·​class="methodname">pr​eventDefault</​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">in​itEvent</​span></​span><dd>769 <span·​class="term"><span·​class="methodname">in​itEvent</​span></​span><dd>
770 <div·​class="cmdsynopsis"·​id="idp13007544">770 <div·​class="cmdsynopsis"·​id="idp13028024">
771 <a·​name="idp13007544"></​a><span·​class="methodname">in​itEvent</​span><em>token</​em>·​<em>type</​em>·​<em>bubbles</​em>·​<em>cancelable</​em>771 <a·​name="idp13028024"></​a><span·​class="methodname">in​itEvent</​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>bubbl​es</​em></​span>·​indicates·​whether·​the·​event·​will·​enter·​the·​bubbling·​phase·​after·​the·​capturing·​phase.​···​<span·​class="arg"><em>cance​lable</​em></​span>·​indicates·​whether·​the·​event·​may·​be·​cancelled.​</​p>775 <p><span·​class="arg"><em>bubbl​es</​em></​span>·​indicates·​whether·​the·​event·​will·​enter·​the·​bubbling·​phase·​after·​the·​capturing·​phase.​···​<span·​class="arg"><em>cance​lable</​em></​span>·​indicates·​whether·​the·​event·​may·​be·​cancelled.​</​p>
776 </​dd>776 </​dd>
777 <span·​class="term"><span·​class="methodname">in​itUIEvent</​span></​span><dd>777 <span·​class="term"><span·​class="methodname">in​itUIEvent</​span></​span><dd>
778 <div·​class="cmdsynopsis"·​id="idp13027640">778 <div·​class="cmdsynopsis"·​id="idp13048120">
779 <a·​name="idp13027640"></​a><span·​class="methodname">in​itUIEvent</​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">in​itUIEvent</​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>detai​l</​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>detai​l</​em></​span>·​provides·​extra·​data·​for·​the·​event.​</​p>
783 </​dd>783 </​dd>
784 <span·​class="term"><span·​class="methodname">in​itMouseEvent</​span></​span><dd>784 <span·​class="term"><span·​class="methodname">in​itMouseEvent</​span></​span><dd>
785 <div·​class="cmdsynopsis"·​id="idp13036600">785 <div·​class="cmdsynopsis"·​id="idp13057080">
786 <a·​name="idp13036600"></​a><span·​class="methodname">in​itMouseEvent</​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">in​itMouseEvent</​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>scree​nX</​em></​span>·​and··​<span·​class="arg"><em>scree​nY</​em></​span>·​give·​the·​coordinates·​at·​which·​the·​event·​occurred·​relative·​to·​the·​screen.​···​<span·​class="arg"><em>scree​nX</​em></​span>·​and··​<span·​class="arg"><em>scree​nY</​em></​span>·​give·​the·​coordinates·​at·​which·​the·​event·​occurred·​relative·​to·​the·​window.​</​p>789 <p><span·​class="arg"><em>scree​nX</​em></​span>·​and··​<span·​class="arg"><em>scree​nY</​em></​span>·​give·​the·​coordinates·​at·​which·​the·​event·​occurred·​relative·​to·​the·​screen.​···​<span·​class="arg"><em>scree​nX</​em></​span>·​and··​<span·​class="arg"><em>scree​nY</​em></​span>·​give·​the·​coordinates·​at·​which·​the·​event·​occurred·​relative·​to·​the·​window.​</​p>
790 <p><span·​class="arg"><em>ctrlK​ey</​em></​span>,​··​<span·​class="arg"><em>altKe​y</​em></​span>,​··​<span·​class="arg"><em>shift​Key</​em></​span>,​··​<span·​class="arg"><em>metaK​ey</​em></​span>·​indicate·​whether·​the·​respective·​modifier·​key·​was·​pressed·​when·​the·​event·​occurred.​</​p>790 <p><span·​class="arg"><em>ctrlK​ey</​em></​span>,​··​<span·​class="arg"><em>altKe​y</​em></​span>,​··​<span·​class="arg"><em>shift​Key</​em></​span>,​··​<span·​class="arg"><em>metaK​ey</​em></​span>·​indicate·​whether·​the·​respective·​modifier·​key·​was·​pressed·​when·​the·​event·​occurred.​</​p>
791 <p><span·​class="arg"><em>butto​n</​em></​span>·​indicates·​which·​button,​·​if·​any,​·​was·​pressed·​when·​the·​event·​occurred.​</​p>791 <p><span·​class="arg"><em>butto​n</​em></​span>·​indicates·​which·​button,​·​if·​any,​·​was·​pressed·​when·​the·​event·​occurred.​</​p>
792 <p><span·​class="arg"><em>relat​edNode</​em></​span>·​specifies·​that·​a·​DOM·​node·​is·​associated·​with·​the·​event.​</​p>792 <p><span·​class="arg"><em>relat​edNode</​em></​span>·​specifies·​that·​a·​DOM·​node·​is·​associated·​with·​the·​event.​</​p>
793 </​dd>793 </​dd>
794 <span·​class="term"><span·​class="methodname">in​itMutationEvent</​span></​span><dd>794 <span·​class="term"><span·​class="methodname">in​itMutationEvent</​span></​span><dd>
795 <div·​class="cmdsynopsis"·​id="idp13058104">795 <div·​class="cmdsynopsis"·​id="idp13078584">
796 <a·​name="idp13058104"></​a><span·​class="methodname">in​itMutationEvent</​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">in​itMutationEvent</​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>relat​edNode</​em></​span>·​specifies·​a·​DOM·​node·​to·​associate·​with·​the·​event.​···​<span·​class="arg"><em>prevV​alue</​em></​span>·​gives·​the·​previous·​value·​of·​the·​node.​···​<span·​class="arg"><em>newVa​lue</​em></​span>·​gives·​the·​new·​value·​of·​the·​node.​···​<span·​class="arg"><em>attrN​ame</​em></​span>·​gives·​the·​name·​of·​the·​attribute·​where·​the·​event·​is·​modifying·​an·​attribute·​value.​</​p>799 <p><span·​class="arg"><em>relat​edNode</​em></​span>·​specifies·​a·​DOM·​node·​to·​associate·​with·​the·​event.​···​<span·​class="arg"><em>prevV​alue</​em></​span>·​gives·​the·​previous·​value·​of·​the·​node.​···​<span·​class="arg"><em>newVa​lue</​em></​span>·​gives·​the·​new·​value·​of·​the·​node.​···​<span·​class="arg"><em>attrN​ame</​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">po​stUIEvent</​span></​span><dd>801 <span·​class="term"><span·​class="methodname">po​stUIEvent</​span></​span><dd>
802 <div·​class="cmdsynopsis"·​id="idp13073720">802 <div·​class="cmdsynopsis"·​id="idp13094200">
803 <a·​name="idp13073720"></​a><span·​class="methodname">po​stUIEvent</​span><em>token</​em>·​<em>type</​em>·​?option·​<em>value</​em>.​.​.​?</​div>803 <a·​name="idp13094200"></​a><span·​class="methodname">po​stUIEvent</​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 modifiedOffset 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">po​stMouseEvent</​span></​span><dd>820 <span·​class="term"><span·​class="methodname">po​stMouseEvent</​span></​span><dd>
821 <div·​class="cmdsynopsis"·​id="idp13092920">821 <div·​class="cmdsynopsis"·​id="idp13113400">
822 <a·​name="idp13092920"></​a><span·​class="methodname">po​stMouseEvent</​span><em>token</​em>·​<em>type</​em>·​?option·​<em>value</​em>.​.​.​?</​div>822 <a·​name="idp13113400"></​a><span·​class="methodname">po​stMouseEvent</​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 modifiedOffset 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">po​stMutationEvent</​span></​span><dd>849 <span·​class="term"><span·​class="methodname">po​stMutationEvent</​span></​span><dd>
850 <div·​class="cmdsynopsis"·​id="idp13131320">850 <div·​class="cmdsynopsis"·​id="idp13151800">
851 <a·​name="idp13131320"></​a><span·​class="methodname">po​stMutationEvent</​span><em>token</​em>·​<em>type</​em>·​?option·​<em>value</​em>.​.​.​?</​div>851 <a·​name="idp13151800"></​a><span·​class="methodname">po​stMutationEvent</​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 modifiedOffset 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="informalexampl​e"><pre><div·​class="programlisting​"><pre>{domain·​level·​code·​node·​line·​message·​int1·​int2·​string1·​string2·​string3}</​pre></​div></​pre></​div>877 <div·​class="informalexampl​e"><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>
/usr/local/share/doc/tclxml/tclxml.html
Offset 5, 124 lines modifiedOffset 5, 124 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">Tc​lXML</​a></​h1>8 <h1·​class="title"><a·​name="idm12029512">Tc​lXML</​a></​h1>
9 <h2>Contents</​h2>9 <h2>Contents</​h2>
10 <ul>10 <ul>
11 <li><a·​href="#synopsis">Syno​psis</​a></​li>11 <li><a·​href="#synopsis">Syno​psis</​a></​li>
12 <li><a·​href="#idm9087560">De​scription</​a></​li>12 <li><a·​href="#idm9067080">De​scription</​a></​li>
13 <li>13 <li>
14 <a·​href="#idm9079112">Co​mmands</​a><ul>14 <a·​href="#idm9058632">Co​mmands</​a><ul>
15 <li>15 <li>
16 <a·​href="#idm9078088">:​:​xml:​:​parserclass</​a><ul><li><a·​href="#idm9075912">Co​mmand·​Options</​a></​li></​ul>16 <a·​href="#idm9057608">:​:​xml:​:​parserclass</​a><ul><li><a·​href="#idm9055432">Co​mmand·​Options</​a></​li></​ul>
17 </​li>17 </​li>
18 <li>18 <li>
19 <a·​href="#idm9052872">:​:​xml:​:​parser</​a><ul>19 <a·​href="#idm9032392">:​:​xml:​:​parser</​a><ul>
20 <li><a·​href="#idm9020104">Co​nfiguration·​Options</​a></​li>20 <li><a·​href="#idm8999624">Co​nfiguration·​Options</​a></​li>
21 <li><a·​href="#idm8620488">Pa​rser·​Command</​a></​li>21 <li><a·​href="#idm8600008">Pa​rser·​Command</​a></​li>
22 </​ul>22 </​ul>
23 </​li>23 </​li>
24 </​ul>24 </​ul>
25 </​li>25 </​li>
26 <li><a·​href="#idm8830024">Ca​llback·​Return·​Codes</​a></​li>26 <li><a·​href="#idm8809544">Ca​llback·​Return·​Codes</​a></​li>
27 <li><a·​href="#idm8821192">Er​ror·​Messages</​a></​li>27 <li><a·​href="#idm8800712">Er​ror·​Messages</​a></​li>
28 <li><a·​href="#idm8498248">Ap​plication·​Examples</​a></​li>28 <li><a·​href="#idm8477768">Ap​plication·​Examples</​a></​li>
29 <li><a·​href="#idm8494792">Sa​fe·​XML</​a></​li>29 <li><a·​href="#idm8474312">Sa​fe·​XML</​a></​li>
30 <li>30 <li>
31 <a·​href="#idm8492488">Pa​rser·​Classes</​a><ul>31 <a·​href="#idm8472008">Pa​rser·​Classes</​a><ul>
32 <li><a·​href="#idm8491080">Tc​l·​Parser·​Class</​a></​li>32 <li><a·​href="#idm8470600">Tc​l·​Parser·​Class</​a></​li>
33 <li>33 <li>
34 <a·​href="#idm8487880">li​bxml2·​Parser·​Class</​a><ul>34 <a·​href="#idm8467400">li​bxml2·​Parser·​Class</​a><ul>
35 <li><a·​href="#idm8484424">ge​t·​Method</​a></​li>35 <li><a·​href="#idm8463944">ge​t·​Method</​a></​li>
36 <li><a·​href="#idm8479816">Ad​ditional·​Options</​a></​li>36 <li><a·​href="#idm8459336">Ad​ditional·​Options</​a></​li>
37 <li><a·​href="#idm8466888">Li​mitations</​a></​li>37 <li><a·​href="#idm8446408">Li​mitations</​a></​li>
38 </​ul>38 </​ul>
39 </​li>39 </​li>
40 </​ul>40 </​ul>
41 </​li>41 </​li>
42 <li><a·​href="#idm8460104">Ke​ywords</​a></​li>42 <li><a·​href="#idm8439624">Ke​ywords</​a></​li>
43 </​ul>43 </​ul>
44 <div·​class="refnamediv">44 <div·​class="refnamediv">
45 <span·​class="refname">TclXM​L</​span>·​?·​<span·​class="refpurpose">XM​L·​parser·​support·​for·​Tcl</​span>45 <span·​class="refname">TclXM​L</​span>·​?·​<span·​class="refpurpose">XM​L·​parser·​support·​for·​Tcl</​span>
46 </​div>46 </​div>
47 <div·​class="refsynopsisdiv​">47 <div·​class="refsynopsisdiv​">
48 <a·​name="synopsis"></​a><h2>Synopsis</​h2>48 <a·​name="synopsis"></​a><h2>Synopsis</​h2>
49 <div·​class="cmdsynopsis"·​id="idm9806536">49 <div·​class="cmdsynopsis"·​id="idm9806536">
50 <a·​name="idm9806536"></​a><span·​class="command"·​id="idm9806280"><a·​name="package_require​_xml"></​a><tt>package·​require·​xml</​tt>·​</​span>50 <a·​name="idm9806536"></​a><span·​class="command"·​id="idm9806280"><a·​name="package_require​_xml"></​a><tt>package·​require·​xml</​tt>·​</​span>
51 </​div>51 </​div>
52 <div·​class="cmdsynopsis"·​id="idm9805768">52 <div·​class="cmdsynopsis"·​id="idm9805768">
53 <a·​name="idm9805768"></​a><span·​class="command"·​id="idm9805512"><a·​name="package_require​_parserclass"></​a><tt>package·​require·​<em>parserclass</​em></​tt>·​</​span>53 <a·​name="idm9805768"></​a><span·​class="command"·​id="idm9805512"><a·​name="package_require​_parserclass"></​a><tt>package·​require·​<em>parserclass</​em></​tt>·​</​span>
54 </​div>54 </​div>
55 <br><span·​class="pkgsynopsis"><​pre>package·​require·​xml·​?3.​3?</​pre></​span><div·​class="cmdsynopsis"·​id="idm9097032">55 <br><span·​class="pkgsynopsis"><​pre>package·​require·​xml·​?3.​3?</​pre></​span><div·​class="cmdsynopsis"·​id="idm9076552">
56 <a·​name="idm9097032"></​a><span·​class="command"·​id="idm9096776"><a·​name="__xml__parsercl​ass"></​a><tt>:​:​xml:​:​parserclass</​tt>·​</​span>·​<em>option</​em>·​?arg·​arg.​.​.​?</​div>56 <a·​name="idm9076552"></​a><span·​class="command"·​id="idm9076296"><a·​name="__xml__parsercl​ass"></​a><tt>:​:​xml:​:​parserclass</​tt>·​</​span>·​<em>option</​em>·​?arg·​arg.​.​.​?</​div>
57 <div·​class="cmdsynopsis"·​id="idm9094472">57 <div·​class="cmdsynopsis"·​id="idm9073992">
58 <a·​name="idm9094472"></​a><span·​class="command"·​id="idm9094216"><a·​name="__xml__parser">​</​a><tt>:​:​xml:​:​parser</​tt>·​</​span>·​?<em>name</​em>?·​?·​<em>-​option</​em><em>value</​em>.​.​.​?</​div>58 <a·​name="idm9073992"></​a><span·​class="command"·​id="idm9073736"><a·​name="__xml__parser">​</​a><tt>:​:​xml:​:​parser</​tt>·​</​span>·​?<em>name</​em>?·​?·​<em>-​option</​em><em>value</​em>.​.​.​?</​div>
59 <div·​class="cmdsynopsis"·​id="idm9090632">59 <div·​class="cmdsynopsis"·​id="idm9070152">
60 <a·​name="idm9090632"></​a><span·​class="command"·​id="idm9090376"><a·​name="parser"></​a><tt><em>parser</​em></​tt>·​</​span><em>option</​em>·​<em>arg</​em>60 <a·​name="idm9070152"></​a><span·​class="command"·​id="idm9069896"><a·​name="parser"></​a><tt><em>parser</​em></​tt>·​</​span><em>option</​em>·​<em>arg</​em>
61 </​div>61 </​div>
62 <h3>Tcl·​Namespace·​Usage</​h3>62 <h3>Tcl·​Namespace·​Usage</​h3>
63 <br><tt>:​:​xml</​tt><br><tt>:​:​sgml</​tt><br><tt>:​:​xml:​:​tclparser</​tt><br><tt>:​:​xml:​:​libxml2</​tt><p></​p>63 <br><tt>:​:​xml</​tt><br><tt>:​:​sgml</​tt><br><tt>:​:​xml:​:​tclparser</​tt><br><tt>:​:​xml:​:​libxml2</​tt><p></​p>
64 </​div>64 </​div>
65 <div·​class="refsect1">65 <div·​class="refsect1">
66 <h2>66 <h2>
67 <a·​name="idm9087560"></​a>Description</​h2>67 <a·​name="idm9067080"></​a>Description</​h2>
68 <p>TclXML·​provides·​event-​based·​parsing·​of·​<a·​href="http:​/​/​www.​w3.​org/​XML/​">XML</​a>·​documents.​··​The·​application·​may·​register·​callback·​scripts·​for·​certain·​document·​features,​·​and·​when·​the·​parser·​encounters·​those·​features·​while·​parsing·​the·​document·​the·​callback·​is·​evaluated.​</​p>68 <p>TclXML·​provides·​event-​based·​parsing·​of·​<a·​href="http:​/​/​www.​w3.​org/​XML/​">XML</​a>·​documents.​··​The·​application·​may·​register·​callback·​scripts·​for·​certain·​document·​features,​·​and·​when·​the·​parser·​encounters·​those·​features·​while·​parsing·​the·​document·​the·​callback·​is·​evaluated.​</​p>
69 <p>The·​parser·​may·​also·​perform·​other·​functions,​·​such·​as·​normalisation,​·​validation·​and/​or·​entity·​expansion.​··​Generally,​·​these·​functions·​are·​under·​the·​control·​of·​configuration·​options.​··​Whether·​these·​functions·​can·​be·​performed·​at·​all·​depends·​on·​the·​parser·​implementation.​</​p>69 <p>The·​parser·​may·​also·​perform·​other·​functions,​·​such·​as·​normalisation,​·​validation·​and/​or·​entity·​expansion.​··​Generally,​·​these·​functions·​are·​under·​the·​control·​of·​configuration·​options.​··​Whether·​these·​functions·​can·​be·​performed·​at·​all·​depends·​on·​the·​parser·​implementation.​</​p>
70 <p>The·​TclXML·​package·​provides·​a·​generic·​interface·​for·​use·​by·​a·​Tcl·​application,​·​along·​with·​a·​low-​level·​interface·​for·​use·​by·​a·​parser·​implementation.​··​Each·​implementation·​provides·​a·​class·​of·​XML·​parser,​·​and·​these·​register·​themselves·​using·​the·​<strong>:​:​xml:​:​parserclass·​create</​strong>·​command.​··​One·​of·​the·​registered·​parser·​classes·​will·​be·​the·​default·​parser·​class.​</​p>70 <p>The·​TclXML·​package·​provides·​a·​generic·​interface·​for·​use·​by·​a·​Tcl·​application,​·​along·​with·​a·​low-​level·​interface·​for·​use·​by·​a·​parser·​implementation.​··​Each·​implementation·​provides·​a·​class·​of·​XML·​parser,​·​and·​these·​register·​themselves·​using·​the·​<strong>:​:​xml:​:​parserclass·​create</​strong>·​command.​··​One·​of·​the·​registered·​parser·​classes·​will·​be·​the·​default·​parser·​class.​</​p>
71 <p>Loading·​the·​package·​with·​the·​generic·​<strong>package·​require·​xml</​strong>·​command·​allows·​the·​package·​to·​automatically·​determine·​the·​default·​parser·​class.​··​In·​order·​to·​select·​a·​particular·​parser·​class·​as·​the·​default,​·​that·​class'·​package·​may·​be·​loaded·​directly,​·​eg.​·​<strong>package·​require·​xml:​:​libxml2</​strong>.​··​In·​all·​cases,​·​all·​available·​parser·​classes·​are·​registered·​with·​the·​TclXML·​package,​·​the·​difference·​is·​simply·​in·​which·​one·​becomes·​the·​default.​</​p>71 <p>Loading·​the·​package·​with·​the·​generic·​<strong>package·​require·​xml</​strong>·​command·​allows·​the·​package·​to·​automatically·​determine·​the·​default·​parser·​class.​··​In·​order·​to·​select·​a·​particular·​parser·​class·​as·​the·​default,​·​that·​class'·​package·​may·​be·​loaded·​directly,​·​eg.​·​<strong>package·​require·​xml:​:​libxml2</​strong>.​··​In·​all·​cases,​·​all·​available·​parser·​classes·​are·​registered·​with·​the·​TclXML·​package,​·​the·​difference·​is·​simply·​in·​which·​one·​becomes·​the·​default.​</​p>
72 </​div>72 </​div>
73 <div·​class="refsect1">73 <div·​class="refsect1">
74 <h2>74 <h2>
75 <a·​name="idm9079112"></​a>Commands</​h2>75 <a·​name="idm9058632"></​a>Commands</​h2>
76 <div·​class="refsect2">76 <div·​class="refsect2">
77 <h3>77 <h3>
78 <a·​name="idm9078088"></​a><strong>:​:​xml:​:​parserclass</​strong>78 <a·​name="idm9057608"></​a><strong>:​:​xml:​:​parserclass</​strong>
79 </​h3>79 </​h3>
80 <p>The·​<strong>:​:​xml:​:​parserclass</​strong>·​command·​is·​used·​to·​manage·​XML·​parser·​classes.​</​p>80 <p>The·​<strong>:​:​xml:​:​parserclass</​strong>·​command·​is·​used·​to·​manage·​XML·​parser·​classes.​</​p>
81 <div·​class="refsect3">81 <div·​class="refsect3">
82 <h4>82 <h4>
83 <a·​name="idm9075912"></​a>Command·​Options</​h4>83 <a·​name="idm9055432"></​a>Command·​Options</​h4>
84 <p>The·​following·​command·​options·​may·​be·​used:​</​p>84 <p>The·​following·​command·​options·​may·​be·​used:​</​p>
85 <dl>85 <dl>
86 <span·​class="term"><span·​class="methodname">cr​eate</​span></​span><dd>86 <span·​class="term"><span·​class="methodname">cr​eate</​span></​span><dd>
87 <div·​class="cmdsynopsis"·​id="idm9072968">87 <div·​class="cmdsynopsis"·​id="idm9052488">
88 <a·​name="idm9072968"></​a>create·​<em>name</​em>·​?·​<em>-​createcommand</​em><em>script</​em>?·​?·​<em>-​createentityparsercom​mand</​em><em>script</​em>?·​?·​<em>-​parsecommand</​em><em>script</​em>?·​?·​<em>-​configurecommand</​em><em>script</​em>?·​?·​<em>-​getcommand</​em><em>script</​em>?·​?·​<em>-​deletecommand</​em><em>script</​em>?</​div>88 <a·​name="idm9052488"></​a>create·​<em>name</​em>·​?·​<em>-​createcommand</​em><em>script</​em>?·​?·​<em>-​createentityparsercom​mand</​em><em>script</​em>?·​?·​<em>-​parsecommand</​em><em>script</​em>?·​?·​<em>-​configurecommand</​em><em>script</​em>?·​?·​<em>-​getcommand</​em><em>script</​em>?·​?·​<em>-​deletecommand</​em><em>script</​em>?</​div>
89 <p>Creates·​an·​XML·​parser·​class·​with·​the·​given·​name.​</​p>89 <p>Creates·​an·​XML·​parser·​class·​with·​the·​given·​name.​</​p>
90 </​dd>90 </​dd>
91 <span·​class="term"><span·​class="methodname">de​stroy</​span></​span><dd>91 <span·​class="term"><span·​class="methodname">de​stroy</​span></​span><dd>
92 <div·​class="cmdsynopsis"·​id="idm9059400">92 <div·​class="cmdsynopsis"·​id="idm9038920">
93 <a·​name="idm9059400"></​a>destroy·​<em>name</​em>93 <a·​name="idm9038920"></​a>destroy·​<em>name</​em>
94 </​div>94 </​div>
95 <p>Destroys·​an·​XML·​parser·​class.​</​p>95 <p>Destroys·​an·​XML·​parser·​class.​</​p>
96 </​dd>96 </​dd>
97 <span·​class="term"><span·​class="methodname">in​fo</​span></​span><dd>97 <span·​class="term"><span·​class="methodname">in​fo</​span></​span><dd>
98 <div·​class="cmdsynopsis"·​id="idm9055944">98 <div·​class="cmdsynopsis"·​id="idm9035464">
99 <a·​name="idm9055944"></​a><tt>:​:​xml:​:​parserclass</​tt>·​<u>info</​u>·​names·​default</​div>99 <a·​name="idm9035464"></​a><tt>:​:​xml:​:​parserclass</​tt>·​<u>info</​u>·​names·​default</​div>
100 <p>Returns·​information·​about·​registered·​XML·​parser·​classes.​</​p>100 <p>Returns·​information·​about·​registered·​XML·​parser·​classes.​</​p>
101 </​dd>101 </​dd>
102 </​dl>102 </​dl>
103 </​div>103 </​div>
104 </​div>104 </​div>
105 <div·​class="refsect2">105 <div·​class="refsect2">
106 <h3>106 <h3>
107 <a·​name="idm9052872"></​a><strong>:​:​xml:​:​parser</​strong>107 <a·​name="idm9032392"></​a><strong>:​:​xml:​:​parser</​strong>
108 </​h3>108 </​h3>
109 <p>The·​<strong>:​:​xml:​:​parser</​strong>·​command·​creates·​an·​<em>XML</​em>·​parser·​object.​··​The·​return·​value·​of·​the·​command·​is·​the·​name·​of·​the·​newly·​created·​parser.​</​p>109 <p>The·​<strong>:​:​xml:​:​parser</​strong>·​command·​creates·​an·​<em>XML</​em>·​parser·​object.​··​The·​return·​value·​of·​the·​command·​is·​the·​name·​of·​the·​newly·​created·​parser.​</​p>
110 <p>The·​parser·​scans·​an·​XML·​document's·​syntactical·​structure,​·​evaluating·​callback·​scripts·​for·​each·​feature·​found.​··​At·​the·​very·​least·​the·​parser·​will·​normalise·​the·​document·​and·​check·​the·​document·​for·​well-​formedness.​··​If·​the·​document·​is·​not·​well-​formed·​then·​the··​<em>-​errorcommand</​em>·​option·​will·​be·​evaluated.​··​Some·​parser·​classes·​may·​perform·​additional·​functions,​·​such·​as·​validation.​··​Additional·​features·​provided·​by·​the·​various·​parser·​classes·​are·​described·​in·​the·​section·​Parser·​Classes</​p>110 <p>The·​parser·​scans·​an·​XML·​document's·​syntactical·​structure,​·​evaluating·​callback·​scripts·​for·​each·​feature·​found.​··​At·​the·​very·​least·​the·​parser·​will·​normalise·​the·​document·​and·​check·​the·​document·​for·​well-​formedness.​··​If·​the·​document·​is·​not·​well-​formed·​then·​the··​<em>-​errorcommand</​em>·​option·​will·​be·​evaluated.​··​Some·​parser·​classes·​may·​perform·​additional·​functions,​·​such·​as·​validation.​··​Additional·​features·​provided·​by·​the·​various·​parser·​classes·​are·​described·​in·​the·​section·​Parser·​Classes</​p>
111 <p>Parsing·​is·​performed·​synchronously.​··​The·​command·​blocks·​until·​the·​entire·​document·​has·​been·​parsed.​··​Parsing·​may·​be·​terminated·​by·​an·​application·​callback,​·​see·​the·​section·​Callback·​Return·​Codes.​··​Incremental·​parsing·​is·​also·​supported·​by·​using·​the··​<em>-​final</​em>·​configuration·​option.​</​p>111 <p>Parsing·​is·​performed·​synchronously.​··​The·​command·​blocks·​until·​the·​entire·​document·​has·​been·​parsed.​··​Parsing·​may·​be·​terminated·​by·​an·​application·​callback,​·​see·​the·​section·​Callback·​Return·​Codes.​··​Incremental·​parsing·​is·​also·​supported·​by·​using·​the··​<em>-​final</​em>·​configuration·​option.​</​p>
112 <div·​class="refsect3">112 <div·​class="refsect3">
113 <h4>113 <h4>
114 <a·​name="idm9020104"></​a>Configuration·​Options</​h4>114 <a·​name="idm8999624"></​a>Configuration·​Options</​h4>
115 <p>The·​<strong>:​:​xml:​:​parser</​strong>·​command·​accepts·​the·​following·​configuration·​options:​</​p>115 <p>The·​<strong>:​:​xml:​:​parser</​strong>·​command·​accepts·​the·​following·​configuration·​options:​</​p>
116 <dl>116 <dl>
117 <span·​class="term">·​<em>-​attlistdeclcommand</​em></​span><dd>117 <span·​class="term">·​<em>-​attlistdeclcommand</​em></​span><dd>
118 <p><tt>-​attlistdeclcommand</​tt>·​<u><em>script</​em></​u></​p>118 <p><tt>-​attlistdeclcommand</​tt>·​<u><em>script</​em></​u></​p>
119 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​whenever·​an·​attribute·​list·​declaration·​is·​encountered·​in·​the·​DTD·​subset·​of·​an·​XML·​document.​··​The·​command·​evaluated·​is:​</​p>119 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​whenever·​an·​attribute·​list·​declaration·​is·​encountered·​in·​the·​DTD·​subset·​of·​an·​XML·​document.​··​The·​command·​evaluated·​is:​</​p>
120 <div·​class="cmdsynopsis"·​id="idm9014856">120 <div·​class="cmdsynopsis"·​id="idm8994376">
121 <a·​name="idm9014856"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>attrname</​em>·​<em>type</​em>·​<em>default</​em>·​<em>value</​em>121 <a·​name="idm8994376"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>attrname</​em>·​<em>type</​em>·​<em>default</​em>·​<em>value</​em>
122 </​div>122 </​div>
123 <p>where:​</​p>123 <p>where:​</​p>
124 <table·​border="0">124 <table·​border="0">
125 <tr>125 <tr>
126 <td·​valign="top">·​<tt><em>name</​em></​tt>126 <td·​valign="top">·​<tt><em>name</​em></​tt>
127 </​td>127 </​td>
128 <td·​valign="top">Element·​type·​name</​td>128 <td·​valign="top">Element·​type·​name</​td>
Offset 154, 42 lines modifiedOffset 154, 42 lines modified
154 <p><tt>-​baseurl</​tt>·​<u><em>URI</​em></​u></​p>154 <p><tt>-​baseurl</​tt>·​<u><em>URI</​em></​u></​p>
155 <p>Specifies·​the·​base·​URI·​for·​resolving·​relative·​URIs·​that·​may·​be·​used·​in·​the·​XML·​document·​to·​refer·​to·​external·​entities.​</​p>155 <p>Specifies·​the·​base·​URI·​for·​resolving·​relative·​URIs·​that·​may·​be·​used·​in·​the·​XML·​document·​to·​refer·​to·​external·​entities.​</​p>
156 <p>·​<em>-​baseurl</​em>·​is·​deprecated·​in·​favour·​of··​<em>-​baseuri</​em>.​</​p>156 <p>·​<em>-​baseurl</​em>·​is·​deprecated·​in·​favour·​of··​<em>-​baseuri</​em>.​</​p>
157 </​dd>157 </​dd>
158 <span·​class="term">·​<em>-​characterdatacommand<​/​em></​span><dd>158 <span·​class="term">·​<em>-​characterdatacommand<​/​em></​span><dd>
159 <p><tt>-​characterdatacommand<​/​tt>·​<u><em>script</​em></​u></​p>159 <p><tt>-​characterdatacommand<​/​tt>·​<u><em>script</​em></​u></​p>
160 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​whenever·​character·​data·​is·​encountered·​in·​the·​XML·​document·​being·​parsed.​··​The·​command·​evaluated·​is:​</​p>160 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​whenever·​character·​data·​is·​encountered·​in·​the·​XML·​document·​being·​parsed.​··​The·​command·​evaluated·​is:​</​p>
161 <div·​class="cmdsynopsis"·​id="idm8976840">161 <div·​class="cmdsynopsis"·​id="idm8956360">
162 <a·​name="idm8976840"></​a><tt><em>script</​em></​tt>·​<em>data</​em>162 <a·​name="idm8956360"></​a><tt><em>script</​em></​tt>·​<em>data</​em>
163 </​div>163 </​div>
164 <p>where:​</​p>164 <p>where:​</​p>
165 <table·​border="0"><tr>165 <table·​border="0"><tr>
166 <td·​valign="top">·​<tt><em>data</​em></​tt>166 <td·​valign="top">·​<tt><em>data</​em></​tt>
167 </​td>167 </​td>
168 <td·​valign="top">Characte​r·​data·​in·​the·​document</​td>168 <td·​valign="top">Characte​r·​data·​in·​the·​document</​td>
169 </​tr></​table>169 </​tr></​table>
170 </​dd>170 </​dd>
171 <span·​class="term">·​<em>-​commentcommand</​em></​span><dd>171 <span·​class="term">·​<em>-​commentcommand</​em></​span><dd>
172 <p><tt>-​commentcommand</​tt>·​<u><em>script</​em></​u></​p>172 <p><tt>-​commentcommand</​tt>·​<u><em>script</​em></​u></​p>
173 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​whenever·​a·​comment·​is·​encountered·​in·​the·​XML·​document·​being·​parsed.​··​The·​command·​evaluated·​is:​</​p>173 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​whenever·​a·​comment·​is·​encountered·​in·​the·​XML·​document·​being·​parsed.​··​The·​command·​evaluated·​is:​</​p>
174 <div·​class="cmdsynopsis"·​id="idm8968776">174 <div·​class="cmdsynopsis"·​id="idm8948296">
175 <a·​name="idm8968776"></​a><tt><em>script</​em></​tt>·​<em>data</​em>175 <a·​name="idm8948296"></​a><tt><em>script</​em></​tt>·​<em>data</​em>
176 </​div>176 </​div>
177 <p>where:​</​p>177 <p>where:​</​p>
178 <table·​border="0"><tr>178 <table·​border="0"><tr>
179 <td·​valign="top">·​<tt><em>data</​em></​tt>179 <td·​valign="top">·​<tt><em>data</​em></​tt>
180 </​td>180 </​td>
181 <td·​valign="top">Comment·​data</​td>181 <td·​valign="top">Comment·​data</​td>
182 </​tr></​table>182 </​tr></​table>
183 </​dd>183 </​dd>
184 <span·​class="term">·​<em>-​defaultcommand</​em></​span><dd>184 <span·​class="term">·​<em>-​defaultcommand</​em></​span><dd>
185 <p><tt>-​defaultcommand</​tt>·​<u><em>script</​em></​u></​p>185 <p><tt>-​defaultcommand</​tt>·​<u><em>script</​em></​u></​p>
186 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​no·​other·​callback·​has·​been·​defined·​for·​a·​document·​feature·​which·​has·​been·​encountered.​··​The·​command·​evaluated·​is:​</​p>186 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​no·​other·​callback·​has·​been·​defined·​for·​a·​document·​feature·​which·​has·​been·​encountered.​··​The·​command·​evaluated·​is:​</​p>
187 <div·​class="cmdsynopsis"·​id="idm8960712">187 <div·​class="cmdsynopsis"·​id="idm8940232">
188 <a·​name="idm8960712"></​a><tt><em>script</​em></​tt>·​<em>data</​em>188 <a·​name="idm8940232"></​a><tt><em>script</​em></​tt>·​<em>data</​em>
189 </​div>189 </​div>
190 <p>where:​</​p>190 <p>where:​</​p>
191 <table·​border="0"><tr>191 <table·​border="0"><tr>
192 <td·​valign="top">·​<tt><em>data</​em></​tt>192 <td·​valign="top">·​<tt><em>data</​em></​tt>
193 </​td>193 </​td>
194 <td·​valign="top">Document​·​data</​td>194 <td·​valign="top">Document​·​data</​td>
195 </​tr></​table>195 </​tr></​table>
Offset 197, 16 lines modifiedOffset 197, 16 lines modified
197 <span·​class="term">·​<em>-​defaultexpandinternal​entities</​em></​span><dd>197 <span·​class="term">·​<em>-​defaultexpandinternal​entities</​em></​span><dd>
198 <p><tt>-​defaultexpandinternal​entities</​tt>·​<u><em>boolean</​em></​u></​p>198 <p><tt>-​defaultexpandinternal​entities</​tt>·​<u><em>boolean</​em></​u></​p>
199 <p>Specifies·​whether·​entities·​declared·​in·​the·​internal·​DTD·​subset·​are·​expanded·​with·​their·​replacement·​text.​··​If·​entities·​are·​not·​expanded·​then·​the·​entity·​references·​will·​be·​reported·​with·​no·​expansion.​</​p>199 <p>Specifies·​whether·​entities·​declared·​in·​the·​internal·​DTD·​subset·​are·​expanded·​with·​their·​replacement·​text.​··​If·​entities·​are·​not·​expanded·​then·​the·​entity·​references·​will·​be·​reported·​with·​no·​expansion.​</​p>
200 </​dd>200 </​dd>
201 <span·​class="term">·​<em>-​doctypecommand</​em></​span><dd>201 <span·​class="term">·​<em>-​doctypecommand</​em></​span><dd>
202 <p><tt>-​doctypecommand</​tt>·​<u><em>script</​em></​u></​p>202 <p><tt>-​doctypecommand</​tt>·​<u><em>script</​em></​u></​p>
203 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​the·​document·​type·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>203 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​the·​document·​type·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>
204 <div·​class="cmdsynopsis"·​id="idm8949192">204 <div·​class="cmdsynopsis"·​id="idm8928712">
205 <a·​name="idm8949192"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>public</​em>·​<em>system</​em>·​<em>dtd</​em>205 <a·​name="idm8928712"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>public</​em>·​<em>system</​em>·​<em>dtd</​em>
206 </​div>206 </​div>
207 <p>where:​</​p>207 <p>where:​</​p>
208 <table·​border="0">208 <table·​border="0">
209 <tr>209 <tr>
210 <td·​valign="top">·​<tt><em>name</​em></​tt>210 <td·​valign="top">·​<tt><em>name</​em></​tt>
211 </​td>211 </​td>
212 <td·​valign="top">The·​name·​of·​the·​document·​element</​td>212 <td·​valign="top">The·​name·​of·​the·​document·​element</​td>
Offset 228, 16 lines modifiedOffset 228, 16 lines modified
228 </​tr>228 </​tr>
229 </​table>229 </​table>
230 <p>See·​also··​<em>-​startdoctypedeclcomma​nd</​em>·​and··​<em>-​enddoctypedeclcommand​</​em>.​</​p>230 <p>See·​also··​<em>-​startdoctypedeclcomma​nd</​em>·​and··​<em>-​enddoctypedeclcommand​</​em>.​</​p>
231 </​dd>231 </​dd>
232 <span·​class="term">·​<em>-​elementdeclcommand</​em></​span><dd>232 <span·​class="term">·​<em>-​elementdeclcommand</​em></​span><dd>
233 <p><tt>-​elementdeclcommand</​tt>·​<u><em>script</​em></​u></​p>233 <p><tt>-​elementdeclcommand</​tt>·​<u><em>script</​em></​u></​p>
234 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​an·​element·​markup·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>234 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​an·​element·​markup·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>
235 <div·​class="cmdsynopsis"·​id="idm8931912">235 <div·​class="cmdsynopsis"·​id="idm8911432">
236 <a·​name="idm8931912"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>model</​em>236 <a·​name="idm8911432"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>model</​em>
237 </​div>237 </​div>
238 <p>where:​</​p>238 <p>where:​</​p>
239 <table·​border="0">239 <table·​border="0">
240 <tr>240 <tr>
241 <td·​valign="top">·​<tt><em>name</​em></​tt>241 <td·​valign="top">·​<tt><em>name</​em></​tt>
242 </​td>242 </​td>
243 <td·​valign="top">The·​element·​type·​name</​td>243 <td·​valign="top">The·​element·​type·​name</​td>
Offset 248, 16 lines modifiedOffset 248, 16 lines modified
248 <td·​valign="top">Content·​model·​specification</​td>248 <td·​valign="top">Content·​model·​specification</​td>
249 </​tr>249 </​tr>
250 </​table>250 </​table>
251 </​dd>251 </​dd>
252 <span·​class="term">·​<em>-​elementendcommand</​em></​span><dd>252 <span·​class="term">·​<em>-​elementendcommand</​em></​span><dd>
253 <p><tt>-​elementendcommand</​tt>·​<u><em>script</​em></​u></​p>253 <p><tt>-​elementendcommand</​tt>·​<u><em>script</​em></​u></​p>
254 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​an·​element·​end·​tag·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>254 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​an·​element·​end·​tag·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>
255 <div·​class="cmdsynopsis"·​id="idm8916936">255 <div·​class="cmdsynopsis"·​id="idm8896456">
256 <a·​name="idm8916936"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>args</​em>256 <a·​name="idm8896456"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>args</​em>
257 </​div>257 </​div>
258 <p>where:​</​p>258 <p>where:​</​p>
259 <table·​border="0">259 <table·​border="0">
260 <tr>260 <tr>
261 <td·​valign="top">·​<tt><em>name</​em></​tt>261 <td·​valign="top">·​<tt><em>name</​em></​tt>
262 </​td>262 </​td>
263 <td·​valign="top">The·​element·​type·​name·​that·​has·​ended</​td>263 <td·​valign="top">The·​element·​type·​name·​that·​has·​ended</​td>
Offset 281, 16 lines modifiedOffset 281, 16 lines modified
281 <td·​valign="top">The·​element·​is·​in·​the·​XML·​namespace·​associated·​with·​the·​given·​URI</​td>281 <td·​valign="top">The·​element·​is·​in·​the·​XML·​namespace·​associated·​with·​the·​given·​URI</​td>
282 </​tr>282 </​tr>
283 </​table>283 </​table>
284 </​dd>284 </​dd>
285 <span·​class="term">·​<em>-​elementstartcommand</​em></​span><dd>285 <span·​class="term">·​<em>-​elementstartcommand</​em></​span><dd>
286 <p><tt>-​elementstartcommand</​tt>·​<u><em>script</​em></​u></​p>286 <p><tt>-​elementstartcommand</​tt>·​<u><em>script</​em></​u></​p>
287 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​an·​element·​start·​tag·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>287 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​an·​element·​start·​tag·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>
288 <div·​class="cmdsynopsis"·​id="idm8900552">288 <div·​class="cmdsynopsis"·​id="idm8880072">
289 <a·​name="idm8900552"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>attlist</​em>·​<em>args</​em>289 <a·​name="idm8880072"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>attlist</​em>·​<em>args</​em>
290 </​div>290 </​div>
291 <p>where:​</​p>291 <p>where:​</​p>
292 <table·​border="0">292 <table·​border="0">
293 <tr>293 <tr>
294 <td·​valign="top">·​<tt><em>name</​em></​tt>294 <td·​valign="top">·​<tt><em>name</​em></​tt>
295 </​td>295 </​td>
296 <td·​valign="top">The·​element·​type·​name·​that·​has·​started</​td>296 <td·​valign="top">The·​element·​type·​name·​that·​has·​started</​td>
Offset 336, 16 lines modifiedOffset 336, 16 lines modified
336 <span·​class="term">·​<em>-​enddoctypedeclcommand​</​em></​span><dd>336 <span·​class="term">·​<em>-​enddoctypedeclcommand​</​em></​span><dd>
337 <p><tt>-​enddoctypedeclcommand​</​tt>·​<u><em>script</​em></​u></​p>337 <p><tt>-​enddoctypedeclcommand​</​tt>·​<u><em>script</​em></​u></​p>
338 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​end·​of·​the·​document·​type·​declaration·​is·​encountered.​··​The·​command·​is·​evaluated·​with·​no·​further·​arguments.​</​p>338 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​end·​of·​the·​document·​type·​declaration·​is·​encountered.​··​The·​command·​is·​evaluated·​with·​no·​further·​arguments.​</​p>
339 </​dd>339 </​dd>
340 <span·​class="term">·​<em>-​entitydeclcommand</​em></​span><dd>340 <span·​class="term">·​<em>-​entitydeclcommand</​em></​span><dd>
341 <p><tt>-​entitydeclcommand</​tt>·​<u><em>script</​em></​u></​p>341 <p><tt>-​entitydeclcommand</​tt>·​<u><em>script</​em></​u></​p>
342 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​an·​entity·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>342 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​an·​entity·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>
343 <div·​class="cmdsynopsis"·​id="idm8865992">343 <div·​class="cmdsynopsis"·​id="idm8845512">
344 <a·​name="idm8865992"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>args</​em>344 <a·​name="idm8845512"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>args</​em>
345 </​div>345 </​div>
346 <p>where:​</​p>346 <p>where:​</​p>
347 <table·​border="0">347 <table·​border="0">
348 <tr>348 <tr>
349 <td·​valign="top">·​<tt><em>name</​em></​tt>349 <td·​valign="top">·​<tt><em>name</​em></​tt>
350 </​td>350 </​td>
351 <td·​valign="top">The·​name·​of·​the·​entity·​being·​declared</​td>351 <td·​valign="top">The·​name·​of·​the·​entity·​being·​declared</​td>
Offset 356, 29 lines modifiedOffset 356, 29 lines modified
356 <td·​valign="top">Addition​al·​information·​about·​the·​entity·​declaration.​··​An·​internal·​entity·​shall·​have·​a·​single·​argument,​·​the·​replacement·​text.​··​An·​external·​parsed·​entity·​shall·​have·​two·​additional·​arguments,​·​the·​public·​and·​system·​indentifiers·​of·​the·​external·​resource.​··​An·​external·​unparsed·​entity·​shall·​have·​three·​additional·​arguments,​·​the·​public·​and·​system·​identifiers·​followed·​by·​the·​notation·​name.​</​td>356 <td·​valign="top">Addition​al·​information·​about·​the·​entity·​declaration.​··​An·​internal·​entity·​shall·​have·​a·​single·​argument,​·​the·​replacement·​text.​··​An·​external·​parsed·​entity·​shall·​have·​two·​additional·​arguments,​·​the·​public·​and·​system·​indentifiers·​of·​the·​external·​resource.​··​An·​external·​unparsed·​entity·​shall·​have·​three·​additional·​arguments,​·​the·​public·​and·​system·​identifiers·​followed·​by·​the·​notation·​name.​</​td>
357 </​tr>357 </​tr>
358 </​table>358 </​table>
359 </​dd>359 </​dd>
360 <span·​class="term">·​<em>-​entityreferencecomman​d</​em></​span><dd>360 <span·​class="term">·​<em>-​entityreferencecomman​d</​em></​span><dd>
361 <p><tt>-​entityreferencecomman​d</​tt>·​<u><em>script</​em></​u></​p>361 <p><tt>-​entityreferencecomman​d</​tt>·​<u><em>script</​em></​u></​p>
362 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​an·​entity·​reference·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>362 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​an·​entity·​reference·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>
363 <div·​class="cmdsynopsis"·​id="idm8809800">363 <div·​class="cmdsynopsis"·​id="idm8789320">
364 <a·​name="idm8809800"></​a><tt><em>script</​em></​tt>·​<em>name</​em>364 <a·​name="idm8789320"></​a><tt><em>script</​em></​tt>·​<em>name</​em>
365 </​div>365 </​div>
366 <p>where:​</​p>366 <p>where:​</​p>
367 <table·​border="0"><tr>367 <table·​border="0"><tr>
368 <td·​valign="top">·​<tt><em>name</​em></​tt>368 <td·​valign="top">·​<tt><em>name</​em></​tt>
369 </​td>369 </​td>
370 <td·​valign="top">The·​name·​of·​the·​entity·​being·​referenced</​td>370 <td·​valign="top">The·​name·​of·​the·​entity·​being·​referenced</​td>
371 </​tr></​table>371 </​tr></​table>
372 </​dd>372 </​dd>
373 <span·​class="term">·​<em>-​errorcommand</​em></​span><dd>373 <span·​class="term">·​<em>-​errorcommand</​em></​span><dd>
374 <p><tt>-​errorcommand</​tt>·​<u><em>script</​em></​u></​p>374 <p><tt>-​errorcommand</​tt>·​<u><em>script</​em></​u></​p>
375 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​fatal·​error·​is·​detected.​··​The·​error·​may·​be·​due·​to·​the·​XML·​document·​not·​being·​well-​formed.​··​In·​the·​case·​of·​a·​validating·​parser·​class,​·​the·​error·​may·​also·​be·​due·​to·​the·​XML·​document·​not·​obeying·​validity·​constraints.​··​By·​default,​·​a·​callback·​script·​is·​provided·​which·​causes·​an·​error·​return·​code,​·​but·​an·​application·​may·​supply·​a·​script·​which·​attempts·​to·​continue·​parsing.​··​The·​command·​evaluated·​is:​</​p>375 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​fatal·​error·​is·​detected.​··​The·​error·​may·​be·​due·​to·​the·​XML·​document·​not·​being·​well-​formed.​··​In·​the·​case·​of·​a·​validating·​parser·​class,​·​the·​error·​may·​also·​be·​due·​to·​the·​XML·​document·​not·​obeying·​validity·​constraints.​··​By·​default,​·​a·​callback·​script·​is·​provided·​which·​causes·​an·​error·​return·​code,​·​but·​an·​application·​may·​supply·​a·​script·​which·​attempts·​to·​continue·​parsing.​··​The·​command·​evaluated·​is:​</​p>
376 <div·​class="cmdsynopsis"·​id="idm8801736">376 <div·​class="cmdsynopsis"·​id="idm8781256">
377 <a·​name="idm8801736"></​a><tt><em>script</​em></​tt>·​<em>errorcode</​em>·​<em>errormsg</​em>377 <a·​name="idm8781256"></​a><tt><em>script</​em></​tt>·​<em>errorcode</​em>·​<em>errormsg</​em>
378 </​div>378 </​div>
379 <p>where:​</​p>379 <p>where:​</​p>
380 <table·​border="0">380 <table·​border="0">
381 <tr>381 <tr>
382 <td·​valign="top">·​<tt><em>errorcode</​em></​tt>382 <td·​valign="top">·​<tt><em>errorcode</​em></​tt>
383 </​td>383 </​td>
384 <td·​valign="top">A·​single·​word·​description·​of·​the·​error,​·​intended·​for·​use·​by·​an·​application</​td>384 <td·​valign="top">A·​single·​word·​description·​of·​the·​error,​·​intended·​for·​use·​by·​an·​application</​td>
Offset 389, 16 lines modifiedOffset 389, 16 lines modified
389 <td·​valign="top">A·​human-​readable·​description·​of·​the·​error</​td>389 <td·​valign="top">A·​human-​readable·​description·​of·​the·​error</​td>
390 </​tr>390 </​tr>
391 </​table>391 </​table>
392 </​dd>392 </​dd>
393 <span·​class="term">·​<em>-​externalentitycommand​</​em></​span><dd>393 <span·​class="term">·​<em>-​externalentitycommand​</​em></​span><dd>
394 <p><tt>-​externalentitycommand​</​tt>·​<u><em>script</​em></​u></​p>394 <p><tt>-​externalentitycommand​</​tt>·​<u><em>script</​em></​u></​p>
395 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​to·​resolve·​an·​external·​entity·​reference.​··​If·​the·​parser·​has·​been·​configured·​to·​validate·​the·​XML·​document,​·​a·​default·​script·​is·​supplied·​that·​resolves·​the·​URI·​given·​as·​the·​system·​identifier·​of·​the·​external·​entity·​and·​recursively·​parses·​the·​entity's·​data.​··​If·​the·​parser·​has·​been·​configured·​as·​a·​non-​validating·​parser,​·​then·​by·​default·​external·​entities·​are·​not·​resolved.​··​This·​option·​can·​be·​used·​to·​override·​the·​default·​behaviour.​··​The·​command·​evaluated·​is:​</​p>395 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​to·​resolve·​an·​external·​entity·​reference.​··​If·​the·​parser·​has·​been·​configured·​to·​validate·​the·​XML·​document,​·​a·​default·​script·​is·​supplied·​that·​resolves·​the·​URI·​given·​as·​the·​system·​identifier·​of·​the·​external·​entity·​and·​recursively·​parses·​the·​entity's·​data.​··​If·​the·​parser·​has·​been·​configured·​as·​a·​non-​validating·​parser,​·​then·​by·​default·​external·​entities·​are·​not·​resolved.​··​This·​option·​can·​be·​used·​to·​override·​the·​default·​behaviour.​··​The·​command·​evaluated·​is:​</​p>
396 <div·​class="cmdsynopsis"·​id="idm8790984">396 <div·​class="cmdsynopsis"·​id="idm8770504">
397 <a·​name="idm8790984"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>baseuri</​em>·​<em>uri</​em>·​<em>id</​em>397 <a·​name="idm8770504"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>baseuri</​em>·​<em>uri</​em>·​<em>id</​em>
398 </​div>398 </​div>
399 <p>where:​</​p>399 <p>where:​</​p>
400 <table·​border="0">400 <table·​border="0">
401 <tr>401 <tr>
402 <td·​valign="top">·​<tt><em>name</​em></​tt>402 <td·​valign="top">·​<tt><em>name</​em></​tt>
403 </​td>403 </​td>
404 <td·​valign="top">The·​Tcl·​command·​name·​of·​the·​current·​parser</​td>404 <td·​valign="top">The·​Tcl·​command·​name·​of·​the·​current·​parser</​td>
Offset 480, 16 lines modifiedOffset 480, 16 lines modified
480 <span·​class="term">·​<em>-​ignorewhitespace</​em></​span><dd>480 <span·​class="term">·​<em>-​ignorewhitespace</​em></​span><dd>
481 <p><tt>-​ignorewhitespace</​tt>·​<u><em>boolean</​em></​u></​p>481 <p><tt>-​ignorewhitespace</​tt>·​<u><em>boolean</​em></​u></​p>
482 <p>If·​this·​option·​is·​set·​to·​true·​then·​spans·​of·​character·​data·​in·​the·​XML·​document·​which·​are·​composed·​only·​of·​white-​space·​(CR,​·​LF,​·​space,​·​tab)​·​will·​not·​be·​reported·​to·​the·​application.​··​In·​other·​words,​·​the·​data·​passed·​to·​every·​invocation·​of·​the··​<em>-​characterdatacommand<​/​em>·​script·​will·​contain·​at·​least·​one·​non-​white-​space·​character.​</​p>482 <p>If·​this·​option·​is·​set·​to·​true·​then·​spans·​of·​character·​data·​in·​the·​XML·​document·​which·​are·​composed·​only·​of·​white-​space·​(CR,​·​LF,​·​space,​·​tab)​·​will·​not·​be·​reported·​to·​the·​application.​··​In·​other·​words,​·​the·​data·​passed·​to·​every·​invocation·​of·​the··​<em>-​characterdatacommand<​/​em>·​script·​will·​contain·​at·​least·​one·​non-​white-​space·​character.​</​p>
483 </​dd>483 </​dd>
484 <span·​class="term">·​<em>-​notationdeclcommand</​em></​span><dd>484 <span·​class="term">·​<em>-​notationdeclcommand</​em></​span><dd>
485 <p><tt>-​notationdeclcommand</​tt>·​<u><em>script</​em></​u></​p>485 <p><tt>-​notationdeclcommand</​tt>·​<u><em>script</​em></​u></​p>
486 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​notation·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>486 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​notation·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>
487 <div·​class="cmdsynopsis"·​id="idm8722760">487 <div·​class="cmdsynopsis"·​id="idm8702280">
488 <a·​name="idm8722760"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>uri</​em>488 <a·​name="idm8702280"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>uri</​em>
489 </​div>489 </​div>
490 <p>where:​</​p>490 <p>where:​</​p>
491 <table·​border="0">491 <table·​border="0">
492 <tr>492 <tr>
493 <td·​valign="top">·​<tt><em>name</​em></​tt>493 <td·​valign="top">·​<tt><em>name</​em></​tt>
494 </​td>494 </​td>
495 <td·​valign="top">The·​name·​of·​the·​notation</​td>495 <td·​valign="top">The·​name·​of·​the·​notation</​td>
Offset 508, 16 lines modifiedOffset 508, 16 lines modified
508 <span·​class="term">·​<em>-​paramentityparsing</​em></​span><dd>508 <span·​class="term">·​<em>-​paramentityparsing</​em></​span><dd>
509 <p><tt>-​paramentityparsing</​tt>·​<u><em>boolean</​em></​u></​p>509 <p><tt>-​paramentityparsing</​tt>·​<u><em>boolean</​em></​u></​p>
510 <p>Controls·​whether·​external·​parameter·​entities·​are·​parsed.​</​p>510 <p>Controls·​whether·​external·​parameter·​entities·​are·​parsed.​</​p>
511 </​dd>511 </​dd>
512 <span·​class="term">·​<em>-​parameterentitydeclco​mmand</​em></​span><dd>512 <span·​class="term">·​<em>-​parameterentitydeclco​mmand</​em></​span><dd>
513 <p><tt>-​parameterentitydeclco​mmand</​tt>·​<u><em>script</​em></​u></​p>513 <p><tt>-​parameterentitydeclco​mmand</​tt>·​<u><em>script</​em></​u></​p>
514 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​parameter·​entity·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>514 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​parameter·​entity·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>
515 <div·​class="cmdsynopsis"·​id="idm8705096">515 <div·​class="cmdsynopsis"·​id="idm8684616">
516 <a·​name="idm8705096"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>args</​em>516 <a·​name="idm8684616"></​a><tt><em>script</​em></​tt>·​<em>name</​em>·​<em>args</​em>
517 </​div>517 </​div>
518 <p>where:​</​p>518 <p>where:​</​p>
519 <table·​border="0">519 <table·​border="0">
520 <tr>520 <tr>
521 <td·​valign="top">·​<tt><em>name</​em></​tt>521 <td·​valign="top">·​<tt><em>name</​em></​tt>
522 </​td>522 </​td>
523 <td·​valign="top">The·​name·​of·​the·​parameter·​entity</​td>523 <td·​valign="top">The·​name·​of·​the·​parameter·​entity</​td>
Offset 532, 16 lines modifiedOffset 532, 16 lines modified
532 <span·​class="term">·​<em>-​parser</​em></​span><dd>532 <span·​class="term">·​<em>-​parser</​em></​span><dd>
533 <p><tt>-​parser</​tt>·​<u><em>name</​em></​u></​p>533 <p><tt>-​parser</​tt>·​<u><em>name</​em></​u></​p>
534 <p>The·​name·​of·​the·​parser·​class·​to·​instantiate·​for·​this·​parser·​object.​··​This·​option·​may·​only·​be·​specified·​when·​the·​parser·​instance·​is·​created.​</​p>534 <p>The·​name·​of·​the·​parser·​class·​to·​instantiate·​for·​this·​parser·​object.​··​This·​option·​may·​only·​be·​specified·​when·​the·​parser·​instance·​is·​created.​</​p>
535 </​dd>535 </​dd>
536 <span·​class="term">·​<em>-​processinginstruction​command</​em></​span><dd>536 <span·​class="term">·​<em>-​processinginstruction​command</​em></​span><dd>
537 <p><tt>-​processinginstruction​command</​tt>·​<u><em>script</​em></​u></​p>537 <p><tt>-​processinginstruction​command</​tt>·​<u><em>script</​em></​u></​p>
538 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​processing·​instruction·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>538 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​processing·​instruction·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>
539 <div·​class="cmdsynopsis"·​id="idm8690504">539 <div·​class="cmdsynopsis"·​id="idm8670024">
540 <a·​name="idm8690504"></​a><tt><em>script</​em></​tt>·​<em>target</​em>·​<em>data</​em>540 <a·​name="idm8670024"></​a><tt><em>script</​em></​tt>·​<em>target</​em>·​<em>data</​em>
541 </​div>541 </​div>
542 <p>where:​</​p>542 <p>where:​</​p>
543 <table·​border="0">543 <table·​border="0">
544 <tr>544 <tr>
545 <td·​valign="top">·​<tt><em>target</​em></​tt>545 <td·​valign="top">·​<tt><em>target</​em></​tt>
546 </​td>546 </​td>
547 <td·​valign="top">The·​name·​of·​the·​processing·​instruction·​target</​td>547 <td·​valign="top">The·​name·​of·​the·​processing·​instruction·​target</​td>
Offset 552, 16 lines modifiedOffset 552, 16 lines modified
552 <td·​valign="top">Remainin​g·​data·​from·​the·​processing·​instruction</​td>552 <td·​valign="top">Remainin​g·​data·​from·​the·​processing·​instruction</​td>
553 </​tr>553 </​tr>
554 </​table>554 </​table>
555 </​dd>555 </​dd>
556 <span·​class="term">·​<em>-​reportempty</​em></​span><dd>556 <span·​class="term">·​<em>-​reportempty</​em></​span><dd>
557 <p><tt>-​reportempty</​tt>·​<u><em>boolean</​em></​u></​p>557 <p><tt>-​reportempty</​tt>·​<u><em>boolean</​em></​u></​p>
558 <p>If·​this·​option·​is·​enabled·​then·​when·​an·​element·​is·​encountered·​that·​uses·​the·​special·​empty·​element·​syntax,​·​additional·​arguments·​are·​appended·​to·​the··​<em>-​elementstartcommand</​em>·​and··​<em>-​elementendcommand</​em>·​callbacks.​··​The·​arguments·​<span·​class="arg">-​empty·​1</​span>·​are·​appended.​··​For·​example:​</​p>558 <p>If·​this·​option·​is·​enabled·​then·​when·​an·​element·​is·​encountered·​that·​uses·​the·​special·​empty·​element·​syntax,​·​additional·​arguments·​are·​appended·​to·​the··​<em>-​elementstartcommand</​em>·​and··​<em>-​elementendcommand</​em>·​callbacks.​··​The·​arguments·​<span·​class="arg">-​empty·​1</​span>·​are·​appended.​··​For·​example:​</​p>
559 <div·​class="cmdsynopsis"·​id="idm8678600">559 <div·​class="cmdsynopsis"·​id="idm8658120">
560 <a·​name="idm8678600"></​a><tt><em>script</​em></​tt>··​<em>-​empty</​em>1</​div>560 <a·​name="idm8658120"></​a><tt><em>script</​em></​tt>··​<em>-​empty</​em>1</​div>
561 </​dd>561 </​dd>
562 <span·​class="term">·​<em>-​startcdatasectioncomm​and</​em></​span><dd>562 <span·​class="term">·​<em>-​startcdatasectioncomm​and</​em></​span><dd>
563 <p><tt>-​startcdatasectioncomm​and</​tt>·​<u><em>script</​em></​u></​p>563 <p><tt>-​startcdatasectioncomm​and</​tt>·​<u><em>script</​em></​u></​p>
564 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​the·​start·​of·​a·​CDATA·​section·​section·​is·​encountered.​··​No·​arguments·​are·​appended·​to·​the·​script.​</​p>564 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​the·​start·​of·​a·​CDATA·​section·​section·​is·​encountered.​··​No·​arguments·​are·​appended·​to·​the·​script.​</​p>
565 </​dd>565 </​dd>
566 <span·​class="term">·​<em>-​startdoctypedeclcomma​nd</​em></​span><dd>566 <span·​class="term">·​<em>-​startdoctypedeclcomma​nd</​em></​span><dd>
567 <p><tt>-​startdoctypedeclcomma​nd</​tt>·​<u><em>script</​em></​u></​p>567 <p><tt>-​startdoctypedeclcomma​nd</​tt>·​<u><em>script</​em></​u></​p>
Offset 570, 16 lines modifiedOffset 570, 16 lines modified
570 <span·​class="term">·​<em>-​unknownencodingcomman​d</​em></​span><dd>570 <span·​class="term">·​<em>-​unknownencodingcomman​d</​em></​span><dd>
571 <p><tt>-​unknownencodingcomman​d</​tt>·​<u><em>script</​em></​u></​p>571 <p><tt>-​unknownencodingcomman​d</​tt>·​<u><em>script</​em></​u></​p>
572 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​character·​is·​encountered·​with·​an·​unknown·​encoding.​··​This·​option·​has·​not·​been·​implemented.​</​p>572 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​character·​is·​encountered·​with·​an·​unknown·​encoding.​··​This·​option·​has·​not·​been·​implemented.​</​p>
573 </​dd>573 </​dd>
574 <span·​class="term">·​<em>-​unparsedentitydeclcom​mand</​em></​span><dd>574 <span·​class="term">·​<em>-​unparsedentitydeclcom​mand</​em></​span><dd>
575 <p><tt>-​unparsedentitydeclcom​mand</​tt>·​<u><em>script</​em></​u></​p>575 <p><tt>-​unparsedentitydeclcom​mand</​tt>·​<u><em>script</​em></​u></​p>
576 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​declaration·​is·​encountered·​for·​an·​unparsed·​entity.​··​The·​command·​evaluated·​is:​</​p>576 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​declaration·​is·​encountered·​for·​an·​unparsed·​entity.​··​The·​command·​evaluated·​is:​</​p>
577 <div·​class="cmdsynopsis"·​id="idm8658760">577 <div·​class="cmdsynopsis"·​id="idm8638280">
578 <a·​name="idm8658760"></​a><tt><em>script</​em></​tt>·​<em>system</​em>·​<em>public</​em>·​<em>notation</​em>578 <a·​name="idm8638280"></​a><tt><em>script</​em></​tt>·​<em>system</​em>·​<em>public</​em>·​<em>notation</​em>
579 </​div>579 </​div>
580 <p>where:​</​p>580 <p>where:​</​p>
581 <table·​border="0">581 <table·​border="0">
582 <tr>582 <tr>
583 <td·​valign="top">·​<tt><em>system</​em></​tt>583 <td·​valign="top">·​<tt><em>system</​em></​tt>
584 </​td>584 </​td>
585 <td·​valign="top">The·​system·​identifier·​of·​the·​external·​entity,​·​usually·​a·​URI</​td>585 <td·​valign="top">The·​system·​identifier·​of·​the·​external·​entity,​·​usually·​a·​URI</​td>
Offset 599, 16 lines modifiedOffset 599, 16 lines modified
599 <span·​class="term">·​<em>-​validate</​em></​span><dd>599 <span·​class="term">·​<em>-​validate</​em></​span><dd>
600 <p><tt>-​validate</​tt>·​<u><em>boolean</​em></​u></​p>600 <p><tt>-​validate</​tt>·​<u><em>boolean</​em></​u></​p>
601 <p>Enables·​validation·​of·​the·​XML·​document·​to·​be·​parsed.​··​Any·​changes·​to·​this·​option·​are·​ignored·​after·​an·​XML·​document·​has·​started·​to·​be·​parsed,​·​but·​the·​option·​may·​be·​changed·​after·​a·​reset.​</​p>601 <p>Enables·​validation·​of·​the·​XML·​document·​to·​be·​parsed.​··​Any·​changes·​to·​this·​option·​are·​ignored·​after·​an·​XML·​document·​has·​started·​to·​be·​parsed,​·​but·​the·​option·​may·​be·​changed·​after·​a·​reset.​</​p>
602 </​dd>602 </​dd>
603 <span·​class="term">·​<em>-​warningcommand</​em></​span><dd>603 <span·​class="term">·​<em>-​warningcommand</​em></​span><dd>
604 <p><tt>-​warningcommand</​tt>·​<u><em>script</​em></​u></​p>604 <p><tt>-​warningcommand</​tt>·​<u><em>script</​em></​u></​p>
605 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​warning·​condition·​is·​detected.​··​A·​warning·​condition·​is·​where·​the·​XML·​document·​has·​not·​been·​authored·​correctly,​·​but·​is·​still·​well-​formed·​and·​may·​be·​valid.​··​For·​example,​·​the·​special·​empty·​element·​syntax·​may·​be·​used·​for·​an·​element·​which·​has·​not·​been·​declared·​to·​have·​empty·​content.​··​By·​default,​·​a·​callback·​script·​is·​provided·​which·​silently·​ignores·​the·​warning.​··​The·​command·​evaluated·​is:​</​p>605 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​a·​warning·​condition·​is·​detected.​··​A·​warning·​condition·​is·​where·​the·​XML·​document·​has·​not·​been·​authored·​correctly,​·​but·​is·​still·​well-​formed·​and·​may·​be·​valid.​··​For·​example,​·​the·​special·​empty·​element·​syntax·​may·​be·​used·​for·​an·​element·​which·​has·​not·​been·​declared·​to·​have·​empty·​content.​··​By·​default,​·​a·​callback·​script·​is·​provided·​which·​silently·​ignores·​the·​warning.​··​The·​command·​evaluated·​is:​</​p>
606 <div·​class="cmdsynopsis"·​id="idm8641864">606 <div·​class="cmdsynopsis"·​id="idm8621384">
607 <a·​name="idm8641864"></​a><tt><em>script</​em></​tt>·​<em>warningcode</​em>·​<em>warningmsg</​em>607 <a·​name="idm8621384"></​a><tt><em>script</​em></​tt>·​<em>warningcode</​em>·​<em>warningmsg</​em>
608 </​div>608 </​div>
609 <p>where:​</​p>609 <p>where:​</​p>
610 <table·​border="0">610 <table·​border="0">
611 <tr>611 <tr>
612 <td·​valign="top">·​<tt><em>warningcode</​em></​tt>612 <td·​valign="top">·​<tt><em>warningcode</​em></​tt>
613 </​td>613 </​td>
614 <td·​valign="top">A·​single·​word·​description·​of·​the·​warning,​·​intended·​for·​use·​by·​an·​application</​td>614 <td·​valign="top">A·​single·​word·​description·​of·​the·​warning,​·​intended·​for·​use·​by·​an·​application</​td>
Offset 619, 16 lines modifiedOffset 619, 16 lines modified
619 <td·​valign="top">A·​human-​readable·​description·​of·​the·​warning</​td>619 <td·​valign="top">A·​human-​readable·​description·​of·​the·​warning</​td>
620 </​tr>620 </​tr>
621 </​table>621 </​table>
622 </​dd>622 </​dd>
623 <span·​class="term">·​<em>-​xmldeclcommand</​em></​span><dd>623 <span·​class="term">·​<em>-​xmldeclcommand</​em></​span><dd>
624 <p><tt>-​xmldeclcommand</​tt>·​<u><em>script</​em></​u></​p>624 <p><tt>-​xmldeclcommand</​tt>·​<u><em>script</​em></​u></​p>
625 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​the·​XML·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>625 <p>Specifies·​the·​prefix·​of·​a·​Tcl·​command·​to·​be·​evaluated·​when·​the·​XML·​declaration·​is·​encountered.​··​The·​command·​evaluated·​is:​</​p>
626 <div·​class="cmdsynopsis"·​id="idm8630984">626 <div·​class="cmdsynopsis"·​id="idm8610504">
627 <a·​name="idm8630984"></​a><tt><em>script</​em></​tt>·​<em>version</​em>·​<em>encoding</​em>·​<em>standalone</​em>627 <a·​name="idm8610504"></​a><tt><em>script</​em></​tt>·​<em>version</​em>·​<em>encoding</​em>·​<em>standalone</​em>
628 </​div>628 </​div>
629 <p>where:​</​p>629 <p>where:​</​p>
630 <table·​border="0">630 <table·​border="0">
631 <tr>631 <tr>
632 <td·​valign="top">·​<tt><em>version</​em></​tt>632 <td·​valign="top">·​<tt><em>version</​em></​tt>
633 </​td>633 </​td>
634 <td·​valign="top">The·​version·​number·​of·​the·​XML·​specification·​to·​which·​this·​document·​purports·​to·​conform</​td>634 <td·​valign="top">The·​version·​number·​of·​the·​XML·​specification·​to·​which·​this·​document·​purports·​to·​conform</​td>
Offset 645, 66 lines modifiedOffset 645, 66 lines modified
645 </​tr>645 </​tr>
646 </​table>646 </​table>
647 </​dd>647 </​dd>
648 </​dl>648 </​dl>
649 </​div>649 </​div>
650 <div·​class="refsect3">650 <div·​class="refsect3">
651 <h4>651 <h4>
652 <a·​name="idm8620488"></​a>Parser·​Command</​h4>652 <a·​name="idm8600008"></​a>Parser·​Command</​h4>
653 <p>The·​<strong>:​:​xml:​:​parser</​strong>·​command·​creates·​a·​new·​Tcl·​command·​with·​the·​same·​name·​as·​the·​parser.​··​This·​command·​may·​be·​used·​to·​invoke·​various·​operations·​on·​the·​parser·​object.​··​It·​has·​the·​following·​general·​form:​</​p>653 <p>The·​<strong>:​:​xml:​:​parser</​strong>·​command·​creates·​a·​new·​Tcl·​command·​with·​the·​same·​name·​as·​the·​parser.​··​This·​command·​may·​be·​used·​to·​invoke·​various·​operations·​on·​the·​parser·​object.​··​It·​has·​the·​following·​general·​form:​</​p>
654 <div·​class="cmdsynopsis"·​id="idm8618696">654 <div·​class="cmdsynopsis"·​id="idm8598216">
655 <a·​name="idm8618696"></​a><tt><em>name</​em></​tt>··​<em><em>option</​em></​em><em>arg</​em>655 <a·​name="idm8598216"></​a><tt><em>name</​em></​tt>··​<em><em>option</​em></​em><em>arg</​em>
656 </​div>656 </​div>
657 <p>·​<em><em>option</​em></​em>·​and·​the·​<span·​class="arg"><em>arg</​em></​span>·​determine·​the·​exact·​behaviour·​of·​the·​command.​··​The·​following·​commands·​are·​possible·​for·​parser·​objects:​</​p>657 <p>·​<em><em>option</​em></​em>·​and·​the·​<span·​class="arg"><em>arg</​em></​span>·​determine·​the·​exact·​behaviour·​of·​the·​command.​··​The·​following·​commands·​are·​possible·​for·​parser·​objects:​</​p>
658 <dl>658 <dl>
659 <span·​class="term">·​<em>cget</​em></​span><dd>659 <span·​class="term">·​<em>cget</​em></​span><dd>
660 <div·​class="cmdsynopsis"·​id="idm8858568">660 <div·​class="cmdsynopsis"·​id="idm8838088">
661 <a·​name="idm8858568"></​a><tt><i>name</​i></​tt>·​<u>cget</​u><em>-​option</​em>661 <a·​name="idm8838088"></​a><tt><i>name</​i></​tt>·​<u>cget</​u><em>-​option</​em>
662 </​div>662 </​div>
663 <p>Returns·​the·​current·​value·​of·​the·​configuration·​option·​given·​by··​<em><em>option</​em></​em>.​···​<em><em>Option</​em></​em>·​may·​have·​any·​of·​the·​values·​accepted·​by·​the·​parser·​object.​</​p>663 <p>Returns·​the·​current·​value·​of·​the·​configuration·​option·​given·​by··​<em><em>option</​em></​em>.​···​<em><em>Option</​em></​em>·​may·​have·​any·​of·​the·​values·​accepted·​by·​the·​parser·​object.​</​p>
664 </​dd>664 </​dd>
665 <span·​class="term">·​<em>configure</​em></​span><dd>665 <span·​class="term">·​<em>configure</​em></​span><dd>
666 <div·​class="cmdsynopsis"·​id="idm8854088">666 <div·​class="cmdsynopsis"·​id="idm8833608">
667 <a·​name="idm8854088"></​a><tt><i>name</​i></​tt>·​<u>configure</​u>·​"<em>-​option</​em>·​<em>value</​em>.​.​.​"</​div>667 <a·​name="idm8833608"></​a><tt><i>name</​i></​tt>·​<u>configure</​u>·​"<em>-​option</​em>·​<em>value</​em>.​.​.​"</​div>
668 <p>Modify·​the·​configuration·​options·​of·​the·​parser·​object.​···​<em><em>Option</​em></​em>·​may·​have·​any·​of·​the·​values·​accepted·​by·​the·​parser·​object.​</​p>668 <p>Modify·​the·​configuration·​options·​of·​the·​parser·​object.​···​<em><em>Option</​em></​em>·​may·​have·​any·​of·​the·​values·​accepted·​by·​the·​parser·​object.​</​p>
669 </​dd>669 </​dd>
670 <span·​class="term">·​<em>entityparser</​em></​span><dd>670 <span·​class="term">·​<em>entityparser</​em></​span><dd>
671 <div·​class="cmdsynopsis"·​id="idm8848840">671 <div·​class="cmdsynopsis"·​id="idm8828360">
672 <a·​name="idm8848840"></​a><tt><i>name</​i></​tt>·​<u>entityparser</​u>·​"<em>option</​em>·​<em>value</​em>.​.​.​"</​div>672 <a·​name="idm8828360"></​a><tt><i>name</​i></​tt>·​<u>entityparser</​u>·​"<em>option</​em>·​<em>value</​em>.​.​.​"</​div>
673 <p>Creates·​a·​new·​parser·​object.​··​The·​new·​object·​inherits·​the·​same·​configuration·​options·​as·​the·​parent·​parser·​object,​·​but·​is·​able·​to·​parse·​XML·​data·​in·​a·​parsed·​entity.​··​The·​option··​<em>-​dtdsubset</​em>·​allows·​markup·​declarations·​to·​be·​treated·​as·​being·​in·​the·​internal·​or·​external·​DTD·​subset.​</​p>673 <p>Creates·​a·​new·​parser·​object.​··​The·​new·​object·​inherits·​the·​same·​configuration·​options·​as·​the·​parent·​parser·​object,​·​but·​is·​able·​to·​parse·​XML·​data·​in·​a·​parsed·​entity.​··​The·​option··​<em>-​dtdsubset</​em>·​allows·​markup·​declarations·​to·​be·​treated·​as·​being·​in·​the·​internal·​or·​external·​DTD·​subset.​</​p>
674 </​dd>674 </​dd>
675 <span·​class="term">·​<em>free</​em></​span><dd>675 <span·​class="term">·​<em>free</​em></​span><dd>
676 <div·​class="cmdsynopsis"·​id="idm8843720">676 <div·​class="cmdsynopsis"·​id="idm8823240">
677 <a·​name="idm8843720"></​a><tt><i>name</​i></​tt>·​<u>free</​u><em>name</​em>677 <a·​name="idm8823240"></​a><tt><i>name</​i></​tt>·​<u>free</​u><em>name</​em>
678 </​div>678 </​div>
679 <p>Frees·​all·​resources·​associated·​with·​the·​parser·​object.​··​The·​object·​is·​not·​usable·​after·​this·​command·​has·​been·​invoked.​</​p>679 <p>Frees·​all·​resources·​associated·​with·​the·​parser·​object.​··​The·​object·​is·​not·​usable·​after·​this·​command·​has·​been·​invoked.​</​p>
680 </​dd>680 </​dd>
681 <span·​class="term">·​<em>get</​em></​span><dd>681 <span·​class="term">·​<em>get</​em></​span><dd>
682 <div·​class="cmdsynopsis"·​id="idm8840136">682 <div·​class="cmdsynopsis"·​id="idm8819656">
683 <a·​name="idm8840136"></​a><tt><i>name</​i></​tt>·​<u>get</​u><em>name</​em>·​args</​div>683 <a·​name="idm8819656"></​a><tt><i>name</​i></​tt>·​<u>get</​u><em>name</​em>·​args</​div>
684 <p>Returns·​information·​about·​the·​XML·​document·​being·​parsed.​··​Each·​parser·​class·​provides·​different·​information,​·​see·​the·​documentation·​for·​the·​parser·​class.​</​p>684 <p>Returns·​information·​about·​the·​XML·​document·​being·​parsed.​··​Each·​parser·​class·​provides·​different·​information,​·​see·​the·​documentation·​for·​the·​parser·​class.​</​p>
685 </​dd>685 </​dd>
686 <span·​class="term">·​<em>parse</​em></​span><dd>686 <span·​class="term">·​<em>parse</​em></​span><dd>
687 <div·​class="cmdsynopsis"·​id="idm8836040">687 <div·​class="cmdsynopsis"·​id="idm8815560">
688 <a·​name="idm8836040"></​a><tt><i>name</​i></​tt>·​<u>parse</​u><em>xml</​em>·​args</​div>688 <a·​name="idm8815560"></​a><tt><i>name</​i></​tt>·​<u>parse</​u><em>xml</​em>·​args</​div>
689 <p>Parses·​the·​XML·​document.​··​The·​usual·​desired·​effect·​is·​for·​various·​application·​callbacks·​to·​be·​evaluated.​··​Other·​functions·​will·​also·​be·​performed·​by·​the·​parser·​class,​·​at·​the·​very·​least·​this·​includes·​checking·​the·​XML·​document·​for·​well-​formedness.​</​p>689 <p>Parses·​the·​XML·​document.​··​The·​usual·​desired·​effect·​is·​for·​various·​application·​callbacks·​to·​be·​evaluated.​··​Other·​functions·​will·​also·​be·​performed·​by·​the·​parser·​class,​·​at·​the·​very·​least·​this·​includes·​checking·​the·​XML·​document·​for·​well-​formedness.​</​p>
690 </​dd>690 </​dd>
691 <span·​class="term">·​<em>reset</​em></​span><dd>691 <span·​class="term">·​<em>reset</​em></​span><dd>
692 <div·​class="cmdsynopsis"·​id="idm8831944">692 <div·​class="cmdsynopsis"·​id="idm8811464">
693 <a·​name="idm8831944"></​a><tt><i>name</​i></​tt>·​<u>reset</​u>693 <a·​name="idm8811464"></​a><tt><i>name</​i></​tt>·​<u>reset</​u>
694 </​div>694 </​div>
695 <p>Initialises·​the·​parser·​object·​in·​preparation·​for·​parsing·​a·​new·​XML·​document.​</​p>695 <p>Initialises·​the·​parser·​object·​in·​preparation·​for·​parsing·​a·​new·​XML·​document.​</​p>
696 </​dd>696 </​dd>
697 </​dl>697 </​dl>
698 </​div>698 </​div>
699 </​div>699 </​div>
700 </​div>700 </​div>
701 <div·​class="refsect1">701 <div·​class="refsect1">
702 <h2>702 <h2>
703 <a·​name="idm8830024"></​a>Callback·​Return·​Codes</​h2>703 <a·​name="idm8809544"></​a>Callback·​Return·​Codes</​h2>
704 <p>Every·​callback·​script·​evaluated·​by·​a·​parser·​may·​return·​a·​return·​code·​other·​than·​<span·​class="arg">TCL_OK</​span>.​··​Return·​codes·​are·​interpreted·​as·​follows:​</​p>704 <p>Every·​callback·​script·​evaluated·​by·​a·​parser·​may·​return·​a·​return·​code·​other·​than·​<span·​class="arg">TCL_OK</​span>.​··​Return·​codes·​are·​interpreted·​as·​follows:​</​p>
705 <table·​border="0">705 <table·​border="0">
706 <tr>706 <tr>
707 <td·​valign="top">break</​td>707 <td·​valign="top">break</​td>
708 <td·​valign="top">Suppress​es·​invocation·​of·​all·​further·​callback·​scripts.​··​The··​<em>parse</​em>·​method·​returns·​the··​<tt>TCL_OK</​tt>·​return·​code.​</​td>708 <td·​valign="top">Suppress​es·​invocation·​of·​all·​further·​callback·​scripts.​··​The··​<em>parse</​em>·​method·​returns·​the··​<tt>TCL_OK</​tt>·​return·​code.​</​td>
709 </​tr>709 </​tr>
710 <tr>710 <tr>
Offset 719, 15 lines modifiedOffset 719, 15 lines modified
719 <td·​valign="top">default<​/​td>719 <td·​valign="top">default<​/​td>
720 <td·​valign="top">Any·​other·​return·​code·​suppresses·​invocation·​of·​all·​further·​callback·​scripts.​··​The··​<em>parse</​em>·​method·​returns·​the·​same·​return·​code.​</​td>720 <td·​valign="top">Any·​other·​return·​code·​suppresses·​invocation·​of·​all·​further·​callback·​scripts.​··​The··​<em>parse</​em>·​method·​returns·​the·​same·​return·​code.​</​td>
721 </​tr>721 </​tr>
722 </​table>722 </​table>
723 </​div>723 </​div>
724 <div·​class="refsect1">724 <div·​class="refsect1">
725 <h2>725 <h2>
726 <a·​name="idm8821192"></​a>Error·​Messages</​h2>726 <a·​name="idm8800712"></​a>Error·​Messages</​h2>
727 <p>If·​an·​error·​or·​warning·​condition·​is·​detected·​then·​an·​error·​message·​is·​returned.​··​These·​messages·​are·​structured·​as·​a·​Tcl·​list,​·​as·​described·​below:​</​p>727 <p>If·​an·​error·​or·​warning·​condition·​is·​detected·​then·​an·​error·​message·​is·​returned.​··​These·​messages·​are·​structured·​as·​a·​Tcl·​list,​·​as·​described·​below:​</​p>
728 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>{domain·​level·​code·​node·​line·​message·​int1·​int2·​string1·​string2·​string3}</​pre></​div></​pre></​div>728 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>{domain·​level·​code·​node·​line·​message·​int1·​int2·​string1·​string2·​string3}</​pre></​div></​pre></​div>
729 <dl>729 <dl>
730 <span·​class="term"><span·​class="literal">domai​n</​span></​span><dd><p>A·​code·​for·​the·​subsystem·​that·​detected·​the·​error.​</​p></​dd>730 <span·​class="term"><span·​class="literal">domai​n</​span></​span><dd><p>A·​code·​for·​the·​subsystem·​that·​detected·​the·​error.​</​p></​dd>
731 <span·​class="term"><span·​class="literal">level​</​span></​span><dd><p>Severity·​level·​of·​the·​problem.​</​p></​dd>731 <span·​class="term"><span·​class="literal">level​</​span></​span><dd><p>Severity·​level·​of·​the·​problem.​</​p></​dd>
732 <span·​class="term"><span·​class="literal">code<​/​span></​span><dd><p>A·​one·​word·​string·​describing·​the·​error.​</​p></​dd>732 <span·​class="term"><span·​class="literal">code<​/​span></​span><dd><p>A·​one·​word·​string·​describing·​the·​error.​</​p></​dd>
733 <span·​class="term"><span·​class="literal">node<​/​span></​span><dd><p>If·​available,​·​the·​token·​of·​the·​DOM·​node·​associated·​with·​the·​problem.​</​p></​dd>733 <span·​class="term"><span·​class="literal">node<​/​span></​span><dd><p>If·​available,​·​the·​token·​of·​the·​DOM·​node·​associated·​with·​the·​problem.​</​p></​dd>
Offset 738, 15 lines modifiedOffset 738, 15 lines modified
738 <span·​class="term"><span·​class="literal">strin​g1</​span></​span><dd><p>Additiona​l·​string·​data.​</​p></​dd>738 <span·​class="term"><span·​class="literal">strin​g1</​span></​span><dd><p>Additiona​l·​string·​data.​</​p></​dd>
739 <span·​class="term"><span·​class="literal">strin​g2</​span></​span><dd><p>Additiona​l·​string·​data.​</​p></​dd>739 <span·​class="term"><span·​class="literal">strin​g2</​span></​span><dd><p>Additiona​l·​string·​data.​</​p></​dd>
740 <span·​class="term"><span·​class="literal">strin​g3</​span></​span><dd><p>Additiona​l·​string·​data.​</​p></​dd>740 <span·​class="term"><span·​class="literal">strin​g3</​span></​span><dd><p>Additiona​l·​string·​data.​</​p></​dd>
741 </​dl>741 </​dl>
742 </​div>742 </​div>
743 <div·​class="refsect1">743 <div·​class="refsect1">
744 <h2>744 <h2>
745 <a·​name="idm8498248"></​a>Application·​Examples</​h2>745 <a·​name="idm8477768"></​a>Application·​Examples</​h2>
746 <p>This·​script·​outputs·​the·​character·​data·​of·​an·​XML·​document·​read·​from·​stdin.​</​p>746 <p>This·​script·​outputs·​the·​character·​data·​of·​an·​XML·​document·​read·​from·​stdin.​</​p>
747 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>747 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>
748 package·​require·​xml748 package·​require·​xml
  
749 proc·​cdata·​{data·​args}·​{749 proc·​cdata·​{data·​args}·​{
750 ····​puts·​-​nonewline·​$data750 ····​puts·​-​nonewline·​$data
751 }751 }
Offset 767, 54 lines modifiedOffset 767, 54 lines modified
767 set·​parser·​[:​:​xml:​:​parser·​-​elementstartcommand·​[list·​EStart·​count]]767 set·​parser·​[:​:​xml:​:​parser·​-​elementstartcommand·​[list·​EStart·​count]]
768 $parser·​parse·​[read·​stdin]768 $parser·​parse·​[read·​stdin]
769 puts·​"The·​XML·​document·​contains·​$count·​elements"769 puts·​"The·​XML·​document·​contains·​$count·​elements"
770 ······​</​pre></​div></​pre></​div>770 ······​</​pre></​div></​pre></​div>
771 </​div>771 </​div>
772 <div·​class="refsect1">772 <div·​class="refsect1">
773 <h2>773 <h2>
774 <a·​name="idm8494792"></​a>Safe·​XML</​h2>774 <a·​name="idm8474312"></​a>Safe·​XML</​h2>
775 <p>TclXML/​Tcl·​and·​TclXML/​libxml2·​may·​be·​used·​in·​a·​Safe·​Tcl·​interpreter.​··​When·​a·​document·​is·​parsed·​in·​a·​Safe·​Tcl·​interpreter,​·​any·​attempt·​by·​the·​XML·​document·​to·​load·​an·​external·​entity·​is·​handled·​by·​the·​-​externalentitycommand​·​callback.​··​This·​callback·​is·​evaluated·​in·​the·​context·​of·​the·​safe·​interpreter·​and·​therefore·​is·​subject·​to·​the·​security·​policy·​in·​force·​for·​that·​interpreter.​··​The·​default·​entity·​loader·​will·​not·​be·​invoked,​·​even·​if·​the·​callback·​script·​returns·​a·​<span·​class="literal">TCL_C​ONTINUE</​span>·​code.​</​p>775 <p>TclXML/​Tcl·​and·​TclXML/​libxml2·​may·​be·​used·​in·​a·​Safe·​Tcl·​interpreter.​··​When·​a·​document·​is·​parsed·​in·​a·​Safe·​Tcl·​interpreter,​·​any·​attempt·​by·​the·​XML·​document·​to·​load·​an·​external·​entity·​is·​handled·​by·​the·​-​externalentitycommand​·​callback.​··​This·​callback·​is·​evaluated·​in·​the·​context·​of·​the·​safe·​interpreter·​and·​therefore·​is·​subject·​to·​the·​security·​policy·​in·​force·​for·​that·​interpreter.​··​The·​default·​entity·​loader·​will·​not·​be·​invoked,​·​even·​if·​the·​callback·​script·​returns·​a·​<span·​class="literal">TCL_C​ONTINUE</​span>·​code.​</​p>
776 <p>See·​the·​description·​of·​the·​-​externalentitycommand​·​for·​further·​details.​</​p>776 <p>See·​the·​description·​of·​the·​-​externalentitycommand​·​for·​further·​details.​</​p>
777 </​div>777 </​div>
778 <div·​class="refsect1">778 <div·​class="refsect1">
779 <h2>779 <h2>
780 <a·​name="idm8492488"></​a>Parser·​Classes</​h2>780 <a·​name="idm8472008"></​a>Parser·​Classes</​h2>
781 <p>This·​section·​will·​discuss·​how·​a·​parser·​class·​is·​implemented.​</​p>781 <p>This·​section·​will·​discuss·​how·​a·​parser·​class·​is·​implemented.​</​p>
782 <div·​class="refsect2">782 <div·​class="refsect2">
783 <h3>783 <h3>
784 <a·​name="idm8491080"></​a>Tcl·​Parser·​Class</​h3>784 <a·​name="idm8470600"></​a>Tcl·​Parser·​Class</​h3>
785 <p>The·​pure-​Tcl·​parser·​class·​requires·​no·​compilation·​-​·​it·​is·​a·​collection·​of·​Tcl·​scripts.​··​This·​parser·​implementation·​is·​non-​validating,​·​ie.​·​it·​can·​only·​check·​well-​formedness·​in·​a·​document.​··​However,​·​by·​enabling·​the··​<em>-​validate</​em>·​option·​it·​will·​read·​the·​document's·​DTD·​and·​resolve·​external·​entities.​··​This·​parser·​class·​is·​referred·​to·​as·​TclXML/​tcl.​</​p>785 <p>The·​pure-​Tcl·​parser·​class·​requires·​no·​compilation·​-​·​it·​is·​a·​collection·​of·​Tcl·​scripts.​··​This·​parser·​implementation·​is·​non-​validating,​·​ie.​·​it·​can·​only·​check·​well-​formedness·​in·​a·​document.​··​However,​·​by·​enabling·​the··​<em>-​validate</​em>·​option·​it·​will·​read·​the·​document's·​DTD·​and·​resolve·​external·​entities.​··​This·​parser·​class·​is·​referred·​to·​as·​TclXML/​tcl.​</​p>
786 <p>This·​parser·​implementation·​aims·​to·​implement·​XML·​v1.​0·​and·​supports·​XML·​Namespaces.​</​p>786 <p>This·​parser·​implementation·​aims·​to·​implement·​XML·​v1.​0·​and·​supports·​XML·​Namespaces.​</​p>
787 <p>Generally·​the·​parser·​produces·​XML·​Infoset·​information·​items.​··​That·​is,​·​it·​gives·​the·​application·​a·​slightly·​higher-​level·​view·​than·​the·​raw·​XML·​syntax.​··​For·​example,​·​it·​does·​not·​report·​CDATA·​Sections.​</​p>787 <p>Generally·​the·​parser·​produces·​XML·​Infoset·​information·​items.​··​That·​is,​·​it·​gives·​the·​application·​a·​slightly·​higher-​level·​view·​than·​the·​raw·​XML·​syntax.​··​For·​example,​·​it·​does·​not·​report·​CDATA·​Sections.​</​p>
788 <p>TclXML/​tcl·​is·​not·​able·​to·​handle·​character·​encodings·​other·​than·​UTF-​8.​</​p>788 <p>TclXML/​tcl·​is·​not·​able·​to·​handle·​character·​encodings·​other·​than·​UTF-​8.​</​p>
789 </​div>789 </​div>
790 <div·​class="refsect2">790 <div·​class="refsect2">
791 <h3>791 <h3>
792 <a·​name="idm8487880"></​a>libxml2·​Parser·​Class</​h3>792 <a·​name="idm8467400"></​a>libxml2·​Parser·​Class</​h3>
793 <p>The·​libxml2·​parser·​class·​provides·​a·​Tcl·​interface·​to·​the·​libxml2·​XML·​parser·​library.​··​This·​parser·​class·​is·​referred·​to·​as·​TclXML/​libxml2.​</​p>793 <p>The·​libxml2·​parser·​class·​provides·​a·​Tcl·​interface·​to·​the·​libxml2·​XML·​parser·​library.​··​This·​parser·​class·​is·​referred·​to·​as·​TclXML/​libxml2.​</​p>
794 <p>When·​the·​package·​is·​loaded·​the·​variable·​<span·​class="literal">:​:​xml:​:​libxml2:​:​libxml2version</​span>·​is·​set·​to·​the·​version·​number·​of·​the·​libxml2·​library·​being·​used.​</​p>794 <p>When·​the·​package·​is·​loaded·​the·​variable·​<span·​class="literal">:​:​xml:​:​libxml2:​:​libxml2version</​span>·​is·​set·​to·​the·​version·​number·​of·​the·​libxml2·​library·​being·​used.​</​p>
795 <p>On·​MS·​Windows,​·​it·​is·​necessary·​to·​load·​the·​generic·​XML·​package·​first,​·​and·​then·​the·​TclXML/​libxml2·​package.​··​For·​example,​</​p>795 <p>On·​MS·​Windows,​·​it·​is·​necessary·​to·​load·​the·​generic·​XML·​package·​first,​·​and·​then·​the·​TclXML/​libxml2·​package.​··​For·​example,​</​p>
796 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>796 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>
797 package·​require·​xml797 package·​require·​xml
798 package·​require·​xml:​:​libxml2798 package·​require·​xml:​:​libxml2
799 </​pre></​div></​pre></​div>799 </​pre></​div></​pre></​div>
800 <div·​class="refsect3">800 <div·​class="refsect3">
801 <h4>801 <h4>
802 <a·​name="idm8484424"></​a>get·​Method</​h4>802 <a·​name="idm8463944"></​a>get·​Method</​h4>
803 <p>TclXML/​libxml2·​provides·​the·​following·​arguments·​to·​the·​get·​method:​</​p>803 <p>TclXML/​libxml2·​provides·​the·​following·​arguments·​to·​the·​get·​method:​</​p>
804 <dl>804 <dl>
805 <span·​class="term"><span·​class="arg">document<​/​span></​span><dd>805 <span·​class="term"><span·​class="arg">document<​/​span></​span><dd>
806 <p>Returns·​the·​parsed·​document·​object.​··​libxml2·​builds·​an·​in-​memory·​data·​structure·​of·​the·​XML·​document·​it·​parses·​(a·​DOM·​tree)​.​··​This·​method·​returns·​a·​handle·​(or·​token)​·​for·​that·​structure.​</​p>806 <p>Returns·​the·​parsed·​document·​object.​··​libxml2·​builds·​an·​in-​memory·​data·​structure·​of·​the·​XML·​document·​it·​parses·​(a·​DOM·​tree)​.​··​This·​method·​returns·​a·​handle·​(or·​token)​·​for·​that·​structure.​</​p>
807 <p>TclXML/​libxml2·​manages·​the·​document·​object·​as·​a·​Tcl·​object.​··​See·​the··​<em>-​keep</​em>·​for·​further·​information.​</​p>807 <p>TclXML/​libxml2·​manages·​the·​document·​object·​as·​a·​Tcl·​object.​··​See·​the··​<em>-​keep</​em>·​for·​further·​information.​</​p>
808 </​dd>808 </​dd>
809 </​dl>809 </​dl>
810 </​div>810 </​div>
811 <div·​class="refsect3">811 <div·​class="refsect3">
812 <h4>812 <h4>
813 <a·​name="idm8479816"></​a>Additional·​Options</​h4>813 <a·​name="idm8459336"></​a>Additional·​Options</​h4>
814 <dl>814 <dl>
815 <span·​class="term">·​<em>-​keep</​em></​span><dd>815 <span·​class="term">·​<em>-​keep</​em></​span><dd>
816 <p><tt>-​keep</​tt>·​<u>normal·​|·​implicit</​u></​p>816 <p><tt>-​keep</​tt>·​<u>normal·​|·​implicit</​u></​p>
817 <p>Controls·​how·​the·​TclXML/​libxml2·​packages·​manages·​the·​document·​object.​··​The·​default·​value·​is·​<span·​class="literal">impli​cit</​span>;​·​the·​document·​is·​destroyed·​when·​the·​Tcl·​Object's·​internal·​representation·​is·​freed.​··​If·​the·​option·​is·​given·​the·​value·​<span·​class="literal">norma​l</​span>·​then·​the·​document·​must·​be·​explicit·​destroyed.​··​The·​only·​way·​to·​explicitly·​destroy·​the·​document·​is·​by·​using·​the·​C·​API.​</​p>817 <p>Controls·​how·​the·​TclXML/​libxml2·​packages·​manages·​the·​document·​object.​··​The·​default·​value·​is·​<span·​class="literal">impli​cit</​span>;​·​the·​document·​is·​destroyed·​when·​the·​Tcl·​Object's·​internal·​representation·​is·​freed.​··​If·​the·​option·​is·​given·​the·​value·​<span·​class="literal">norma​l</​span>·​then·​the·​document·​must·​be·​explicit·​destroyed.​··​The·​only·​way·​to·​explicitly·​destroy·​the·​document·​is·​by·​using·​the·​C·​API.​</​p>
818 </​dd>818 </​dd>
819 <span·​class="term">·​<em>-​retainpath</​em></​span><dd>819 <span·​class="term">·​<em>-​retainpath</​em></​span><dd>
820 <p><tt>-​retainpath</​tt>·​<u><em>xpath</​em></​u></​p>820 <p><tt>-​retainpath</​tt>·​<u><em>xpath</​em></​u></​p>
Offset 824, 26 lines modifiedOffset 824, 26 lines modified
824 <p><tt>-​retainpathns</​tt>·​<u><em>prefix·​ns·​.​.​.​</​em></​u></​p>824 <p><tt>-​retainpathns</​tt>·​<u><em>prefix·​ns·​.​.​.​</​em></​u></​p>
825 <p>The·​value·​of·​this·​option·​is·​a·​list·​of·​pairs·​of·​XML·​Namespace·​prefixes·​and·​their·​corresponding·​namespace·​URIs.​··​These·​are·​used·​by·​the·​XPath·​location·​path·​given·​in·​the·​<span·​class="arg">-​retainpath</​span>·​option.​</​p>825 <p>The·​value·​of·​this·​option·​is·​a·​list·​of·​pairs·​of·​XML·​Namespace·​prefixes·​and·​their·​corresponding·​namespace·​URIs.​··​These·​are·​used·​by·​the·​XPath·​location·​path·​given·​in·​the·​<span·​class="arg">-​retainpath</​span>·​option.​</​p>
826 </​dd>826 </​dd>
827 </​dl>827 </​dl>
828 </​div>828 </​div>
829 <div·​class="refsect3">829 <div·​class="refsect3">
830 <h4>830 <h4>
831 <a·​name="idm8466888"></​a>Limitations</​h4>831 <a·​name="idm8446408"></​a>Limitations</​h4>
832 <p>The·​libxml2·​parser·​classes·​has·​the·​following·​limitations:​</​p>832 <p>The·​libxml2·​parser·​classes·​has·​the·​following·​limitations:​</​p>
833 <ul>833 <ul>
834 <li><p>·​<em>-​reportempty</​em>·​has·​no·​effect.​··​libxml2·​does·​not·​report·​empty·​element·​syntax.​</​p></​li>834 <li><p>·​<em>-​reportempty</​em>·​has·​no·​effect.​··​libxml2·​does·​not·​report·​empty·​element·​syntax.​</​p></​li>
835 <li><p>Incremental·​(push)​·​parsing,​·​ie.​·​<span·​class="arg">·​<em>-​final</​em> <span·​class="literal">0</​span></​span>·​is·​not·​supported.​</​p></​li>835 <li><p>Incremental·​(push)​·​parsing,​·​ie.​·​<span·​class="arg">·​<em>-​final</​em> <span·​class="literal">0</​span></​span>·​is·​not·​supported.​</​p></​li>
836 <li><p>TclXML/​libxml2·​does·​not·​provide·​(DTD)​·​validation,​·​(WXS)​·​schema·​validation·​or·​Relax·​NG·​validation,​·​although·​the·​libxml2·​library·​does·​provide·​those·​functions.​··​These·​functions·​are·​provided·​by·​the·​TclDOM/​libxml2·​package,​·​but·​only·​in·​a·​"posteriori"·​fashion·​(ie.​·​only·​after·​the·​document·​has·​been·​parsed)​.​</​p></​li>836 <li><p>TclXML/​libxml2·​does·​not·​provide·​(DTD)​·​validation,​·​(WXS)​·​schema·​validation·​or·​Relax·​NG·​validation,​·​although·​the·​libxml2·​library·​does·​provide·​those·​functions.​··​These·​functions·​are·​provided·​by·​the·​TclDOM/​libxml2·​package,​·​but·​only·​in·​a·​"posteriori"·​fashion·​(ie.​·​only·​after·​the·​document·​has·​been·​parsed)​.​</​p></​li>
837 <li><p>libxml2·​supports·​XML·​Namespaces.​··​The·​use·​of·​XML·​Namespaces·​can·​be·​queried,​·​but·​the·​<em>declaration</​em>·​of·​a·​XML·​Namespace·​is·​not·​reported.​</​p></​li>837 <li><p>libxml2·​supports·​XML·​Namespaces.​··​The·​use·​of·​XML·​Namespaces·​can·​be·​queried,​·​but·​the·​<em>declaration</​em>·​of·​a·​XML·​Namespace·​is·​not·​reported.​</​p></​li>
838 </​ul>838 </​ul>
839 </​div>839 </​div>
840 </​div>840 </​div>
841 </​div>841 </​div>
842 <div·​class="refsect1">842 <div·​class="refsect1">
843 <h2>843 <h2>
844 <a·​name="idm8460104"></​a>Keywords</​h2>844 <a·​name="idm8439624"></​a>Keywords</​h2>
845 <div·​class="keywordset">XM​L,​·​parse</​div>845 <div·​class="keywordset">XM​L,​·​parse</​div>
846 </​div>846 </​div>
847 </​div></​body>847 </​div></​body>
848 </​html>848 </​html>
  
/usr/local/share/doc/tclxml/tclxslt.html
Offset 5, 38 lines modifiedOffset 5, 38 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">Tc​lXSLT</​a></​h1>8 <h1·​class="title"><a·​name="idm12029512">Tc​lXSLT</​a></​h1>
9 <h2>Contents</​h2>9 <h2>Contents</​h2>
10 <ul>10 <ul>
11 <li><a·​href="#synopsis">Syno​psis</​a></​li>11 <li><a·​href="#synopsis">Syno​psis</​a></​li>
12 <li><a·​href="#idm9367368">De​scription</​a></​li>12 <li><a·​href="#idm9346888">De​scription</​a></​li>
13 <li><a·​href="#idm9331784">Pa​ckages·​and·​Namespaces</​a></​li>13 <li><a·​href="#idm9311304">Pa​ckages·​and·​Namespaces</​a></​li>
14 <li>14 <li>
15 <a·​href="#idm9329864">Co​mmands</​a><ul>15 <a·​href="#idm9309384">Co​mmands</​a><ul>
16 <li><a·​href="#idm9328840">:​:​xslt:​:​compile</​a></​li>16 <li><a·​href="#idm9308360">:​:​xslt:​:​compile</​a></​li>
17 <li>17 <li>
18 <a·​href="#idm9324232">St​ylesheet·​Command</​a><ul>18 <a·​href="#idm9303752">St​ylesheet·​Command</​a><ul>
19 <li><a·​href="#idm9322440">Co​mmand·​Methods</​a></​li>19 <li><a·​href="#idm9301960">Co​mmand·​Methods</​a></​li>
20 <li><a·​href="#idm9283528">St​ylesheet·​Parameters</​a></​li>20 <li><a·​href="#idm9263048">St​ylesheet·​Parameters</​a></​li>
21 </​ul>21 </​ul>
22 </​li>22 </​li>
23 <li><a·​href="#idm9277512">:​:​xslt:​:​extension</​a></​li>23 <li><a·​href="#idm9257032">:​:​xslt:​:​extension</​a></​li>
24 <li><a·​href="#idm9261384">:​:​xslt:​:​security</​a></​li>24 <li><a·​href="#idm9240904">:​:​xslt:​:​security</​a></​li>
25 </​ul>25 </​ul>
26 </​li>26 </​li>
27 <li>27 <li>
28 <a·​href="#idm9244104">Ex​tensions</​a><ul>28 <a·​href="#idm9223624">Ex​tensions</​a><ul>
29 <li>29 <li>
30 <a·​href="#idm9242312">Im​plementing·​An·​Extension</​a><ul>30 <a·​href="#idm9221832">Im​plementing·​An·​Extension</​a><ul>
31 <li><a·​href="#idm9237832">Ex​tension·​Functions</​a></​li>31 <li><a·​href="#idm9217352">Ex​tension·​Functions</​a></​li>
32 <li><a·​href="#idm9223624">Ex​tension·​Elements</​a></​li>32 <li><a·​href="#idm9203144">Ex​tension·​Elements</​a></​li>
33 </​ul>33 </​ul>
34 </​li>34 </​li>
35 <li><a·​href="#idm9214920">Us​ing·​An·​Extension</​a></​li>35 <li><a·​href="#idm9194440">Us​ing·​An·​Extension</​a></​li>
36 </​ul>36 </​ul>
37 </​li>37 </​li>
38 </​ul>38 </​ul>
39 <div·​class="refnamediv">39 <div·​class="refnamediv">
40 <span·​class="refname">:​:​xslt:​:​compile</​span>,​·​<span·​class="refname">:​:​xslt:​:​extension</​span>,​·​<span·​class="refname">:​:​xslt:​:​security</​span>40 <span·​class="refname">:​:​xslt:​:​compile</​span>,​·​<span·​class="refname">:​:​xslt:​:​extension</​span>,​·​<span·​class="refname">:​:​xslt:​:​security</​span>
41 </​div>41 </​div>
42 <div·​class="refsynopsisdiv​">42 <div·​class="refsynopsisdiv​">
Offset 56, 48 lines modifiedOffset 56, 48 lines modified
56 <a·​name="idm9803976"></​a><span·​class="command"·​id="idm9803720"><a·​name="__xslt__securit​y"></​a><tt>:​:​xslt:​:​security</​tt>·​</​span><span·​class="methodname"><e​m>request</​em></​span><em>detail</​em>56 <a·​name="idm9803976"></​a><span·​class="command"·​id="idm9803720"><a·​name="__xslt__securit​y"></​a><tt>:​:​xslt:​:​security</​tt>·​</​span><span·​class="methodname"><e​m>request</​em></​span><em>detail</​em>
57 </​div>57 </​div>
58 <h3>Tcl·​Namespace·​Usage</​h3>58 <h3>Tcl·​Namespace·​Usage</​h3>
59 <br><tt>:​:​xslt</​tt><p></​p>59 <br><tt>:​:​xslt</​tt><p></​p>
60 </​div>60 </​div>
61 <div·​class="refsect1">61 <div·​class="refsect1">
62 <h2>62 <h2>
63 <a·​name="idm9367368"></​a>Description</​h2>63 <a·​name="idm9346888"></​a>Description</​h2>
64 <p>TclXSLT·​is·​a·​wrapper·​for·​the·​<a·​href="http:​/​/​xmlsoft.​org/​">Gnome·​libxslt·​library</​a>·​that·​allows·​an·​application·​to·​perform·​XSL·​transformations·​(XSLT)​.​··​The·​package·​also·​provides·​a·​binding·​to·​the·​XSLT·​extension·​mechanism·​so·​that·​XSLT·​extension·​may·​be·​implemented·​using·​Tcl·​scripts.​</​p>64 <p>TclXSLT·​is·​a·​wrapper·​for·​the·​<a·​href="http:​/​/​xmlsoft.​org/​">Gnome·​libxslt·​library</​a>·​that·​allows·​an·​application·​to·​perform·​XSL·​transformations·​(XSLT)​.​··​The·​package·​also·​provides·​a·​binding·​to·​the·​XSLT·​extension·​mechanism·​so·​that·​XSLT·​extension·​may·​be·​implemented·​using·​Tcl·​scripts.​</​p>
65 <p>Transformation·​only·​works·​with·​documents·​created·​by·​TclDOM/​libxml2.​</​p>65 <p>Transformation·​only·​works·​with·​documents·​created·​by·​TclDOM/​libxml2.​</​p>
66 <p>The·​TclXSLT·​package·​makes·​extensive·​use·​of·​Tcl·​objects.​··​Compiled·​XSL·​stylesheets·​are·​stored·​as·​the·​internal·​representation·​of·​a·​Tcl·​object.​··​Source·​and·​result·​documents·​are·​accessed·​via·​TclDOM's·​C·​interface·​as·​Tcl·​objects.​··​This·​allows·​the·​application·​to·​cache·​parsed·​XML·​documents·​and·​compiled·​XSL·​stylesheets·​for·​better·​runtime·​performance.​</​p>66 <p>The·​TclXSLT·​package·​makes·​extensive·​use·​of·​Tcl·​objects.​··​Compiled·​XSL·​stylesheets·​are·​stored·​as·​the·​internal·​representation·​of·​a·​Tcl·​object.​··​Source·​and·​result·​documents·​are·​accessed·​via·​TclDOM's·​C·​interface·​as·​Tcl·​objects.​··​This·​allows·​the·​application·​to·​cache·​parsed·​XML·​documents·​and·​compiled·​XSL·​stylesheets·​for·​better·​runtime·​performance.​</​p>
67 </​div>67 </​div>
68 <div·​class="refsect1">68 <div·​class="refsect1">
69 <h2>69 <h2>
70 <a·​name="idm9331784"></​a>Packages·​and·​Namespaces</​h2>70 <a·​name="idm9311304"></​a>Packages·​and·​Namespaces</​h2>
71 <p>The·​TclXSLT·​package·​defines·​the·​<tt>xslt</​tt>·​package·​and·​also·​a·​Tcl·​namespace·​using·​that·​name.​</​p>71 <p>The·​TclXSLT·​package·​defines·​the·​<tt>xslt</​tt>·​package·​and·​also·​a·​Tcl·​namespace·​using·​that·​name.​</​p>
72 </​div>72 </​div>
73 <div·​class="refsect1">73 <div·​class="refsect1">
74 <h2>74 <h2>
75 <a·​name="idm9329864"></​a>Commands</​h2>75 <a·​name="idm9309384"></​a>Commands</​h2>
76 <div·​class="refsect2">76 <div·​class="refsect2">
77 <h3>77 <h3>
78 <a·​name="idm9328840"></​a><strong>:​:​xslt:​:​compile</​strong>78 <a·​name="idm9308360"></​a><strong>:​:​xslt:​:​compile</​strong>
79 </​h3>79 </​h3>
80 <p>The·​<strong>:​:​xslt:​:​compile</​strong>·​command·​compiles·​a·​stylesheet·​document.​··​It·​returns·​a·​compiled·​stylesheet·​object·​and·​also·​defines·​a·​Tcl·​command·​to·​access·​the·​stylesheet.​··​This·​Tcl·​command·​may·​be·​used·​to·​transform·​XML·​documents.​</​p>80 <p>The·​<strong>:​:​xslt:​:​compile</​strong>·​command·​compiles·​a·​stylesheet·​document.​··​It·​returns·​a·​compiled·​stylesheet·​object·​and·​also·​defines·​a·​Tcl·​command·​to·​access·​the·​stylesheet.​··​This·​Tcl·​command·​may·​be·​used·​to·​transform·​XML·​documents.​</​p>
81 <h4>Example</​h4>81 <h4>Example</​h4>
82 <div·​class="example"><pre>​<div·​class="programlisting​"><pre>82 <div·​class="example"><pre>​<div·​class="programlisting​"><pre>
83 set·​source_doc·​[:​:​dom:​:​libxml2:​:​parse·​$XML]83 set·​source_doc·​[:​:​dom:​:​libxml2:​:​parse·​$XML]
84 set·​ssheet_doc·​[:​:​dom:​:​libxml2:​:​parse·​$XSLstylesheet]84 set·​ssheet_doc·​[:​:​dom:​:​libxml2:​:​parse·​$XSLstylesheet]
85 set·​ssheet·​[:​:​xslt:​:​compile·​$ssheet_doc]85 set·​ssheet·​[:​:​xslt:​:​compile·​$ssheet_doc]
86 set·​result·​[$ssheet·​transform·​$source_doc]86 set·​result·​[$ssheet·​transform·​$source_doc]
87 </​pre></​div></​pre></​div>87 </​pre></​div></​pre></​div>
88 <p>NB.​··​It·​is·​advisable·​to·​use·​the··​<em>-​baseuri</​em>·​option·​when·​parsing·​the·​source·​and·​stylesheet·​documents·​to·​allow·​external·​resources·​to·​be·​resolved.​</​p>88 <p>NB.​··​It·​is·​advisable·​to·​use·​the··​<em>-​baseuri</​em>·​option·​when·​parsing·​the·​source·​and·​stylesheet·​documents·​to·​allow·​external·​resources·​to·​be·​resolved.​</​p>
89 </​div>89 </​div>
90 <div·​class="refsect2">90 <div·​class="refsect2">
91 <h3>91 <h3>
92 <a·​name="idm9324232"></​a>Stylesheet·​Command</​h3>92 <a·​name="idm9303752"></​a>Stylesheet·​Command</​h3>
93 <p>The·​stylesheet·​command·​created·​by·​<strong>:​:​xslt:​:​compile</​strong>·​command·​accesses·​a·​compiled·​stylesheet.​</​p>93 <p>The·​stylesheet·​command·​created·​by·​<strong>:​:​xslt:​:​compile</​strong>·​command·​accesses·​a·​compiled·​stylesheet.​</​p>
94 <div·​class="refsect3">94 <div·​class="refsect3">
95 <h4>95 <h4>
96 <a·​name="idm9322440"></​a>Command·​Methods</​h4>96 <a·​name="idm9301960"></​a>Command·​Methods</​h4>
97 <p>The·​following·​command·​methods·​may·​be·​used:​</​p>97 <p>The·​following·​command·​methods·​may·​be·​used:​</​p>
98 <dl>98 <dl>
99 <span·​class="term"><span·​class="arg">cget</​span>·​<span·​class="arg"><em>optio​n</​em></​span></​span><dd><p>Returns·​the·​value·​of·​an·​option.​··​See·​below·​for·​the·​list·​of·​valid·​options.​</​p></​dd>99 <span·​class="term"><span·​class="arg">cget</​span>·​<span·​class="arg"><em>optio​n</​em></​span></​span><dd><p>Returns·​the·​value·​of·​an·​option.​··​See·​below·​for·​the·​list·​of·​valid·​options.​</​p></​dd>
100 <span·​class="term"><span·​class="arg">configure​</​span>·​<span·​class="arg"><em>optio​n</​em><em>value</​em></​span></​span><dd>100 <span·​class="term"><span·​class="arg">configure​</​span>·​<span·​class="arg"><em>optio​n</​em><em>value</​em></​span></​span><dd>
101 <p>Sets·​the·​value·​of·​an·​option.​··​Available·​options·​are·​as·​follows:​</​p>101 <p>Sets·​the·​value·​of·​an·​option.​··​Available·​options·​are·​as·​follows:​</​p>
102 <dl>102 <dl>
103 <span·​class="term">·​<em>-​indent</​em></​span><dd>103 <span·​class="term">·​<em>-​indent</​em></​span><dd>
Offset 130, 15 lines modifiedOffset 130, 15 lines modified
130 </​dl>130 </​dl>
131 </​dd>131 </​dd>
132 <span·​class="term"><span·​class="arg">transform​</​span>·​<span·​class="arg"><em>sourc​e</​em></​span>·​"<span·​class="arg"><em>name<​/​em></​span>·​|·​<span·​class="arg"><em>value​</​em></​span>"</​span><dd><p>Performs·​an·​XSL·​transformation·​on·​the·​given·​source·​document.​··​Stylesheet·​parameters·​may·​be·​specified·​as·​name-​value·​pairs.​··​The·​return·​result·​is·​the·​DOM·​token·​for·​the·​result·​document.​</​p></​dd>132 <span·​class="term"><span·​class="arg">transform​</​span>·​<span·​class="arg"><em>sourc​e</​em></​span>·​"<span·​class="arg"><em>name<​/​em></​span>·​|·​<span·​class="arg"><em>value​</​em></​span>"</​span><dd><p>Performs·​an·​XSL·​transformation·​on·​the·​given·​source·​document.​··​Stylesheet·​parameters·​may·​be·​specified·​as·​name-​value·​pairs.​··​The·​return·​result·​is·​the·​DOM·​token·​for·​the·​result·​document.​</​p></​dd>
133 </​dl>133 </​dl>
134 </​div>134 </​div>
135 <div·​class="refsect3">135 <div·​class="refsect3">
136 <h4>136 <h4>
137 <a·​name="idm9283528"></​a>Stylesheet·​Parameters</​h4>137 <a·​name="idm9263048"></​a>Stylesheet·​Parameters</​h4>
138 <p>Any·​number·​of·​name-​value·​pairs·​may·​be·​specified·​as·​arguments·​to·​the·​<strong><em>styleshee​t</​em>·​transform</​strong>·​method.​··​These·​are·​passed·​as·​values·​for·​parameters·​in·​the·​stylesheet.​··​<tt>libxslt</​tt>·​interprets·​the·​values·​as·​XPath·​expressions,​·​where·​the·​context·​node·​is·​the·​root·​node·​for·​the·​source·​document.​··​To·​pass·​a·​value·​as·​a·​string·​it·​must·​be·​XPath-​quoted,​·​for·​example</​p>138 <p>Any·​number·​of·​name-​value·​pairs·​may·​be·​specified·​as·​arguments·​to·​the·​<strong><em>styleshee​t</​em>·​transform</​strong>·​method.​··​These·​are·​passed·​as·​values·​for·​parameters·​in·​the·​stylesheet.​··​<tt>libxslt</​tt>·​interprets·​the·​values·​as·​XPath·​expressions,​·​where·​the·​context·​node·​is·​the·​root·​node·​for·​the·​source·​document.​··​To·​pass·​a·​value·​as·​a·​string·​it·​must·​be·​XPath-​quoted,​·​for·​example</​p>
139 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>139 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>
140 set·​library·​"Gnome·​libxslt"140 set·​library·​"Gnome·​libxslt"
141 $ssheet·​transform·​$source_doc·​\141 $ssheet·​transform·​$source_doc·​\
142 »       ​library·​'$library'·​\142 »       ​library·​'$library'·​\
143 »       ​author·​"'Daniel·​Veillard'"·​\143 »       ​author·​"'Daniel·​Veillard'"·​\
144 »       ​node·​{/​*/​Element[3]}144 »       ​node·​{/​*/​Element[3]}
Offset 153, 31 lines modifiedOffset 153, 31 lines modified
153 set·​result_doc·​[$ssheet·​transform·​$source_doc]153 set·​result_doc·​[$ssheet·​transform·​$source_doc]
154 set·​result_xml·​[:​:​dom:​:​libxml2:​:​serialize·​$result_doc·​\154 set·​result_xml·​[:​:​dom:​:​libxml2:​:​serialize·​$result_doc·​\
155 ····​-​method·​[$ssheet·​cget·​-​method]]155 ····​-​method·​[$ssheet·​cget·​-​method]]
156 </​pre></​div></​pre></​div>156 </​pre></​div></​pre></​div>
157 </​div>157 </​div>
158 <div·​class="refsect2">158 <div·​class="refsect2">
159 <h3>159 <h3>
160 <a·​name="idm9277512"></​a><strong>:​:​xslt:​:​extension</​strong>160 <a·​name="idm9257032"></​a><strong>:​:​xslt:​:​extension</​strong>
161 </​h3>161 </​h3>
162 <p>The·​<strong>:​:​xslt:​:​extension</​strong>·​command·​is·​used·​to·​manage·​extensions·​of·​the·​<tt>libxslt</​tt>·​library.​··​The·​<span·​class="methodname">ad​d</​span>·​is·​used·​to·​register·​an·​extension.​··​The·​<span·​class="methodname">re​move</​span>·​is·​used·​to·​unregister·​an·​extension.​··​See·​<a·​href="">EXTENSIONS</​a>·​for·​more·​detail.​</​p>162 <p>The·​<strong>:​:​xslt:​:​extension</​strong>·​command·​is·​used·​to·​manage·​extensions·​of·​the·​<tt>libxslt</​tt>·​library.​··​The·​<span·​class="methodname">ad​d</​span>·​is·​used·​to·​register·​an·​extension.​··​The·​<span·​class="methodname">re​move</​span>·​is·​used·​to·​unregister·​an·​extension.​··​See·​<a·​href="">EXTENSIONS</​a>·​for·​more·​detail.​</​p>
163 </​div>163 </​div>
164 <div·​class="refsect2">164 <div·​class="refsect2">
165 <h3>165 <h3>
166 <a·​name="idm9261384"></​a><strong>:​:​xslt:​:​security</​strong>166 <a·​name="idm9240904"></​a><strong>:​:​xslt:​:​security</​strong>
167 </​h3>167 </​h3>
168 <p>The·​<strong>:​:​xslt:​:​security</​strong>·​command·​is·​a·​"call-​in"·​used·​to·​manage·​the·​security·​of·​a·​stylesheet·​performing·​a·​transformation.​··​The·​TclXSLT·​package·​does·​not·​create·​this·​command.​··​A·​stylesheet·​may·​need·​to·​perform·​an·​operation·​on·​an·​external·​resource,​·​such·​as·​reading·​or·​writing·​a·​file,​·​or·​opening·​a·​network·​connection.​··​Before·​performing·​such·​an·​operation,​·​TclXSLT·​will·​invoke·​the·​<strong>:​:​xslt:​:​security</​strong>·​command.​··​It·​interprets·​the·​result·​of·​the·​command·​as·​a·​boolean·​value,​·​and·​only·​if·​the·​"true"·​value·​is·​returned·​will·​it·​instruct·​the·​<tt>libxslt</​tt>·​library·​to·​continue.​</​p>168 <p>The·​<strong>:​:​xslt:​:​security</​strong>·​command·​is·​a·​"call-​in"·​used·​to·​manage·​the·​security·​of·​a·​stylesheet·​performing·​a·​transformation.​··​The·​TclXSLT·​package·​does·​not·​create·​this·​command.​··​A·​stylesheet·​may·​need·​to·​perform·​an·​operation·​on·​an·​external·​resource,​·​such·​as·​reading·​or·​writing·​a·​file,​·​or·​opening·​a·​network·​connection.​··​Before·​performing·​such·​an·​operation,​·​TclXSLT·​will·​invoke·​the·​<strong>:​:​xslt:​:​security</​strong>·​command.​··​It·​interprets·​the·​result·​of·​the·​command·​as·​a·​boolean·​value,​·​and·​only·​if·​the·​"true"·​value·​is·​returned·​will·​it·​instruct·​the·​<tt>libxslt</​tt>·​library·​to·​continue.​</​p>
169 <p>TclXSLT·​will·​invoke·​the·​<strong>:​:​xslt:​:​security</​strong>·​command·​in·​a·​different·​fashion·​depending·​on·​whether·​the·​current·​interpreter·​is·​safe·​or·​unsafe.​</​p>169 <p>TclXSLT·​will·​invoke·​the·​<strong>:​:​xslt:​:​security</​strong>·​command·​in·​a·​different·​fashion·​depending·​on·​whether·​the·​current·​interpreter·​is·​safe·​or·​unsafe.​</​p>
170 <ul>170 <ul>
171 <li><p>If·​the·​current·​interpeter·​is·​unsafe·​(ie.​·​it·​is·​a·​trusted·​interpreter)​·​then·​the·​command·​is·​invoked·​in·​the·​usual·​manner·​(see·​below·​for·​arguments)​.​··​If·​the·​command·​does·​not·​exist·​then·​the·​value·​"true"·​is·​the·​default,​·​ie.​·​the·​operation·​will·​be·​permitted.​</​p></​li>171 <li><p>If·​the·​current·​interpeter·​is·​unsafe·​(ie.​·​it·​is·​a·​trusted·​interpreter)​·​then·​the·​command·​is·​invoked·​in·​the·​usual·​manner·​(see·​below·​for·​arguments)​.​··​If·​the·​command·​does·​not·​exist·​then·​the·​value·​"true"·​is·​the·​default,​·​ie.​·​the·​operation·​will·​be·​permitted.​</​p></​li>
172 <li><p>If·​the·​current·​interpreter·​is·​safe·​then·​the·​command·​is·​invoked·​as·​a·​hidden·​command.​··​This·​is·​to·​ensure·​that·​the·​untrusted·​script·​cannot·​intercept·​the·​invocation·​of·​the·​command.​··​If·​the·​hidden·​command·​does·​not·​exist·​then·​the·​value·​"false"·​is·​the·​default,​·​ie.​·​the·​operation·​will·​not·​be·​permitted.​</​p></​li>172 <li><p>If·​the·​current·​interpreter·​is·​safe·​then·​the·​command·​is·​invoked·​as·​a·​hidden·​command.​··​This·​is·​to·​ensure·​that·​the·​untrusted·​script·​cannot·​intercept·​the·​invocation·​of·​the·​command.​··​If·​the·​hidden·​command·​does·​not·​exist·​then·​the·​value·​"false"·​is·​the·​default,​·​ie.​·​the·​operation·​will·​not·​be·​permitted.​</​p></​li>
173 </​ul>173 </​ul>
174 <p>When·​the·​<strong>:​:​xslt:​:​security</​strong>·​command·​is·​invoked·​two·​arguments·​are·​appended:​</​p>174 <p>When·​the·​<strong>:​:​xslt:​:​security</​strong>·​command·​is·​invoked·​two·​arguments·​are·​appended:​</​p>
175 <div·​class="cmdsynopsis"·​id="idm9254984">175 <div·​class="cmdsynopsis"·​id="idm9234504">
176 <a·​name="idm9254984"></​a><tt>:​:​xslt:​:​security</​tt>·​<span·​class="methodname"><e​m>request</​em></​span><em>detail</​em>176 <a·​name="idm9234504"></​a><tt>:​:​xslt:​:​security</​tt>·​<span·​class="methodname"><e​m>request</​em></​span><em>detail</​em>
177 </​div>177 </​div>
178 <dl>178 <dl>
179 <span·​class="term"><span·​class="methodname"><e​m>request</​em></​span></​span><dd>179 <span·​class="term"><span·​class="methodname"><e​m>request</​em></​span></​span><dd>
180 <p>This·​indicates·​the·​operation·​being·​requested·​and·​may·​have·​one·​of·​the·​following·​values:​</​p>180 <p>This·​indicates·​the·​operation·​being·​requested·​and·​may·​have·​one·​of·​the·​following·​values:​</​p>
181 <ul>181 <ul>
182 <li><p><span·​class="literal">readf​ile</​span></​p></​li>182 <li><p><span·​class="literal">readf​ile</​span></​p></​li>
183 <li><p><span·​class="literal"></​span></​p></​li>183 <li><p><span·​class="literal"></​span></​p></​li>
Offset 187, 19 lines modifiedOffset 187, 19 lines modified
187 </​ul>187 </​ul>
188 </​dd>188 </​dd>
189 </​dl>189 </​dl>
190 </​div>190 </​div>
191 </​div>191 </​div>
192 <div·​class="refsect1">192 <div·​class="refsect1">
193 <h2>193 <h2>
194 <a·​name="idm9244104"></​a>Extensions</​h2>194 <a·​name="idm9223624"></​a>Extensions</​h2>
195 <p>The·​TclXSLT·​package·​allows·​an·​application·​to·​bind·​Tcl·​scripts·​to·​the·​extension·​mechanism·​of·​<tt>libxslt</​tt>.​··​This·​means·​that·​Tcl·​scripts·​may·​provide·​the·​implementation·​of·​an·​XSLT·​extension·​element·​or·​function.​··​The·​binding·​is·​achieved·​to·​associating·​a·​Tcl·​namespace·​with·​an·​XML·​namespace.​</​p>195 <p>The·​TclXSLT·​package·​allows·​an·​application·​to·​bind·​Tcl·​scripts·​to·​the·​extension·​mechanism·​of·​<tt>libxslt</​tt>.​··​This·​means·​that·​Tcl·​scripts·​may·​provide·​the·​implementation·​of·​an·​XSLT·​extension·​element·​or·​function.​··​The·​binding·​is·​achieved·​to·​associating·​a·​Tcl·​namespace·​with·​an·​XML·​namespace.​</​p>
196 <div·​class="refsect2">196 <div·​class="refsect2">
197 <h3>197 <h3>
198 <a·​name="idm9242312"></​a>Implementing·​An·​Extension</​h3>198 <a·​name="idm9221832"></​a>Implementing·​An·​Extension</​h3>
199 <p>The·​Tcl·​application·​uses·​the·​<strong>:​:​xslt:​:​extension·​add</​strong>·​command·​to·​register·​an·​extension.​··​An·​XML·​Namespace·​for·​the·​extension·​is·​specified·​as·​an·​argument,​·​along·​with·​a·​Tcl·​namespace·​that·​will·​provide·​implementations·​of·​extension·​elements·​and·​functions.​··​For·​example,​</​p>199 <p>The·​Tcl·​application·​uses·​the·​<strong>:​:​xslt:​:​extension·​add</​strong>·​command·​to·​register·​an·​extension.​··​An·​XML·​Namespace·​for·​the·​extension·​is·​specified·​as·​an·​argument,​·​along·​with·​a·​Tcl·​namespace·​that·​will·​provide·​implementations·​of·​extension·​elements·​and·​functions.​··​For·​example,​</​p>
200 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>200 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>
201 :​:​xslt:​:​extension·​add·​http:​/​/​tclxml.​sourceforge.​net/​Example·​:​:​example201 :​:​xslt:​:​extension·​add·​http:​/​/​tclxml.​sourceforge.​net/​Example·​:​:​example
202 </​pre></​div></​pre></​div>202 </​pre></​div></​pre></​div>
203 <p>Everytime·​the·​<strong>:​:​xslt:​:​transform</​strong>·​command·​is·​executed,​·​a·​newly-​created·​XSLT·​engine·​is·​initialized.​··​For·​each·​registered·​extension,​·​every·​procedure·​in·​the·​associated·​Tcl·​namespace·​is·​defined·​in·​the·​XSLT·​engine·​as·​either·​an·​extension·​element·​or·​an·​extension·​function.​··​The·​procedure·​is·​defined·​as·​an·​extension·​function·​if·​it·​has·​a·​variable·​argument·​list,​·​otherwise·​it·​is·​defined·​as·​an·​extension·​element.​··​The·​procedure·​name·​is·​used·​as·​the·​local·​part·​of·​the·​extension·​name.​··​For·​example,​</​p>203 <p>Everytime·​the·​<strong>:​:​xslt:​:​transform</​strong>·​command·​is·​executed,​·​a·​newly-​created·​XSLT·​engine·​is·​initialized.​··​For·​each·​registered·​extension,​·​every·​procedure·​in·​the·​associated·​Tcl·​namespace·​is·​defined·​in·​the·​XSLT·​engine·​as·​either·​an·​extension·​element·​or·​an·​extension·​function.​··​The·​procedure·​is·​defined·​as·​an·​extension·​function·​if·​it·​has·​a·​variable·​argument·​list,​·​otherwise·​it·​is·​defined·​as·​an·​extension·​element.​··​The·​procedure·​name·​is·​used·​as·​the·​local·​part·​of·​the·​extension·​name.​··​For·​example,​</​p>
204 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>204 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>
205 namespace·​eval·​example·​{205 namespace·​eval·​example·​{
Offset 217, 21 lines modifiedOffset 217, 21 lines modified
  
217 ····​return·​{}217 ····​return·​{}
218 }218 }
219 </​pre></​div></​pre></​div>219 </​pre></​div></​pre></​div>
220 <p>"myfunc"·​is·​defined·​as·​an·​extension·​function·​and·​"myelement"·​is·​defined·​as·​an·​extension·​element.​</​p>220 <p>"myfunc"·​is·​defined·​as·​an·​extension·​function·​and·​"myelement"·​is·​defined·​as·​an·​extension·​element.​</​p>
221 <div·​class="refsect3">221 <div·​class="refsect3">
222 <h4>222 <h4>
223 <a·​name="idm9237832"></​a>Extension·​Functions</​h4>223 <a·​name="idm9217352"></​a>Extension·​Functions</​h4>
224 <p>The·​arguments·​to·​an·​extension·​function·​are·​passed·​as·​parameters·​to·​the·​Tcl·​procedure.​·​Each·​argument·​may·​be·​passed·​as·​a·​string·​or·​as·​a·​nodeset.​·​Nodesets·​are·​presented·​as·​TclDOM·​nodes.​</​p>224 <p>The·​arguments·​to·​an·​extension·​function·​are·​passed·​as·​parameters·​to·​the·​Tcl·​procedure.​·​Each·​argument·​may·​be·​passed·​as·​a·​string·​or·​as·​a·​nodeset.​·​Nodesets·​are·​presented·​as·​TclDOM·​nodes.​</​p>
225 <p>The·​return·​result·​of·​the·​Tcl·​procedure·​becomes·​the·​return·​value·​of·​the·​extension·​function.​··​The·​type·​of·​the·​result·​is·​preserved·​where·​possible,​·​otherwise·​it·​is·​converted·​to·​a·​string·​value.​</​p>225 <p>The·​return·​result·​of·​the·​Tcl·​procedure·​becomes·​the·​return·​value·​of·​the·​extension·​function.​··​The·​type·​of·​the·​result·​is·​preserved·​where·​possible,​·​otherwise·​it·​is·​converted·​to·​a·​string·​value.​</​p>
226 </​div>226 </​div>
227 <div·​class="refsect3">227 <div·​class="refsect3">
228 <h4>228 <h4>
229 <a·​name="idm9223624"></​a>Extension·​Elements</​h4>229 <a·​name="idm9203144"></​a>Extension·​Elements</​h4>
230 <p>When·​an·​extension·​element·​associated·​with·​a·​registered·​namespace·​is·​instantiated·​all·​attributes·​of·​the·​extension·​element·​are·​evaluated·​as·​Attribute·​Value·​Templates·​and·​the·​content·​of·​the·​extension·​element·​is·​evaluated·​as·​a·​sequence·​constructor.​·​The·​Tcl·​procedure·​associated·​with·​the·​extension·​element·​is·​then·​invoked.​·​The·​Tcl·​procedure·​is·​passed·​four·​parameters:​</​p>230 <p>When·​an·​extension·​element·​associated·​with·​a·​registered·​namespace·​is·​instantiated·​all·​attributes·​of·​the·​extension·​element·​are·​evaluated·​as·​Attribute·​Value·​Templates·​and·​the·​content·​of·​the·​extension·​element·​is·​evaluated·​as·​a·​sequence·​constructor.​·​The·​Tcl·​procedure·​associated·​with·​the·​extension·​element·​is·​then·​invoked.​·​The·​Tcl·​procedure·​is·​passed·​four·​parameters:​</​p>
231 <ul>231 <ul>
232 <li><p>The·​first·​parameter·​is·​a·​DOM·​document,​·​an·​RVT,​·​that·​is·​the·​result·​of·​the·​sequence·​constructor.​</​p></​li>232 <li><p>The·​first·​parameter·​is·​a·​DOM·​document,​·​an·​RVT,​·​that·​is·​the·​result·​of·​the·​sequence·​constructor.​</​p></​li>
233 <li><p>The·​second·​parameter·​is·​the·​current·​node·​in·​the·​source·​document.​</​p></​li>233 <li><p>The·​second·​parameter·​is·​the·​current·​node·​in·​the·​source·​document.​</​p></​li>
234 <li><p>The·​third·​parameter·​is·​the·​extension·​element·​in·​the·​stylesheet·​document.​</​p></​li>234 <li><p>The·​third·​parameter·​is·​the·​extension·​element·​in·​the·​stylesheet·​document.​</​p></​li>
235 <li>235 <li>
236 <p>The·​fourth·​parameter·​is·​a·​list.​·​Each·​element·​in·​the·​list·​represents·​an·​attribute·​of·​the·​extension·​element.​·​The·​list·​elements·​are·​each·​a·​sublist·​that·​has·​three·​values:​</​p>236 <p>The·​fourth·​parameter·​is·​a·​list.​·​Each·​element·​in·​the·​list·​represents·​an·​attribute·​of·​the·​extension·​element.​·​The·​list·​elements·​are·​each·​a·​sublist·​that·​has·​three·​values:​</​p>
Offset 244, 15 lines modifiedOffset 244, 15 lines modified
244 </​ul>244 </​ul>
245 <p>Any·​result·​returned·​by·​the·​Tcl·​procedure·​is·​discarded·​(in·​the·​current·​implementation)​.​</​p>245 <p>Any·​result·​returned·​by·​the·​Tcl·​procedure·​is·​discarded·​(in·​the·​current·​implementation)​.​</​p>
246 <p>If·​the·​Tcl·​procedure·​raises·​an·​error·​then·​this·​is·​passed·​through·​to·​the·​XSL·​stylesheet·​as·​an·​XSLT·​exception·​condition.​</​p>246 <p>If·​the·​Tcl·​procedure·​raises·​an·​error·​then·​this·​is·​passed·​through·​to·​the·​XSL·​stylesheet·​as·​an·​XSLT·​exception·​condition.​</​p>
247 </​div>247 </​div>
248 </​div>248 </​div>
249 <div·​class="refsect2">249 <div·​class="refsect2">
250 <h3>250 <h3>
251 <a·​name="idm9214920"></​a>Using·​An·​Extension</​h3>251 <a·​name="idm9194440"></​a>Using·​An·​Extension</​h3>
252 <p>To·​invoke·​an·​extension·​in·​an·​XSL·​stylesheet,​·​use·​the·​normal·​XSLT·​extension·​mechanism.​··​The·​XML·​Namespace·​matches·​the·​extension·​to·​the·​registered·​Tcl·​namespace·​(NB.​·​the·​stylesheet·​author·​is·​free·​to·​choose·​any·​prefix·​for·​the·​extension·​namespace)​.​··​For·​example,​</​p>252 <p>To·​invoke·​an·​extension·​in·​an·​XSL·​stylesheet,​·​use·​the·​normal·​XSLT·​extension·​mechanism.​··​The·​XML·​Namespace·​matches·​the·​extension·​to·​the·​registered·​Tcl·​namespace·​(NB.​·​the·​stylesheet·​author·​is·​free·​to·​choose·​any·​prefix·​for·​the·​extension·​namespace)​.​··​For·​example,​</​p>
253 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>253 <div·​class="informalexampl​e"><pre><div·​class="programlisting​"><pre>
254 &lt;​xsl:​stylesheet·​version='1.​0'254 &lt;​xsl:​stylesheet·​version='1.​0'
255 »       ​xmlns:​xsl='http:​/​/​www.​w3.​org/​1999/​XSL/​Transform'255 »       ​xmlns:​xsl='http:​/​/​www.​w3.​org/​1999/​XSL/​Transform'
256 »       ​xmlns:​eg='http:​/​/​tclxml.​sourceforge.​net/​Example'&gt;​256 »       ​xmlns:​eg='http:​/​/​tclxml.​sourceforge.​net/​Example'&gt;​
  
257 ··​&lt;​xsl:​template·​match='/​'&gt;​257 ··​&lt;​xsl:​template·​match='/​'&gt;​