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

Changes In Branch dom_featureinfo Excluding Merge-Ins

This is equivalent to a diff from 02675cd3c8 to d40d0f4c10

2013-09-26
01:35
Added dom method featureinfo. check-in: 9ab65ed6fc user: rolf tags: trunk
01:30
Added tests. Documentation tweak. Closed-Leaf check-in: d40d0f4c10 user: rolf tags: dom_featureinfo
2013-09-25
00:47
Updated and regenerated doc. check-in: 8ccb6f120b user: rolf tags: dom_featureinfo
00:09
Updated from trunk. check-in: 3a3b825826 user: rolf tags: dom_featureinfo
00:03
More work on OASIS-suite.tcl. check-in: 02675cd3c8 user: rolf tags: trunk
2013-09-24
22:50
Added a Relax NG compact tmml schema definition (generated by trang from the tmml.dtd and a minor modification. check-in: 1189b8bada user: rolf tags: trunk

Changes to doc/dom.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: dom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile$ $Revision$">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: dom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid0x80b16e8">NAME</a> · <a href="#SECTid0x80b1760">SYNOPSIS</a> · <a href="#SECTid0x80b1828">DESCRIPTION </a> · <a href="#SECTid0x80b3f38">KEYWORDS</a>
            7  +<a href="#SECTid0xc559e0">NAME</a> · <a href="#SECTid0xc0a3d0">SYNOPSIS</a> · <a href="#SECTid0xc5fe50">DESCRIPTION </a> · <a href="#SECTid0xbf8f80">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -  <h2><a name="SECTid0x80b16e8">NAME</a></h2><p class="namesection">
           10  +  <h2><a name="SECTid0xc559e0">NAME</a></h2><p class="namesection">
    11     11   <b class="names">dom - </b><br>Create an in-memory DOM tree from XML</p>
    12     12     
    13         -  <h2><a name="SECTid0x80b1760">SYNOPSIS</a></h2><pre class="syntax">package require tdom
           13  +  <h2><a name="SECTid0xc0a3d0">SYNOPSIS</a></h2><pre class="syntax">package require tdom
    14     14   
    15     15   <b class="cmd">dom</b> <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>
    16     16   
    17         -  <h2><a name="SECTid0x80b1828">DESCRIPTION </a></h2><p>This command provides the creation of complete DOM trees in memory. In
           17  +  <h2><a name="SECTid0xc5fe50">DESCRIPTION </a></h2><p>This command provides the creation of complete DOM trees in memory. In
    18     18   the usual case a string containing a XML information is parsed and converted
    19     19   into a DOM tree. <i class="m">method</i> indicates a specific subcommand. </p><p>The valid methods are:</p><dl class="commandlist">
    20     20           
    21     21             <dt>
    22     22   <b class="cmd">dom</b> <b class="method">parse</b> ?<i class="m">options</i>? ?<i class="m">data</i>?</dt>
    23     23             <dd>Parses the XML information and builds up the DOM tree in memory
    24     24   providing a Tcl object command to this DOM document object. Example:
................................................................................
   414    414   <i class="m">string</i>
   415    415   </dt>
   416    416             <dd>Returns 1, if <i class="m">string</i> is
   417    417   valid according to production 16 of the <a href="http://www.w3.org/TR/2000/REC-xml-20001006.html">XML 1.0</a>
   418    418   recommendation. Otherwise it returns 0.</dd>
   419    419           
   420    420   
   421         -      </dl>
          421  +        
          422  +            <dt>
          423  +<b class="cmd">dom</b> <b class="method">featureinfo</b>
          424  +            <i class="m">feature</i>
          425  +</dt>
          426  +            <dd>This method provides information about the used
          427  +            build options and the expat version. The valid values for
          428  +            the <i class="m">feature</i> argument are:
          429  +            <dl class="optlist">
          430  +                
          431  +                    <dt><b>expatversion</b></dt>
          432  +                    <dd>Returns the version of the underlyling expat
          433  +                    version as string, something like
          434  +                    "exapt_2.1.0". This is. what the expat API
          435  +                    function XML_ExpatVersion() returns.</dd>
          436  +                
          437  +                
          438  +                    <dt><b>expatmajorversion</b></dt>
          439  +                    <dd>Returns the major version of the underlyling
          440  +                    expat version as integer.</dd>
          441  +                
          442  +                
          443  +                    <dt><b>expatminorversion</b></dt>
          444  +                    <dd>Returns the minor version of the underlyling
          445  +                    expat version as integer.</dd>
          446  +                
          447  +                
          448  +                    <dt><b>expatmicroversion</b></dt>
          449  +                    <dd>Returns the micro version of the underlyling
          450  +                    expat version as integer.</dd>
          451  +                
          452  +                
          453  +                    <dt><b>dtd</b></dt>
          454  +                    <dd>Returns as boolean, if build with
          455  +                    <i class="m">--enable-dtd</i>.</dd>
          456  +                
          457  +                
          458  +                    <dt><b>ns</b></dt>
          459  +                    <dd>Returns as boolean, if build with
          460  +                    <i class="m">--enable-ns</i>.</dd>
          461  +                
          462  +                
          463  +                    <dt><b>unknown</b></dt>
          464  +                    <dd>Returns as boolean, if build with
          465  +                    <i class="m">--enable-unknown</i>.</dd>
          466  +                
          467  +                
          468  +                    <dt><b>tdomalloc</b></dt>
          469  +                    <dd>Returns as boolean, if build with
          470  +                    <i class="m">--enable-tdomalloc</i>.</dd>
          471  +                
          472  +                
          473  +                    <dt><b>lessns</b></dt>
          474  +                    <dd>Returns as boolean, if build with
          475  +                    <i class="m">--enable-lessns</i>.</dd>
          476  +                
          477  +            </dl>
          478  +            </dd>   
          479  +        
          480  +    </dl>
   422    481   
   423         -  <h2><a name="SECTid0x80b3f38">KEYWORDS</a></h2><p class="keywords">
          482  +<h2><a name="SECTid0xbf8f80">KEYWORDS</a></h2><p class="keywords">
   424    483   <a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-document">document</a>, <a class="keyword" href="keyword-index.html#KW-node">node</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
   425    484   </p>
   426         -</div><div class="footer">
   427         -<hr class="navsep"><!-- footer.html: Standard navigational footer --><div class="navbar" align="center">
   428         -        <a class="navaid" href="index.html">tDOM Overview</a>
   429         - ·	<a class="navaid" href="doc-index.html">Table of Contents</a>
   430         - ·	<a class="navaid" href="category-index.html">Index</a>
   431         - ·	<a class="navaid" href="keyword-index.html">Keywords</a>
   432         -</div>
          485  +</div><hr class="navsep"><div class="navbar" align="center">
          486  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   433    487   </div>
   434    488   </body>
   435    489   </html>

Changes to doc/dom.n.

   486    486   valid according to production 20 of the XML 1.0
   487    487   recommendation. Otherwise it returns 0.
   488    488   .TP
   489    489   \&\fB\fBdom\fP \fBisPIValue\fP \fIstring\fB
   490    490   \&\fRReturns 1, if \fIstring\fR is
   491    491   valid according to production 16 of the XML 1.0
   492    492   recommendation. Otherwise it returns 0.
          493  +.TP
          494  +\&\fB\fBdom\fP \fBfeatureinfo\fP \fIfeature\fB
          495  +\&\fRThis method provides information about the used
          496  +build options and the expat version. The valid values for
          497  +the \fIfeature\fR argument are:
          498  +.RS
          499  +.IP "\fBexpatversion\fR"
          500  +Returns the version of the underlyling expat
          501  +version as string, something like
          502  +"exapt_2.1.0". This is. what the expat API
          503  +function XML_ExpatVersion() returns.
          504  +.IP "\fBexpatmajorversion\fR"
          505  +Returns the major version of the underlyling
          506  +expat version as integer.
          507  +.IP "\fBexpatminorversion\fR"
          508  +Returns the minor version of the underlyling
          509  +expat version as integer.
          510  +.IP "\fBexpatmicroversion\fR"
          511  +Returns the micro version of the underlyling
          512  +expat version as integer.
          513  +.IP "\fBdtd\fR"
          514  +Returns as boolean, if build with
          515  +\&\fI--enable-dtd\fR.
          516  +.IP "\fBns\fR"
          517  +Returns as boolean, if build with
          518  +\&\fI--enable-ns\fR.
          519  +.IP "\fBunknown\fR"
          520  +Returns as boolean, if build with
          521  +\&\fI--enable-unknown\fR.
          522  +.IP "\fBtdomalloc\fR"
          523  +Returns as boolean, if build with
          524  +\&\fI--enable-tdomalloc\fR.
          525  +.IP "\fBlessns\fR"
          526  +Returns as boolean, if build with
          527  +\&\fI--enable-lessns\fR.
          528  +.RE
   493    529   .SH KEYWORDS
   494    530   XML, DOM, document, node, parsing

Changes to doc/dom.xml.

   386    386             <command><cmd>dom</cmd> <method>isPIValue</method>
   387    387   <m>string</m></command>
   388    388             <desc>Returns 1, if <m>string</m> is
   389    389   valid according to production 16 of the <ref href="http://www.w3.org/TR/2000/REC-xml-20001006.html">XML 1.0</ref>
   390    390   recommendation. Otherwise it returns 0.</desc>
   391    391           </commanddef>
   392    392   
   393         -      </commandlist>
   394         -  </section>
          393  +        <commanddef>
          394  +            <command><cmd>dom</cmd> <method>featureinfo</method> <m>feature</m></command>
          395  +            <desc>This method provides information about the used
          396  +            build options and the expat version. The valid values for
          397  +            the <m>feature</m> argument are:
          398  +            <optlist>
          399  +                <optdef>
          400  +                    <optname>expatversion</optname>
          401  +                    <desc>Returns the version of the underlyling expat
          402  +                    version as string, something like
          403  +                    "exapt_2.1.0". This is. what the expat API
          404  +                    function XML_ExpatVersion() returns.</desc>
          405  +                </optdef>
          406  +                <optdef>
          407  +                    <optname>expatmajorversion</optname>
          408  +                    <desc>Returns the major version of the underlyling
          409  +                    expat version as integer.</desc>
          410  +                </optdef>
          411  +                <optdef>
          412  +                    <optname>expatminorversion</optname>
          413  +                    <desc>Returns the minor version of the underlyling
          414  +                    expat version as integer.</desc>
          415  +                </optdef>
          416  +                <optdef>
          417  +                    <optname>expatmicroversion</optname>
          418  +                    <desc>Returns the micro version of the underlyling
          419  +                    expat version as integer.</desc>
          420  +                </optdef>
          421  +                <optdef>
          422  +                    <optname>dtd</optname>
          423  +                    <desc>Returns as boolean, if build with
          424  +                    <m>--enable-dtd</m>.</desc>
          425  +                </optdef>
          426  +                <optdef>
          427  +                    <optname>ns</optname>
          428  +                    <desc>Returns as boolean, if build with
          429  +                    <m>--enable-ns</m>.</desc>
          430  +                </optdef>
          431  +                <optdef>
          432  +                    <optname>unknown</optname>
          433  +                    <desc>Returns as boolean, if build with
          434  +                    <m>--enable-unknown</m>.</desc>
          435  +                </optdef>
          436  +                <optdef>
          437  +                    <optname>tdomalloc</optname>
          438  +                    <desc>Returns as boolean, if build with
          439  +                    <m>--enable-tdomalloc</m>.</desc>
          440  +                </optdef>
          441  +                <optdef>
          442  +                    <optname>lessns</optname>
          443  +                    <desc>Returns as boolean, if build with
          444  +                    <m>--enable-lessns</m>.</desc>
          445  +                </optdef>
          446  +            </optlist>
          447  +            </desc>   
          448  +        </commanddef>
          449  +    </commandlist>
          450  +</section>
   395    451   
   396         -  <keywords>
          452  +<keywords>
   397    453       <keyword>XML</keyword>
   398    454       <keyword>DOM</keyword>
   399    455       <keyword>document</keyword>
   400    456       <keyword>node</keyword>
   401    457       <keyword>parsing</keyword>
   402         -  </keywords>
          458  +</keywords>
   403    459   </manpage>

Changes to doc/domDoc.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domDoc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile$ $Revision$">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: domDoc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid0x80a9a60">NAME</a> · <a href="#SECTid0x80a7380">SYNOPSIS</a> · <a href="#SECTid0x80967e0">DESCRIPTION </a> · <a href="#SECTid0x80cf590">SEE ALSO</a> · <a href="#SECTid0x80cf7b0">KEYWORDS</a>
            7  +<a href="#SECTid0xb33e90">NAME</a> · <a href="#SECTid0xbdcc00">SYNOPSIS</a> · <a href="#SECTid0xbd6c70">DESCRIPTION </a> · <a href="#SECTid0xc270c0">SEE ALSO</a> · <a href="#SECTid0xc27450">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -  <h2><a name="SECTid0x80a9a60">NAME</a></h2><p class="namesection">
           10  +  <h2><a name="SECTid0xb33e90">NAME</a></h2><p class="namesection">
    11     11   <b class="names">domDoc - </b><br>Manipulates an instance of a DOM document object</p>
    12     12     
    13         -  <h2><a name="SECTid0x80a7380">SYNOPSIS</a></h2><pre class="syntax">
           13  +  <h2><a name="SECTid0xbdcc00">SYNOPSIS</a></h2><pre class="syntax">
    14     14   <b class="cmd">domDocObjCmd</b> <i class="m">method</i> ?<i class="m">arg arg ...</i>?</pre>
    15     15   
    16         -  <h2><a name="SECTid0x80967e0">DESCRIPTION </a></h2><p>This command manipulates one particular instance of a document
           16  +  <h2><a name="SECTid0xbd6c70">DESCRIPTION </a></h2><p>This command manipulates one particular instance of a document
    17     17   object. <i class="m">method</i> indicates a specific method of the document class. These
    18     18   methods should closely conform to the W3C recommendation "Document Object Model
    19     19   (Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>). Look
    20     20   at these documents for a deeper understanding of the functionality.</p><p>The valid methods are:</p><dl class="commandlist">
    21     21           
    22     22             <dt>
    23     23   <b class="method">documentElement</b> ?<i class="m">objVar</i>?</dt>
................................................................................
   176    176           <dd>Returns the system identifier of the doctype declaration of the
   177    177   document, if there is one, otherwise the empty string. If there is a value
   178    178   given to the method, the system identifier of the document is set to this
   179    179   value.</dd>
   180    180         
   181    181   
   182    182         
   183         -        <dt><b class="method">internalSubset <i class="m">?internalSubset?</i>
   184         -</b></dt>
          183  +        <dt>
          184  +<b class="method">internalSubset</b> <i class="m">?internalSubset?</i>
          185  +</dt>
   185    186           <dd>Returns the internal subset of the doctype declaration of the
   186    187   document, if there is one, otherwise the empty string. If there is a value
   187    188   given to the method, the internal subset of the document is set to this
   188    189   value. Note, that none of the parsing methods preserve the internal subset
   189    190   of a document; a freshly parsed document will always have an empty internal
   190    191   subset. Also note, that the method doesen't do any syntactical check on a
   191    192   given internal subset.</dd>
................................................................................
   502    503   set root [$doc documentElement]
   503    504   set childNodes [$root selectNodes -namespaces {default http://www.defaultnamespace.org} default:child]</pre>
   504    505   
   505    506             </dd>
   506    507         
   507    508   
   508    509         
   509         -        <dt><b class="method">baseURI <i class="m">?URI?</i>
   510         -</b></dt>
          510  +        <dt>
          511  +<b class="method">baseURI</b> <i class="m">?URI?</i>
          512  +</dt>
   511    513           <dd>Returns the present baseURI of the document. If the optional 
   512    514   argument URI is given, sets the base URI of the document to the given URI.</dd>
   513    515         
   514    516   
   515    517         
   516    518           <dt>
   517    519   <b class="method">appendFromScript</b> <i class="m">tclScript</i>
................................................................................
   545    547   
   546    548     </dl><p>Otherwise, if an unknown method name is given, the command with the
   547    549   same name as the given metho within the namespace <tt class="samp">::dom::domDoc</tt> is
   548    550   tried to be executed. This allows quick method additions on Tcl level.</p><p>Newly created nodes are appended to a hidden fragment list. If they
   549    551   are not moved into the tree they are automaticaly deleted, when the whole
   550    552   document gets deleted.</p>
   551    553   
   552         -    <h2><a name="SECTid0x80cf590">SEE ALSO</a></h2><p class="seealso">dom, domNode</p>
          554  +    <h2><a name="SECTid0xc270c0">SEE ALSO</a></h2><p class="seealso">dom, domNode</p>
   553    555   
   554         -    <h2><a name="SECTid0x80cf7b0">KEYWORDS</a></h2><p class="keywords">
          556  +    <h2><a name="SECTid0xc27450">KEYWORDS</a></h2><p class="keywords">
   555    557   <a class="keyword" href="keyword-index.html#KW-DOMnodecreation">DOM node creation</a>, <a class="keyword" href="keyword-index.html#KW-documentelement">document element</a>
   556    558   </p>
   557    559   
   558    560   </div><hr class="navsep"><div class="navbar" align="center">
   559    561   <a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   560    562   </div>
   561    563   </body>
   562    564   </html>

Changes to doc/domDoc.n.

   280    280   .TP
   281    281   \&\fB\fBsystemId\fP \fI?systemId?\fB
   282    282   \&\fRReturns the system identifier of the doctype declaration of the
   283    283   document, if there is one, otherwise the empty string. If there is a value
   284    284   given to the method, the system identifier of the document is set to this
   285    285   value.
   286    286   .TP
   287         -\&\fB\fBinternalSubset \fI?internalSubset?\fB\fP
          287  +\&\fB\fBinternalSubset\fP \fI?internalSubset?\fB
   288    288   \&\fRReturns the internal subset of the doctype declaration of the
   289    289   document, if there is one, otherwise the empty string. If there is a value
   290    290   given to the method, the internal subset of the document is set to this
   291    291   value. Note, that none of the parsing methods preserve the internal subset
   292    292   of a document; a freshly parsed document will always have an empty internal
   293    293   subset. Also note, that the method doesen't do any syntactical check on a
   294    294   given internal subset.
................................................................................
   532    532   
   533    533   set doc [dom parse {<doc xmlns="http://www.defaultnamespace.org"><child/></doc>}]
   534    534   set root [$doc documentElement]
   535    535   set childNodes [$root selectNodes -namespaces {default http://www.defaultnamespace.org} default:child]
   536    536   .CE
   537    537   .RE
   538    538   .TP
   539         -\&\fB\fBbaseURI \fI?URI?\fB\fP
          539  +\&\fB\fBbaseURI\fP \fI?URI?\fB
   540    540   \&\fRReturns the present baseURI of the document. If the optional
   541    541   argument URI is given, sets the base URI of the document to the given URI.
   542    542   .TP
   543    543   \&\fB\fBappendFromScript\fP \fItclScript\fB
   544    544   \&\fRAppends the nodes created by the \fItclScript\fR by
   545    545   Tcl functions, which have been built using \fIdom createNodeCmd\fR, at the end
   546    546   of the current list of top level nodes of the document.

Changes to doc/domNode.html.

     1      1   <html>
     2      2   <head>
     3      3   <link rel="stylesheet" href="manpage.css"><title>tDOM manual: domNode</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid0xb3b870">NAME</a> · <a href="#SECTid0xb53db0">SYNOPSIS</a> · <a href="#SECTid0xb5e220"> DESCRIPTION </a> · <a href="#SECTid0xba0550">SEE ALSO</a> · <a href="#SECTid0xba0920">KEYWORDS</a>
            7  +<a href="#SECTid0xbfa130">NAME</a> · <a href="#SECTid0xb35060">SYNOPSIS</a> · <a href="#SECTid0xc044c0"> DESCRIPTION </a> · <a href="#SECTid0xc30d50">SEE ALSO</a> · <a href="#SECTid0xc310e0">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -  <h2><a name="SECTid0xb3b870">NAME</a></h2><p class="namesection">
           10  +  <h2><a name="SECTid0xbfa130">NAME</a></h2><p class="namesection">
    11     11   <b class="names">domNode - </b><br>Manipulates an instance of a DOM node object</p>
    12     12   
    13     13   
    14     14   
    15         -  <h2><a name="SECTid0xb53db0">SYNOPSIS</a></h2><pre class="syntax"> $nodeObject <i class="m">method</i>  <i class="m">arg arg ...</i>
           15  +  <h2><a name="SECTid0xb35060">SYNOPSIS</a></h2><pre class="syntax"> $nodeObject <i class="m">method</i>  <i class="m">arg arg ...</i>
    16     16   </pre>
    17         -  <h2><a name="SECTid0xb5e220"> DESCRIPTION </a></h2><p>This command manipulates one particular instance of a DOM node object.
           17  +  <h2><a name="SECTid0xc044c0"> DESCRIPTION </a></h2><p>This command manipulates one particular instance of a DOM node object.
    18     18   <i class="m">method</i> indicates a specific method of the node class. These methods
    19     19   should closely conform to the W3C recommendation "Document Object Model
    20     20   (Core) Level 1" (<a href="http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html">http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html</a>)
    21     21   as well to parts of the W3C draft "XML Pointer Language (XPointer)"
    22     22   (<a href="http://www.w3.org/TR/1998/WD-xptr-19980303">http://www.w3.org/TR/1998/WD-xptr-19980303</a>).
    23     23   Please note, that the XPointer methods are deprecated. Use DOM methods
    24     24   or XPath expressions instead of them.</p><p>The selectNodes method implements the "XML Path
................................................................................
   558    558           <dd>Translate the subtree starting at the object node according to
   559    559   the specifications in <i class="m">specifications</i> and outputs the result in the
   560    560   variable <i class="m">outputVar</i> . The translation is very similar to Cost Simple
   561    561   mode.</dd>
   562    562         
   563    563   
   564    564         
   565         -        <dt><b class="method">toXPath <i class="m">?-legacy?</i>
   566         -</b></dt>
          565  +        <dt>
          566  +<b class="method">toXPath</b> <i class="m">?-legacy?</i>
          567  +</dt>
   567    568           <dd>Returns an XPath, which exactly addresses the given
   568    569   node in its document. This XPath is only valid as there are no changes to DOM
   569    570   tree made later one. With the -legacy option, other XPath expressions
   570    571   are returnd, which doesn't work in all cases.</dd>
   571    572         
   572    573   
   573    574         
   574    575           <dt><b class="method">getBaseURI</b></dt>
   575    576           <dd>Returns the baseURI of the node. This method is deprecated in
   576    577             favor of the <i class="m">baseURI</i> method.</dd>
   577    578         
   578    579   
   579    580         
   580         -        <dt><b class="method">baseURI <i class="m">?URI?</i>
   581         -</b></dt>
          581  +        <dt>
          582  +<b class="method">baseURI</b> <i class="m">?URI?</i>
          583  +</dt>
   582    584           <dd>Returns the present baseURI of the node. If the optional 
   583    585   argument URI is given, sets the base URI of the node and of all of its child
   584    586   nodes out of the same enitity as node to the given URI.</dd>
   585    587         
   586    588   
   587    589         
   588    590           <dt>
................................................................................
   663    665   for <i class="m">getAttribute</i>.</dd>
   664    666         
   665    667       </dl><p>Otherwise, if an unknown method name is given, the command with the same
   666    668   name as the given method within the namespace <tt class="l">::dom::domNode</tt> is tried to
   667    669   be executed. This allows quick method additions on Tcl level.</p>
   668    670   
   669    671   
   670         -  <h2><a name="SECTid0xba0550">SEE ALSO</a></h2><p class="seealso">dom, domDoc</p>
          672  +  <h2><a name="SECTid0xc30d50">SEE ALSO</a></h2><p class="seealso">dom, domDoc</p>
   671    673     
   672         -  <h2><a name="SECTid0xba0920">KEYWORDS</a></h2><p class="keywords">
          674  +  <h2><a name="SECTid0xc310e0">KEYWORDS</a></h2><p class="keywords">
   673    675   <a class="keyword" href="keyword-index.html#KW-XML">XML</a>, <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-document">document</a>, <a class="keyword" href="keyword-index.html#KW-node">node</a>, <a class="keyword" href="keyword-index.html#KW-parsing">parsing</a>
   674    676   </p>
   675    677     
   676    678   </div><hr class="navsep"><div class="navbar" align="center">
   677    679   <a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   678    680   </div>
   679    681   </body>
   680    682   </html>

Changes to doc/domNode.n.

   533    533   .TP
   534    534   \&\fB\fBsimpleTranslate\fP \fIoutputVar\fB \fIspecifications\fB
   535    535   \&\fRTranslate the subtree starting at the object node according to
   536    536   the specifications in \fIspecifications\fR and outputs the result in the
   537    537   variable \fIoutputVar\fR . The translation is very similar to Cost Simple
   538    538   mode.
   539    539   .TP
   540         -\&\fB\fBtoXPath \fI?-legacy?\fB\fP
          540  +\&\fB\fBtoXPath\fP \fI?-legacy?\fB
   541    541   \&\fRReturns an XPath, which exactly addresses the given
   542    542   node in its document. This XPath is only valid as there are no changes to DOM
   543    543   tree made later one. With the -legacy option, other XPath expressions
   544    544   are returnd, which doesn't work in all cases.
   545    545   .TP
   546    546   \&\fB\fBgetBaseURI\fP
   547    547   \&\fRReturns the baseURI of the node. This method is deprecated in
   548    548   favor of the \fIbaseURI\fR method.
   549    549   .TP
   550         -\&\fB\fBbaseURI \fI?URI?\fB\fP
          550  +\&\fB\fBbaseURI\fP \fI?URI?\fB
   551    551   \&\fRReturns the present baseURI of the node. If the optional
   552    552   argument URI is given, sets the base URI of the node and of all of its child
   553    553   nodes out of the same enitity as node to the given URI.
   554    554   .TP
   555    555   \&\fB\fBdisableOutputEscaping\fP \fI?boolean?\fB
   556    556   \&\fRThis method works only for text nodes; for every other nodes it
   557    557   returns error. Without the optional argument it returns, if disabling output

Changes to doc/expat.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expat</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile$ $Revision$">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expat</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid80acb10">NAME</a> · <a href="#SECTid80acb88">SYNOPSIS</a> · <a href="#SECTid80acd40">DESCRIPTION</a> · <a href="#SECTid80ace80">COMMAND OPTIONS</a> · <a href="#SECTid80aeac8"> COMMAND METHODS </a> · <a href="#SECTid80af860">Callback Command Return Codes</a> · <a href="#SECTid80af950">SEE ALSO</a> · <a href="#SECTid80af9c8">KEYWORDS</a>
            7  +<a href="#SECTid0xbd7740">NAME</a> · <a href="#SECTid0xc60700">SYNOPSIS</a> · <a href="#SECTid0xc4eae0">DESCRIPTION</a> · <a href="#SECTid0xc53830">COMMAND OPTIONS</a> · <a href="#SECTid0xc3a630"> COMMAND METHODS </a> · <a href="#SECTid0xc17880">Callback Command Return Codes</a> · <a href="#SECTid0xc18290">SEE ALSO</a> · <a href="#SECTid0xc18650">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -    <h2><a name="SECTid80acb10">NAME</a></h2><p class="namesection">
           10  +    <h2><a name="SECTid0xbd7740">NAME</a></h2><p class="namesection">
    11     11   <b class="names">expat - </b><br>Creates an instance of an expat parser object</p>
    12     12   
    13     13   
    14     14   
    15         -    <h2><a name="SECTid80acb88">SYNOPSIS</a></h2><pre class="syntax">
           15  +    <h2><a name="SECTid0xc60700">SYNOPSIS</a></h2><pre class="syntax">
    16     16   <b class="cmd">package require tdom</b>
    17     17   
    18     18   <b class="cmd">expat</b> ?<i class="m">parsername</i>? ?<i class="m">-namespace</i>? ?<i class="m">arg arg ..</i>
    19     19   
    20     20   <b class="cmd">xml::parser</b> ?<i class="m">parsername</i>? ?<i class="m">-namespace</i>? ?<i class="m">arg arg ..</i>
    21     21   </pre>
    22         -    <h2><a name="SECTid80acd40">DESCRIPTION</a></h2><p>The parser created with <i class="m">expat</i> or <i class="m">xml::parser</i>
           22  +    <h2><a name="SECTid0xc4eae0">DESCRIPTION</a></h2><p>The parser created with <i class="m">expat</i> or <i class="m">xml::parser</i>
    23     23   (which is just another name for the same command in an own namespace) are able
    24     24   to parse any kind of well-formed XML. The parsers are stream oriented XML
    25     25   parser. This means that you register handler scripts with the parser prior to
    26     26   starting the parse. These handler scripts are called when the parser discovers
    27     27   the associated structures in the document being parsed.  A start tag is an
    28     28   example of the kind of structures for which you may register a handler
    29     29   script.</p><p>The parsers do not validate the XML document. They do parse the internal DTD
................................................................................
    32     32   there).</p><p>Additionly, the Tcl extension code that implements this command provides an
    33     33   API for adding C level coded handlers. Up to now, there exists the parser
    34     34   extension command "tdom". The handler set installed by this extension build an
    35     35   in memory "tDOM" DOM tree, while the parser is parsing the input.</p><p>It is possible to register an arbitrary amount of different handler scripts
    36     36   and C level handlers for most of the events. If the event occurs, they are
    37     37   called in turn.</p>
    38     38   
    39         -    <h2><a name="SECTid80ace80">COMMAND OPTIONS</a></h2><dl class="optlist">
           39  +    <h2><a name="SECTid0xc53830">COMMAND OPTIONS</a></h2><dl class="optlist">
    40     40           
    41     41             <dt><b>-namespace</b></dt>
    42     42   
    43     43             <dd>
    44     44   <p>Enables namespace parsing. You must use this option while
    45     45   creating the parser with the <tt class="samp">expat</tt> or <tt class="samp">xml::parser</tt>
    46     46   command. You can't enable (nor disable) namespace parsing with
................................................................................
   612    612   -paramentityparsing value of "never" (which is the default) suppresses any call
   613    613   to the -externalentitycommand script. Pleace notice, that, if the document also
   614    614   doesn't have an internal subset, the -startdoctypedeclcommand and
   615    615   enddoctypedeclcommand scripts, if set, are not called.</dd>
   616    616           
   617    617   
   618    618         </dl>
   619         -    <h2><a name="SECTid80aeac8"> COMMAND METHODS </a></h2><dl class="commandlist">
          619  +    <h2><a name="SECTid0xc3a630"> COMMAND METHODS </a></h2><dl class="commandlist">
   620    620           
   621    621             <dt>
   622    622   <b class="cmd">parser</b> <b class="method">configure</b> <i class="m">option value ?option value?</i>
   623    623   </dt>
   624    624   
   625    625             <dd><p>Sets configuration options for the parser. Every command
   626    626   option, except <i class="m">-namespace</i> can be set or modified with this method.</p></dd>
   627    627           
   628    628   
   629    629           
   630    630             <dt>
   631         -<b class="cmd">parser</b> <b class="method">cget <i class="m">?-handlerset name? option</i>
   632         -</b>
          631  +<b class="cmd">parser</b> <b class="method">cget</b> <i class="m">?-handlerset name? option</i>
   633    632   </dt>
   634    633   
   635    634             <dd>
   636    635   <p>Return the current configuration value option for the
   637    636   parser.</p> 
   638    637             <p>If the -handlerset option is used, the configuration for the
   639    638   named handler set is returned.</p>
................................................................................
   752    751             <dd><p>Resets the parser in preparation for parsing another
   753    752   document. A parser cannot be reseted from within one of its handler callbacks
   754    753   (neither directly nor indirectly) and will raise a tcl error in this
   755    754   cases.</p></dd>
   756    755           
   757    756         </dl>
   758    757   
   759         -    <h2><a name="SECTid80af860">Callback Command Return Codes</a></h2><p>A script invoked for any of the parser callback commands, such as
          758  +    <h2><a name="SECTid0xc17880">Callback Command Return Codes</a></h2><p>A script invoked for any of the parser callback commands, such as
   760    759   -elementstartcommand, -elementendcommand, etc, may return an error code other
   761    760   than "ok" or "error". All callbacks may in addition return
   762    761   "break" or "continue".</p><p>If a callback script returns an "error" error code then
   763    762   processing of the document is terminated and the error is propagated in the
   764    763   usual fashion.</p><p>If a callback script returns a "break" error code then all
   765    764   further processing of every handler script out of this Tcl handler set is
   766    765   suppressed for the further parsing. This does not influence any other handler
   767    766   set.</p><p>If a callback script returns a "continue" error code then
   768    767   processing of the current element, and its children, ceases for every handler
   769    768   script out of this Tcl handler set and processing continues with the next
   770    769   (sibling) element. This does not influence any other handler set.</p>
   771    770   
   772         -    <h2><a name="SECTid80af950">SEE ALSO</a></h2><p class="seealso">
          771  +    <h2><a name="SECTid0xc18290">SEE ALSO</a></h2><p class="seealso">
   773    772   <a href="expatapi.html">expatapi</a>, <a href="tdomcmd.html">tdom</a>
   774    773   </p>
   775    774   
   776         -    <h2><a name="SECTid80af9c8">KEYWORDS</a></h2><p class="keywords"><a class="keyword" href="keyword-index.html#KW-SAX">SAX</a></p>
          775  +    <h2><a name="SECTid0xc18650">KEYWORDS</a></h2><p class="keywords"><a class="keyword" href="keyword-index.html#KW-SAX">SAX</a></p>
   777    776     </div><hr class="navsep"><div class="navbar" align="center">
   778    777   <a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   779    778   </div>
   780    779   </body>
   781    780   </html>

Changes to doc/expat.n.

   710    710   \&\fR
   711    711   .RS
   712    712   .PP
   713    713   Sets configuration options for the parser. Every command
   714    714   option, except \fI-namespace\fR can be set or modified with this method.
   715    715   .RE
   716    716   .TP
   717         -\&\fB\fBparser\fP \fBcget \fI?-handlerset name? option\fB\fP
          717  +\&\fB\fBparser\fP \fBcget\fP \fI?-handlerset name? option\fB
   718    718   \&\fR
   719    719   .RS
   720    720   .PP
   721    721   Return the current configuration value option for the
   722    722   parser.
   723    723   .PP
   724    724   If the -handlerset option is used, the configuration for the

Changes to doc/expatapi.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expatapi</title><meta name="xsl-processor" content="Jochen Loewer et. al. (loewerj@hotmail.com)"><meta name="generator" content="$RCSfile$ $Revision$">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: expatapi</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTnode8831">NAME</a> · <a href="#SECTnode8840">SYNOPSIS</a> · <a href="#SECTnode8918">ARGUMENTS</a> · <a href="#SECTnode8999">DESCRIPTION</a> · <a href="#SECTnode9184">SEE ALSO</a> · <a href="#SECTnode9190">KEYWORDS</a>
            7  +<a href="#SECTid0xc45810">NAME</a> · <a href="#SECTid0xb350c0">SYNOPSIS</a> · <a href="#SECTid0xbdd020">ARGUMENTS</a> · <a href="#SECTid0xc55490">DESCRIPTION</a> · <a href="#SECTid0xc5b130">SEE ALSO</a> · <a href="#SECTid0xc5b3d0">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -    <h2><a name="SECTnode8831">NAME</a></h2><p class="namesection">
           10  +    <h2><a name="SECTid0xc45810">NAME</a></h2><p class="namesection">
    11     11   <b class="names">CheckExpatParserObj, CHandlerSetInstall, CHandlerSetRemove,
    12     12            CHandlerSetCreate, CHandlerSetGetUserData, GetExpatInfo - </b><br>Functions to create, install and remove expat parser object
    13     13   extensions.</p>
    14         -  <h2><a name="SECTnode8840">SYNOPSIS</a></h2><pre class="syntax">#include &lt;tclexpat.h&gt;
           14  +  <h2><a name="SECTid0xb350c0">SYNOPSIS</a></h2><pre class="syntax">#include &lt;tclexpat.h&gt;
    15     15   
    16     16   int 
    17     17   <b class="fun">CheckExpatParserObj</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-nameObj"><i>nameObj</i></a>)  
    18     18   
    19     19   int
    20     20   <b class="fun">CHandlerSetInstall</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>, <a href="#ARG-handlerSet"><i>handlerSet</i></a>)
    21     21   
................................................................................
    31     31   void*
    32     32   <b class="fun">CHandlerSetGetUserData</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>, <a href="#ARG-handlerSetName"><i>handlerSetName</i></a>)
    33     33   
    34     34   TclGenExpatInfo*
    35     35   <b class="fun">GetExpatInfo</b> (<a href="#ARG-interp"><i>interp</i></a>, <a href="#ARG-expatObj"><i>expatObj</i></a>)
    36     36   </pre>
    37     37   
    38         -  <h2><a name="SECTnode8918">ARGUMENTS</a></h2><div class="arglist"><table width="100%" rules="none" cellpadding="5%">
           38  +  <h2><a name="SECTid0xbdd020">ARGUMENTS</a></h2><div class="arglist"><table width="100%" rules="none" cellpadding="5%">
    39     39   <thead><tr class="heading">
    40     40   <th width="20%">Type</th><th width="70%">Name</th><th width="10%">Mode</th>
    41     41   </tr></thead><tr class="syntax">
    42     42   <td class="type" width="20%" align="left">Tcl_Interp</td><td class="name" width="70%" align="left"><a name="ARG-interp">*interp</a></td><td class="mode" width="10%" align="center">in</td>
    43     43   </tr><tr class="desc">
    44     44   <td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">Interpreter with the expat parser object.</td>
    45     45   </tr><tr class="syntax">
................................................................................
    57     57   </tr><tr class="syntax">
    58     58   <td class="type" width="20%" align="left">Tcl_Obj</td><td class="name" width="70%" align="left"><a name="ARG-nameObj">*nameObj</a></td><td class="mode" width="10%" align="center"></td>
    59     59   </tr><tr class="desc">
    60     60   <td class="padding" width="20%"> </td><td class="argdesc" width="80%" align="left" colspan="2">A Tcl Object containing the name of a expat parser object</td>
    61     61   </tr>
    62     62   </table></div>
    63     63   
    64         -  <h2><a name="SECTnode8999">DESCRIPTION</a></h2><p>The functions described in this manual allows to add C level coded event
           64  +  <h2><a name="SECTid0xc55490">DESCRIPTION</a></h2><p>The functions described in this manual allows to add C level coded event
    65     65   handler to an tDOM Tcl expat parser objects. A tDOM Tcl expat parser object is
    66     66   able to have several Tcl scripts and C functions associated with an specific
    67     67   event. If the event occurs, first the Tcl scripts then the C functions
    68     68   associated with the event are called in turn.</p><p>A tDOM Tcl expat parser extension is an ordinary Tcl extension and loaded
    69     69   like every other Tcl extension. It must install at least one new Tcl Level
    70     70   command, that manipulates a tDOM Tcl expat parser object.</p><p>A C level handler set is a data structure like this:</p><pre class="example">
    71     71   typedef struct CHandlerSet {
................................................................................
   100    100       XML_NotationDeclHandler          notationcommand;
   101    101       /* C func for external entity */
   102    102       XML_ExternalEntityRefHandler     externalentitycommand;
   103    103       /* C func for unknown encoding */
   104    104       XML_UnknownEncodingHandler       unknownencodingcommand;
   105    105       /* C func for comments */
   106    106       XML_CommentHandler               commentCommand;
   107         -    /* C func for &quot;not standalone&quot; docs */
          107  +    /* C func for "not standalone" docs */
   108    108       XML_NotStandaloneHandler         notStandaloneCommand;
   109    109       /* C func for CDATA section start */
   110    110       XML_StartCdataSectionHandler     startCdataSectionCommand;
   111    111       /* C func for CDATA section end */
   112    112       XML_EndCdataSectionHandler       endCdataSectionCommand;
   113    113       /* C func for !ELEMENT decl's */
   114    114       XML_ElementDeclHandler           elementDeclCommand;
................................................................................
   163    163       char          *method;
   164    164       CHandlerSet   *handlerSet;
   165    165       int            methodIndex, result;
   166    166       simpleCounter *counter;
   167    167       
   168    168   
   169    169       static char *exampleMethods[] = {
   170         -        &quot;enable&quot;, &quot;getresult&quot;, &quot;remove&quot;,
          170  +        "enable", "getresult", "remove",
   171    171           NULL
   172    172       };
   173    173       enum exampleMethod {
   174    174           m_enable, m_getresult, m_remove
   175    175       };
   176    176   
   177    177       if (objc != 3) {
   178    178           Tcl_WrongNumArgs (interp, 1, objv, example_usage);
   179    179           return TCL_ERROR;
   180    180       }
   181    181   
   182    182       if (!CheckExpatParserObj (interp, objv[1])) {
   183         -        Tcl_SetResult (interp, &quot;First argument has to be a expat parser object&quot;, NULL);
          183  +        Tcl_SetResult (interp, "First argument has to be a expat parser object", NULL);
   184    184           return TCL_ERROR;
   185    185       }
   186    186       /* ... */
   187    187   </pre><p> <i class="m">CHandlerSetGet</i> returns a pointer to the C handler Set referenced
   188    188   by the name <i class="m">handlerSetName</i> of the parser object
   189    189   <i class="m">expatObj</i>. <i class="m">expatObj</i> has to be an expat parser object in the
   190    190   interpreter <i class="m">interp</i>. Returns NULL in case of error.</p><p>
................................................................................
   195    195   TclGenExpatInfo structure of the tDOM Tcl expat parser object
   196    196   <i class="m">expatObj</i>. The <i class="m">expatObj</i> has to be a tDOM Tcl expat parser object
   197    197   in the interpreter <i class="m">interp</i>. This is most useful, to set the application
   198    198   status of the parser object.</p><p>See the simple but full functionally example in the extensions/example
   199    199   dir or the more complex example tnc in the extensions/tnc dir (a simple DTD
   200    200   validation extension).</p>
   201    201   
   202         -  <h2><a name="SECTnode9184">SEE ALSO</a></h2><p class="seealso"><a href="expat.html">expat</a></p>
          202  +  <h2><a name="SECTid0xc5b130">SEE ALSO</a></h2><p class="seealso">expat</p>
   203    203   
   204         -  <h2><a name="SECTnode9190">KEYWORDS</a></h2><p class="keywords"><a class="keyword" href="keyword-index.html#KW-Chandlerset">C handler set</a></p>
   205         -</div><div class="footer">
   206         -<hr class="navsep"><!-- footer.html: Standard navigational footer --><div class="navbar" align="center">
   207         -	<a class="navaid" href="index.html">Table of Contents</a>
   208         - ·	<a class="navaid" href="category-index.html">Index</a>
   209         - ·	<a class="navaid" href="keyword-index.html">Keywords</a>
   210         -</div>
          204  +  <h2><a name="SECTid0xc5b3d0">KEYWORDS</a></h2><p class="keywords"><a class="keyword" href="keyword-index.html#KW-Chandlerset">C handler set</a></p>
          205  +</div><hr class="navsep"><div class="navbar" align="center">
          206  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   211    207   </div>
   212    208   </body>
   213    209   </html>

Changes to doc/manpage.css.

     1      1   /*
     2         - * $Id$
            2  + * $Id: manpage.css,v 1.4 2002/06/20 00:44:17 jenglish Exp $
     3      3    * Author: 	Joe English, <jenglish@flightab.com>
     4      4    * Created: 	26 Jun 2000
     5      5    * Description:	CSS stylesheet for TCL man pages
     6      6    */
     7      7   
     8      8   HTML {
     9      9       background: 	#FFFFFF;

Changes to doc/tdomcmd.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tdom</title><meta name="xsl-processor" content="Jochen Loewer et. al. (loewerj@hotmail.com)"><meta name="generator" content="$RCSfile$ $Revision$">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tdom</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTnode13446">NAME</a> · <a href="#SECTnode13455">SYNOPSIS</a> · <a href="#SECTnode13461">DESCRIPTION</a> · <a href="#SECTnode13620">SEE ALSO</a> · <a href="#SECTnode13629">KEYWORDS</a>
            7  +<a href="#SECTid0xc4d2c0">NAME</a> · <a href="#SECTid0xc2c530">SYNOPSIS</a> · <a href="#SECTid0xab96a0">DESCRIPTION</a> · <a href="#SECTid0xc571c0">SEE ALSO</a> · <a href="#SECTid0xc57580">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -    <h2><a name="SECTnode13446">NAME</a></h2><p class="namesection">
           10  +    <h2><a name="SECTid0xc4d2c0">NAME</a></h2><p class="namesection">
    11     11   <b class="names">tdom - </b><br>tdom is an expat parser object extension to create an in-memory
    12     12   DOM tree from the input while parsing.</p>
    13     13   
    14     14   
    15         -  <h2><a name="SECTnode13455">SYNOPSIS</a></h2><pre class="syntax">package require tdom
           15  +  <h2><a name="SECTid0xc2c530">SYNOPSIS</a></h2><pre class="syntax">package require tdom
    16     16   
    17     17   set parser [expat]
    18     18   
    19     19   tdom $parser enable</pre>
    20     20   
    21         -  <h2><a name="SECTnode13461">DESCRIPTION</a></h2><p>
    22         -<i class="m">tdom</i> adds the C handler set &quot;tdom&quot; to an tcl expat
           21  +  <h2><a name="SECTid0xab96a0">DESCRIPTION</a></h2><p>
           22  +<i class="m">tdom</i> adds the C handler set "tdom" to an tcl expat
    23     23   parser obj. This handler set builds an in-memory DOM tree out of the input,
    24     24   parsed by the parser. A DOM tree created this way behave exactly like a DOM
    25         -tree created by the &quot;dom&quot; command (see there). In fact, tdom is only
           25  +tree created by the "dom" command (see there). In fact, tdom is only
    26     26   another interface to the same functionality; it uses the code behind the
    27     27   <tt class="samp">dom</tt> code for building the DOM tree.</p><dl class="commandlist">
    28     28         
    29     29           <dt>
    30     30   <b class="cmd">tdom</b> <i class="m">parserObj</i> <b class="method">enable</b>
    31     31   </dt>
    32     32   
................................................................................
    45     45   
    46     46         
    47     47           <dt>
    48     48   <b class="cmd">tdom</b> <i class="m">parserObj</i> <b class="method">setResultEncoding</b>
    49     49   </dt>
    50     50   
    51     51           <dd><p>See the method <tt class="samp">setResultEncoding</tt> of the
    52         -<b class="cmd"><a href="dom.html">dom</a></b> command.</p></dd>
           52  +<b class="cmd">dom</b> command.</p></dd>
    53     53         
    54     54   
    55     55         
    56     56           <dt>
    57     57   <b class="cmd">tdom</b> <i class="m">parserObj</i> <b class="method">setStoreLineColumn</b> ?<i class="m">boolean</i>?</dt>
    58     58   
    59     59           <dd><p>See the method <tt class="samp">setStoreLineColumn</tt> of the
    60         -<b class="cmd"><a href="dom.html">dom</a></b> command.</p></dd>
           60  +<b class="cmd">dom</b> command.</p></dd>
    61     61         
    62     62   
    63     63         
    64     64           <dt>
    65     65   <b class="cmd">tdom</b> <i class="m">parserObj</i> <b class="method">remove</b>
    66     66   </dt>
    67     67   
................................................................................
    70     70         
    71     71   
    72     72         
    73     73           <dt>
    74     74   <b class="cmd">tdom</b> <i class="m">parserObj</i> <b class="method">keepEmpties</b>
    75     75   </dt>
    76     76   
    77         -        <dd><p>See the option <tt class="samp">-keepEmpties</tt> of the <b class="cmd"><a href="dom.html">dom</a></b> command.</p></dd>
           77  +        <dd><p>See the option <tt class="samp">-keepEmpties</tt> of the <b class="cmd">dom</b> command.</p></dd>
    78     78         
    79     79   
    80     80         
    81     81           <dt>
    82     82   <b class="cmd">tdom</b> <i class="m">parserObj</i> <b class="method">setExternalEntityResolver</b> <i class="m">script</i>
    83     83   </dt>
    84     84           <dd></dd>
    85     85         
    86     86   
    87     87       </dl>
    88     88   
    89         -  <h2><a name="SECTnode13620">SEE ALSO</a></h2><p class="seealso">
    90         -<a href="dom.html">dom</a>, <a href="expat.html">expat</a>
    91         -</p>
           89  +  <h2><a name="SECTid0xc571c0">SEE ALSO</a></h2><p class="seealso">dom, expat</p>
    92     90   
    93         -  <h2><a name="SECTnode13629">KEYWORDS</a></h2><p class="keywords">
           91  +  <h2><a name="SECTid0xc57580">KEYWORDS</a></h2><p class="keywords">
    94     92   <a class="keyword" href="keyword-index.html#KW-DOM">DOM</a>, <a class="keyword" href="keyword-index.html#KW-SAX">SAX</a>, <a class="keyword" href="keyword-index.html#KW-Chandlerset">C handler set</a>
    95     93   </p>
    96     94   
    97         -</div><div class="footer">
    98         -<hr class="navsep"><!-- footer.html: Standard navigational footer --><div class="navbar" align="center">
    99         -	<a class="navaid" href="index.html">Table of Contents</a>
   100         - ·	<a class="navaid" href="category-index.html">Index</a>
   101         - ·	<a class="navaid" href="keyword-index.html">Keywords</a>
   102         -</div>
           95  +</div><hr class="navsep"><div class="navbar" align="center">
           96  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   103     97   </div>
   104     98   </body>
   105     99   </html>

Changes to doc/tnc.html.

     1      1   <html>
     2      2   <head>
     3         -<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tnc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile$ $Revision$">
            3  +<link rel="stylesheet" href="manpage.css"><title>tDOM manual: tnc</title><meta name="xsl-processor" content="Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."><meta name="generator" content="$RCSfile: tmml-html.xsl,v $ $Revision: 1.11 $">
     4      4   </head><body>
     5      5   <div class="header">
     6      6   <div class="navbar" align="center">
     7         -<a href="#SECTid883">NAME</a> · <a href="#SECTid892">SYNOPSIS</a> · <a href="#SECTid898">DESCRIPTION</a> · <a href="#SECTid1068">BUGS</a> · <a href="#SECTid1086">KEYWORDS</a>
            7  +<a href="#SECTid0xc5fad0">NAME</a> · <a href="#SECTid0xc2c040">SYNOPSIS</a> · <a href="#SECTid0xab97c0">DESCRIPTION</a> · <a href="#SECTid0xc57df0">BUGS</a> · <a href="#SECTid0xc58760">KEYWORDS</a>
     8      8   </div><hr class="navsep">
     9      9   </div><div class="body">
    10         -  <h2><a name="SECTid883">NAME</a></h2><p class="namesection">
           10  +  <h2><a name="SECTid0xc5fad0">NAME</a></h2><p class="namesection">
    11     11   <b class="names">tnc - </b><br>tnc is an expat parser object extension, that validates the XML
    12     12   stream against the document DTD while parsing.</p>
    13     13     
    14         -  <h2><a name="SECTid892">SYNOPSIS</a></h2><pre class="syntax">package require tdom
           14  +  <h2><a name="SECTid0xc2c040">SYNOPSIS</a></h2><pre class="syntax">package require tdom
    15     15   package require tnc
    16     16   
    17     17   set parser [expat]
    18     18   
    19     19   tnc $parser enable</pre>
    20     20   
    21         -  <h2><a name="SECTid898">DESCRIPTION</a></h2><p>
           21  +  <h2><a name="SECTid0xab97c0">DESCRIPTION</a></h2><p>
    22     22   <i class="m">tnc</i> adds the C handler set "tnc" to a tcl expat parser
    23     23   obj. This handler set is a simple DTD validator. If the validator detects a
    24     24   validation error, it sets the interp result, signals error and stops
    25     25   parsing. There isn't any validation error recovering. As a consequence, only
    26     26   valid documents are completely parsed.</p><p>This handler set has only three methods:</p><dl class="commandlist">
    27     27         
    28     28           <dt>
................................................................................
   116    116         
   117    117   
   118    118         </dl>
   119    119        </dd>
   120    120         
   121    121       </dl>
   122    122   
   123         -  <h2><a name="SECTid1068">BUGS</a></h2><p>The validation error reports could be much more informative and
          123  +  <h2><a name="SECTid0xc57df0">BUGS</a></h2><p>The validation error reports could be much more informative and
   124    124   user-friendly.</p><p>The validator doesn't detect ambiguous content models (see XML
   125    125   recomendation Section 3.2.1 and Appendix E). Most Java validators also doesn't,
   126    126   but handle such content models right anyhow. Tnc does not; if your DTD has
   127    127   such ambiguous content models, tnc can not used to validate documents against
   128    128   such (not completely XML spec compliant) DTDs.</p><p>It isn't possible to validate XML documents with standalone="yes" in the
   129    129   XML Declaration</p><p>Violations of the validity constraints Proper Group/PE Nesting and
   130    130   Proper Conditional Section/PE Nesting are not detected. They could only happen
   131    131   inside a invalid DTD, not in the content of a document.</p>
   132         -  <h2><a name="SECTid1086">KEYWORDS</a></h2><p class="keywords">
          132  +  <h2><a name="SECTid0xc58760">KEYWORDS</a></h2><p class="keywords">
   133    133   <a class="keyword" href="keyword-index.html#KW-Validation">Validation</a>, <a class="keyword" href="keyword-index.html#KW-DTD">DTD</a>
   134    134   </p>
   135    135     
   136    136   </div><hr class="navsep"><div class="navbar" align="center">
   137         -<a class="navaid" href="index.html">Table of Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
          137  +<a class="navaid" href="index.html">Contents</a> · <a class="navaid" href="category-index.html">Index</a> · <a class="navaid" href="keyword-index.html">Keywords</a>
   138    138   </div>
   139    139   </body>
   140    140   </html>

Changes to generic/tcldom.c.

   216    216       "    isComment string                                 \n"
   217    217       "    isCDATA string                                   \n"
   218    218       "    isPIValue string                                 \n"
   219    219       "    isName string                                    \n"
   220    220       "    isQName string                                   \n"
   221    221       "    isNCName string                                  \n"
   222    222       "    isPIName string                                  \n"
          223  +    "    featureinfo feature                              \n"
   223    224   ;
   224    225   
   225    226   static char doc_usage[] =
   226    227       "Usage domDoc <method> <args>, where method can be:\n"
   227    228       "    documentElement ?objVar?                \n"
   228    229       "    getElementsByTagName name               \n"
   229    230       "    getElementsByTagNameNS uri localname    \n"
................................................................................
  5660   5661   
  5661   5662       return tcldom_returnDocumentObj (interp, doc, setVariable, newObjName, 1,
  5662   5663                                        0);
  5663   5664   #endif
  5664   5665   
  5665   5666   }
  5666   5667   
         5668  +/*----------------------------------------------------------------------------
         5669  +|   tcldom_featureinfo
         5670  +|
         5671  +\---------------------------------------------------------------------------*/
         5672  +static
         5673  +int tcldom_featureinfo (
         5674  +    ClientData  clientData,
         5675  +    Tcl_Interp *interp,
         5676  +    int         objc,
         5677  +    Tcl_Obj    * const objv[]
         5678  +)
         5679  +{
         5680  +    int featureIndex, result;
         5681  +    
         5682  +    static CONST84 char *features[] = {
         5683  +        "expatversion",      "expatmajorversion",  "expatminorversion",
         5684  +        "expatmicroversion", "dtd",                "ns",
         5685  +        "unknown",           "tdomalloc",          "lessns",
         5686  +        NULL
         5687  +    };
         5688  +    enum feature {
         5689  +        o_expatversion,      o_expatmajorversion,  o_expatminorversion,
         5690  +        o_expatmicroversion, o_dtd,                o_ns,
         5691  +        o_unknown,           o_tdomalloc,          o_lessns   
         5692  +    };
         5693  +
         5694  +    if (Tcl_GetIndexFromObj(interp, objv[1], features, "feature", 0,
         5695  +                            &featureIndex) != TCL_OK) {
         5696  +        return TCL_ERROR;
         5697  +    }
         5698  +
         5699  +    switch ((enum feature) featureIndex) {
         5700  +    case o_expatversion:
         5701  +        SetResult(XML_ExpatVersion());
         5702  +        break;
         5703  +    case o_expatmajorversion:
         5704  +        SetIntResult(XML_MAJOR_VERSION);
         5705  +        break;
         5706  +    case o_expatminorversion:
         5707  +        SetIntResult(XML_MINOR_VERSION);
         5708  +        break;
         5709  +    case o_expatmicroversion:
         5710  +        SetIntResult(XML_MICRO_VERSION);
         5711  +        break;
         5712  +    case o_dtd:
         5713  +#ifdef XML_DTD
         5714  +        result = 1;
         5715  +#else
         5716  +        result = 0;
         5717  +#endif
         5718  +        SetBooleanResult(result);
         5719  +        break;
         5720  +    case o_ns:
         5721  +#ifdef XML_NS
         5722  +        result = 1;
         5723  +#else
         5724  +        result = 0;
         5725  +#endif
         5726  +        SetBooleanResult(result);
         5727  +        break;
         5728  +    case o_unknown:       
         5729  +#ifdef TDOM_NO_UNKNOWN_CMD
         5730  +        result = 0;
         5731  +#else
         5732  +        result = 1;
         5733  +#endif
         5734  +        SetBooleanResult(result);
         5735  +        break;
         5736  +    case o_tdomalloc:
         5737  +#ifdef USE_NORMAL_ALLOCATOR
         5738  +        result = 0;
         5739  +#else
         5740  +        result = 1;
         5741  +#endif
         5742  +        SetBooleanResult(result);
         5743  +        break;
         5744  +    case o_lessns:
         5745  +#ifdef TDOM_LESS_NS
         5746  +        result = 1;
         5747  +#else
         5748  +        result = 0;
         5749  +#endif
         5750  +        SetBooleanResult(result);
         5751  +        break;
         5752  +    }
         5753  +        return TCL_OK;
         5754  +        
         5755  +}
  5667   5756   
  5668   5757   /*----------------------------------------------------------------------------
  5669   5758   |   tcldom_DomObjCmd
  5670   5759   |
  5671   5760   \---------------------------------------------------------------------------*/
  5672   5761   int tcldom_DomObjCmd (
  5673   5762       ClientData   clientData,
................................................................................
  5686   5775       static CONST84 char *domMethods[] = {
  5687   5776           "createDocument",  "createDocumentNS",   "createNodeCmd",
  5688   5777           "parse",           "setResultEncoding",  "setStoreLineColumn",
  5689   5778           "isCharData",      "isName",             "isPIName",
  5690   5779           "isQName",         "isComment",          "isCDATA",
  5691   5780           "isPIValue",       "isNCName",           "createDocumentNode",
  5692   5781           "setNameCheck",    "setTextCheck",       "setObjectCommands",
         5782  +        "featureinfo",
  5693   5783   #ifdef TCL_THREADS
  5694   5784           "attachDocument",  "detachDocument",
  5695   5785   #endif
  5696   5786           NULL
  5697   5787       };
  5698   5788       enum domMethod {
  5699   5789           m_createDocument,    m_createDocumentNS,   m_createNodeCmd,
  5700   5790           m_parse,             m_setResultEncoding,  m_setStoreLineColumn,
  5701   5791           m_isCharData,        m_isName,             m_isPIName,
  5702   5792           m_isQName,           m_isComment,          m_isCDATA,
  5703   5793           m_isPIValue,         m_isNCName,           m_createDocumentNode,
  5704         -        m_setNameCheck,      m_setTextCheck,       m_setObjectCommands
         5794  +        m_setNameCheck,      m_setTextCheck,       m_setObjectCommands,
         5795  +        m_featureinfo
  5705   5796   #ifdef TCL_THREADS
  5706   5797           ,m_attachDocument,   m_detachDocument
  5707   5798   #endif
  5708   5799       };
  5709   5800   
  5710   5801       static CONST84 char *nodeModeValues[] = {
  5711   5802           "automatic", "command", "token", NULL
................................................................................
  5922   6013               return TCL_OK;
  5923   6014               
  5924   6015           case m_isNCName:
  5925   6016               CheckArgs(3,3,2,"string");
  5926   6017               SetBooleanResult(domIsNCNAME(Tcl_GetString(objv[2])));
  5927   6018               return TCL_OK;
  5928   6019   
         6020  +        case m_featureinfo:
         6021  +            CheckArgs(3,3,2,"feature")
         6022  +            return tcldom_featureinfo(clientData, interp, --objc, objv+1);
  5929   6023       }
  5930   6024       SetResult( dom_usage);
  5931   6025       return TCL_ERROR;
  5932   6026   }
  5933   6027   
  5934   6028   #ifdef TCL_THREADS
  5935   6029   

Changes to tests/dom.test.

     9      9   #    dom-4.*:  parse -useForeignDTD
    10     10   #    dom-5.*:  external entities
    11     11   #    dom-6.*:  use in slave interpreter
    12     12   #    dom-7.*:  setNameCheck, setTextCheck
    13     13   #    dom-8.*:  createDocumentNode, documentNodes
    14     14   #    dom-9.*:  setObjectCommands
    15     15   #    dom-10.*: createNodeCmd
           16  +#    dom-11.*: featureinfo
    16     17   #
    17     18   # Copyright (c) 2002, 2003, 2004 Rolf Ade.
    18     19   
    19     20   source [file join [file dir [info script]] loadtdom.tcl]
    20     21   
    21     22   test dom-1.1 {createDocument with root node name not a XML Name} {
    22     23       list [catch {dom createDocument "root node"} msg] $msg
................................................................................
  1293   1294           nodeCmds::e1 {
  1294   1295               nodeCmds::t "Some text"
  1295   1296           }} errMsg]
  1296   1297       lappend result $errMsg
  1297   1298   } {{<docRoot><e1>Some text</e1></docRoot>} 1 {called outside domNode context}}
  1298   1299   
  1299   1300   namespace delete nodeCmds
         1301  +
         1302  +test dom-11.1 {featureinfo - expatversion} -body {
         1303  +    dom featureinfo expatversion
         1304  +} -match regexp -result {expat_.*}
         1305  +
         1306  +test dom-11.2 {featureinfo - invalid arg} -body {
         1307  +    catch {dom featureinfo foo} errMsg
         1308  +} -result 1
         1309  +
         1310  +test dom-11.3 {featureinfo - expatmajorversion} -body {
         1311  +    dom featureinfo expatmajorversion
         1312  +} -match regexp -result {(1|2)}
         1313  +
         1314  +test dom-11.4 {featureinfo - dtd} -body {
         1315  +    dom featureinfo dtd
         1316  +} -match regexp -result {(0|1)}
  1300   1317   
  1301   1318   # cleanup
  1302   1319   ::tcltest::cleanupTests
  1303   1320   return