Index: doc/dom.html ================================================================== --- doc/dom.html +++ doc/dom.html @@ -1,22 +1,22 @@ -tDOM manual: dom +tDOM manual: dom
-

NAME

+

NAME

dom -
Create an in-memory DOM tree from XML

-

SYNOPSIS

package require tdom
+  

SYNOPSIS

package require tdom
 
 dom method ?arg arg ...?
-

DESCRIPTION

This command provides the creation of complete DOM trees in memory. In +

DESCRIPTION

This command provides the creation of complete DOM trees in memory. In the usual case a string containing a XML information is parsed and converted into a DOM tree. method indicates a specific subcommand.

The valid methods are:

dom parse ?options? ?data?
@@ -416,20 +416,74 @@
Returns 1, if string is valid according to production 16 of the XML 1.0 recommendation. Otherwise it returns 0.
-
+ +
+dom featureinfo + feature +
+
This method provides information about the used + build options and the expat version. The valid values for + the feature argument are: +
+ +
expatversion
+
Returns the version of the underlyling expat + version as string, something like + "exapt_2.1.0". This is. what the expat API + function XML_ExpatVersion() returns.
+ + +
expatmajorversion
+
Returns the major version of the underlyling + expat version as integer.
+ + +
expatminorversion
+
Returns the minor version of the underlyling + expat version as integer.
+ + +
expatmicroversion
+
Returns the micro version of the underlyling + expat version as integer.
+ + +
dtd
+
Returns as boolean, if build with + --enable-dtd.
+ + +
ns
+
Returns as boolean, if build with + --enable-ns.
+ + +
unknown
+
Returns as boolean, if build with + --enable-unknown.
+ + +
tdomalloc
+
Returns as boolean, if build with + --enable-tdomalloc.
+ + +
lessns
+
Returns as boolean, if build with + --enable-lessns.
+ +
+
+ + -

KEYWORDS

+

KEYWORDS

XML, DOM, document, node, parsing

-
Index: doc/dom.n ================================================================== --- doc/dom.n +++ doc/dom.n @@ -488,7 +488,43 @@ .TP \&\fB\fBdom\fP \fBisPIValue\fP \fIstring\fB \&\fRReturns 1, if \fIstring\fR is valid according to production 16 of the XML 1.0 recommendation. Otherwise it returns 0. +.TP +\&\fB\fBdom\fP \fBfeatureinfo\fP \fIfeature\fB +\&\fRThis method provides information about the used +build options and the expat version. The valid values for +the \fIfeature\fR argument are: +.RS +.IP "\fBexpatversion\fR" +Returns the version of the underlyling expat +version as string, something like +"exapt_2.1.0". This is. what the expat API +function XML_ExpatVersion() returns. +.IP "\fBexpatmajorversion\fR" +Returns the major version of the underlyling +expat version as integer. +.IP "\fBexpatminorversion\fR" +Returns the minor version of the underlyling +expat version as integer. +.IP "\fBexpatmicroversion\fR" +Returns the micro version of the underlyling +expat version as integer. +.IP "\fBdtd\fR" +Returns as boolean, if build with +\&\fI--enable-dtd\fR. +.IP "\fBns\fR" +Returns as boolean, if build with +\&\fI--enable-ns\fR. +.IP "\fBunknown\fR" +Returns as boolean, if build with +\&\fI--enable-unknown\fR. +.IP "\fBtdomalloc\fR" +Returns as boolean, if build with +\&\fI--enable-tdomalloc\fR. +.IP "\fBlessns\fR" +Returns as boolean, if build with +\&\fI--enable-lessns\fR. +.RE .SH KEYWORDS XML, DOM, document, node, parsing Index: doc/dom.xml ================================================================== --- doc/dom.xml +++ doc/dom.xml @@ -388,16 +388,72 @@ Returns 1, if string is valid according to production 16 of the XML 1.0 recommendation. Otherwise it returns 0. - - + + dom featureinfo feature + This method provides information about the used + build options and the expat version. The valid values for + the feature argument are: + + + expatversion + Returns the version of the underlyling expat + version as string, something like + "exapt_2.1.0". This is. what the expat API + function XML_ExpatVersion() returns. + + + expatmajorversion + Returns the major version of the underlyling + expat version as integer. + + + expatminorversion + Returns the minor version of the underlyling + expat version as integer. + + + expatmicroversion + Returns the micro version of the underlyling + expat version as integer. + + + dtd + Returns as boolean, if build with + --enable-dtd. + + + ns + Returns as boolean, if build with + --enable-ns. + + + unknown + Returns as boolean, if build with + --enable-unknown. + + + tdomalloc + Returns as boolean, if build with + --enable-tdomalloc. + + + lessns + Returns as boolean, if build with + --enable-lessns. + + + + + + - + XML DOM document node parsing - + Index: doc/domDoc.html ================================================================== --- doc/domDoc.html +++ doc/domDoc.html @@ -1,21 +1,21 @@ -tDOM manual: domDoc +tDOM manual: domDoc
-

NAME

+

NAME

domDoc -
Manipulates an instance of a DOM document object

-

SYNOPSIS

+  

SYNOPSIS

 domDocObjCmd method ?arg arg ...?
-

DESCRIPTION

This command manipulates one particular instance of a document +

DESCRIPTION

This command manipulates one particular instance of a document object. method indicates a specific method of the document class. These methods should closely conform to the W3C recommendation "Document Object Model (Core) Level 1" (http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html). Look at these documents for a deeper understanding of the functionality.

The valid methods are:

@@ -178,12 +178,13 @@ given to the method, the system identifier of the document is set to this value. -
internalSubset ?internalSubset? -
+
+internalSubset ?internalSubset? +
Returns the internal subset of the doctype declaration of the document, if there is one, otherwise the empty string. If there is a value given to the method, the internal subset of the document is set to this value. Note, that none of the parsing methods preserve the internal subset of a document; a freshly parsed document will always have an empty internal @@ -504,12 +505,13 @@
-
baseURI ?URI? -
+
+baseURI ?URI? +
Returns the present baseURI of the document. If the optional argument URI is given, sets the base URI of the document to the given URI.
@@ -547,16 +549,16 @@ same name as the given metho within the namespace ::dom::domDoc is tried to be executed. This allows quick method additions on Tcl level.

Newly created nodes are appended to a hidden fragment list. If they are not moved into the tree they are automaticaly deleted, when the whole document gets deleted.

-

SEE ALSO

dom, domNode

+

SEE ALSO

dom, domNode

-

KEYWORDS

+

KEYWORDS

DOM node creation, document element

Index: doc/domDoc.n ================================================================== --- doc/domDoc.n +++ doc/domDoc.n @@ -282,11 +282,11 @@ \&\fRReturns the system identifier of the doctype declaration of the document, if there is one, otherwise the empty string. If there is a value given to the method, the system identifier of the document is set to this value. .TP -\&\fB\fBinternalSubset \fI?internalSubset?\fB\fP +\&\fB\fBinternalSubset\fP \fI?internalSubset?\fB \&\fRReturns the internal subset of the doctype declaration of the document, if there is one, otherwise the empty string. If there is a value given to the method, the internal subset of the document is set to this value. Note, that none of the parsing methods preserve the internal subset of a document; a freshly parsed document will always have an empty internal @@ -534,11 +534,11 @@ set root [$doc documentElement] set childNodes [$root selectNodes -namespaces {default http://www.defaultnamespace.org} default:child] .CE .RE .TP -\&\fB\fBbaseURI \fI?URI?\fB\fP +\&\fB\fBbaseURI\fP \fI?URI?\fB \&\fRReturns the present baseURI of the document. If the optional argument URI is given, sets the base URI of the document to the given URI. .TP \&\fB\fBappendFromScript\fP \fItclScript\fB \&\fRAppends the nodes created by the \fItclScript\fR by Index: doc/domNode.html ================================================================== --- doc/domNode.html +++ doc/domNode.html @@ -2,21 +2,21 @@ tDOM manual: domNode
-

NAME

+

NAME

domNode -
Manipulates an instance of a DOM node object

-

SYNOPSIS

 $nodeObject method  arg arg ...
+  

SYNOPSIS

 $nodeObject method  arg arg ...
 
-

DESCRIPTION

This command manipulates one particular instance of a DOM node object. +

DESCRIPTION

This command manipulates one particular instance of a DOM node object. method indicates a specific method of the node class. These methods should closely conform to the W3C recommendation "Document Object Model (Core) Level 1" (http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html) as well to parts of the W3C draft "XML Pointer Language (XPointer)" (http://www.w3.org/TR/1998/WD-xptr-19980303). @@ -560,12 +560,13 @@ variable outputVar . The translation is very similar to Cost Simple mode. -

toXPath ?-legacy? -
+
+toXPath ?-legacy? +
Returns an XPath, which exactly addresses the given node in its document. This XPath is only valid as there are no changes to DOM tree made later one. With the -legacy option, other XPath expressions are returnd, which doesn't work in all cases.
@@ -575,12 +576,13 @@
Returns the baseURI of the node. This method is deprecated in favor of the baseURI method.
-
baseURI ?URI? -
+
+baseURI ?URI? +
Returns the present baseURI of the node. If the optional argument URI is given, sets the base URI of the node and of all of its child nodes out of the same enitity as node to the given URI.
@@ -665,16 +667,16 @@

Otherwise, if an unknown method name is given, the command with the same name as the given method within the namespace ::dom::domNode is tried to be executed. This allows quick method additions on Tcl level.

-

SEE ALSO

dom, domDoc

+

SEE ALSO

dom, domDoc

-

KEYWORDS

+

KEYWORDS

XML, DOM, document, node, parsing

Index: doc/domNode.n ================================================================== --- doc/domNode.n +++ doc/domNode.n @@ -535,21 +535,21 @@ \&\fRTranslate the subtree starting at the object node according to the specifications in \fIspecifications\fR and outputs the result in the variable \fIoutputVar\fR . The translation is very similar to Cost Simple mode. .TP -\&\fB\fBtoXPath \fI?-legacy?\fB\fP +\&\fB\fBtoXPath\fP \fI?-legacy?\fB \&\fRReturns an XPath, which exactly addresses the given node in its document. This XPath is only valid as there are no changes to DOM tree made later one. With the -legacy option, other XPath expressions are returnd, which doesn't work in all cases. .TP \&\fB\fBgetBaseURI\fP \&\fRReturns the baseURI of the node. This method is deprecated in favor of the \fIbaseURI\fR method. .TP -\&\fB\fBbaseURI \fI?URI?\fB\fP +\&\fB\fBbaseURI\fP \fI?URI?\fB \&\fRReturns the present baseURI of the node. If the optional argument URI is given, sets the base URI of the node and of all of its child nodes out of the same enitity as node to the given URI. .TP \&\fB\fBdisableOutputEscaping\fP \fI?boolean?\fB Index: doc/expat.html ================================================================== --- doc/expat.html +++ doc/expat.html @@ -1,27 +1,27 @@ -tDOM manual: expat +tDOM manual: expat
-

NAME

+

NAME

expat -
Creates an instance of an expat parser object

-

SYNOPSIS

+    

SYNOPSIS

 package require tdom
 
 expat ?parsername? ?-namespace? ?arg arg ..
 
 xml::parser ?parsername? ?-namespace? ?arg arg ..
 
-

DESCRIPTION

The parser created with expat or xml::parser +

DESCRIPTION

The parser created with expat or xml::parser (which is just another name for the same command in an own namespace) are able to parse any kind of well-formed XML. The parsers are stream oriented XML parser. This means that you register handler scripts with the parser prior to starting the parse. These handler scripts are called when the parser discovers the associated structures in the document being parsed. A start tag is an @@ -34,11 +34,11 @@ extension command "tdom". The handler set installed by this extension build an in memory "tDOM" DOM tree, while the parser is parsing the input.

It is possible to register an arbitrary amount of different handler scripts and C level handlers for most of the events. If the event occurs, they are called in turn.

-

COMMAND OPTIONS

+

COMMAND OPTIONS

-namespace

Enables namespace parsing. You must use this option while @@ -614,11 +614,11 @@ doesn't have an internal subset, the -startdoctypedeclcommand and enddoctypedeclcommand scripts, if set, are not called.

-

COMMAND METHODS

+

COMMAND METHODS

parser configure option value ?option value?
@@ -626,12 +626,11 @@ option, except -namespace can be set or modified with this method.

-parser cget ?-handlerset name? option - +parser cget ?-handlerset name? option

Return the current configuration value option for the parser.

@@ -754,11 +753,11 @@ (neither directly nor indirectly) and will raise a tcl error in this cases.

-

Callback Command Return Codes

A script invoked for any of the parser callback commands, such as +

Callback Command Return Codes

A script invoked for any of the parser callback commands, such as -elementstartcommand, -elementendcommand, etc, may return an error code other than "ok" or "error". All callbacks may in addition return "break" or "continue".

If a callback script returns an "error" error code then processing of the document is terminated and the error is propagated in the usual fashion.

If a callback script returns a "break" error code then all @@ -767,15 +766,15 @@ set.

If a callback script returns a "continue" error code then processing of the current element, and its children, ceases for every handler script out of this Tcl handler set and processing continues with the next (sibling) element. This does not influence any other handler set.

-

SEE ALSO

+

SEE ALSO

expatapi, tdom

-

KEYWORDS

SAX

+

KEYWORDS

SAX

Index: doc/expat.n ================================================================== --- doc/expat.n +++ doc/expat.n @@ -712,11 +712,11 @@ .PP Sets configuration options for the parser. Every command option, except \fI-namespace\fR can be set or modified with this method. .RE .TP -\&\fB\fBparser\fP \fBcget \fI?-handlerset name? option\fB\fP +\&\fB\fBparser\fP \fBcget\fP \fI?-handlerset name? option\fB \&\fR .RS .PP Return the current configuration value option for the parser. Index: doc/expatapi.html ================================================================== --- doc/expatapi.html +++ doc/expatapi.html @@ -1,19 +1,19 @@ -tDOM manual: expatapi +tDOM manual: expatapi
-

NAME

+

NAME

CheckExpatParserObj, CHandlerSetInstall, CHandlerSetRemove, CHandlerSetCreate, CHandlerSetGetUserData, GetExpatInfo -
Functions to create, install and remove expat parser object extensions.

-

SYNOPSIS

#include <tclexpat.h>
+  

SYNOPSIS

#include <tclexpat.h>
 
 int 
 CheckExpatParserObj (interp, nameObj)  
 
 int
@@ -33,11 +33,11 @@
 
 TclGenExpatInfo*
 GetExpatInfo (interp, expatObj)
 
-

ARGUMENTS

+

ARGUMENTS

@@ -59,11 +59,11 @@
TypeNameMode
Tcl_Interp*interpin
 A Tcl Object containing the name of a expat parser object
-

DESCRIPTION

The functions described in this manual allows to add C level coded event +

DESCRIPTION

The functions described in this manual allows to add C level coded event handler to an tDOM Tcl expat parser objects. A tDOM Tcl expat parser object is able to have several Tcl scripts and C functions associated with an specific event. If the event occurs, first the Tcl scripts then the C functions associated with the event are called in turn.

A tDOM Tcl expat parser extension is an ordinary Tcl extension and loaded like every other Tcl extension. It must install at least one new Tcl Level @@ -102,11 +102,11 @@ XML_ExternalEntityRefHandler externalentitycommand; /* C func for unknown encoding */ XML_UnknownEncodingHandler unknownencodingcommand; /* C func for comments */ XML_CommentHandler commentCommand; - /* C func for "not standalone" docs */ + /* C func for "not standalone" docs */ XML_NotStandaloneHandler notStandaloneCommand; /* C func for CDATA section start */ XML_StartCdataSectionHandler startCdataSectionCommand; /* C func for CDATA section end */ XML_EndCdataSectionHandler endCdataSectionCommand; @@ -165,11 +165,11 @@ int methodIndex, result; simpleCounter *counter; static char *exampleMethods[] = { - "enable", "getresult", "remove", + "enable", "getresult", "remove", NULL }; enum exampleMethod { m_enable, m_getresult, m_remove }; @@ -178,11 +178,11 @@ Tcl_WrongNumArgs (interp, 1, objv, example_usage); return TCL_ERROR; } if (!CheckExpatParserObj (interp, objv[1])) { - Tcl_SetResult (interp, "First argument has to be a expat parser object", NULL); + Tcl_SetResult (interp, "First argument has to be a expat parser object", NULL); return TCL_ERROR; } /* ... */

CHandlerSetGet returns a pointer to the C handler Set referenced by the name handlerSetName of the parser object @@ -197,17 +197,13 @@ in the interpreter interp. This is most useful, to set the application status of the parser object.

See the simple but full functionally example in the extensions/example dir or the more complex example tnc in the extensions/tnc dir (a simple DTD validation extension).

-

SEE ALSO

expat

- -

KEYWORDS

C handler set

-
Index: doc/manpage.css ================================================================== --- doc/manpage.css +++ doc/manpage.css @@ -1,7 +1,7 @@ /* - * $Id$ + * $Id: manpage.css,v 1.4 2002/06/20 00:44:17 jenglish Exp $ * Author: Joe English, * Created: 26 Jun 2000 * Description: CSS stylesheet for TCL man pages */ Index: doc/tdomcmd.html ================================================================== --- doc/tdomcmd.html +++ doc/tdomcmd.html @@ -1,30 +1,30 @@ -tDOM manual: tdom +tDOM manual: tdom
-

NAME

+

NAME

tdom -
tdom is an expat parser object extension to create an in-memory DOM tree from the input while parsing.

-

SYNOPSIS

package require tdom
+  

SYNOPSIS

package require tdom
 
 set parser [expat]
 
 tdom $parser enable
-

DESCRIPTION

-tdom adds the C handler set "tdom" to an tcl expat +

DESCRIPTION

+tdom adds the C handler set "tdom" to an tcl expat parser obj. This handler set builds an in-memory DOM tree out of the input, parsed by the parser. A DOM tree created this way behave exactly like a DOM -tree created by the "dom" command (see there). In fact, tdom is only +tree created by the "dom" command (see there). In fact, tdom is only another interface to the same functionality; it uses the code behind the dom code for building the DOM tree.

tdom parserObj enable @@ -47,19 +47,19 @@
tdom parserObj setResultEncoding

See the method setResultEncoding of the -dom command.

+dom command.

tdom parserObj setStoreLineColumn ?boolean?

See the method setStoreLineColumn of the -dom command.

+dom command.

tdom parserObj remove @@ -72,11 +72,11 @@
tdom parserObj keepEmpties
-

See the option -keepEmpties of the dom command.

+

See the option -keepEmpties of the dom command.

tdom parserObj setExternalEntityResolver script @@ -84,22 +84,16 @@
-

SEE ALSO

-dom, expat -

+

SEE ALSO

dom, expat

-

KEYWORDS

+

KEYWORDS

DOM, SAX, C handler set

-
Index: doc/tnc.html ================================================================== --- doc/tnc.html +++ doc/tnc.html @@ -1,26 +1,26 @@ -tDOM manual: tnc +tDOM manual: tnc
-

NAME

+

NAME

tnc -
tnc is an expat parser object extension, that validates the XML stream against the document DTD while parsing.

-

SYNOPSIS

package require tdom
+  

SYNOPSIS

package require tdom
 package require tnc
 
 set parser [expat]
 
 tnc $parser enable
-

DESCRIPTION

+

DESCRIPTION

tnc adds the C handler set "tnc" to a tcl expat parser obj. This handler set is a simple DTD validator. If the validator detects a validation error, it sets the interp result, signals error and stops parsing. There isn't any validation error recovering. As a consequence, only valid documents are completely parsed.

This handler set has only three methods:

@@ -118,23 +118,23 @@
-

BUGS

The validation error reports could be much more informative and +

BUGS

The validation error reports could be much more informative and user-friendly.

The validator doesn't detect ambiguous content models (see XML recomendation Section 3.2.1 and Appendix E). Most Java validators also doesn't, but handle such content models right anyhow. Tnc does not; if your DTD has such ambiguous content models, tnc can not used to validate documents against such (not completely XML spec compliant) DTDs.

It isn't possible to validate XML documents with standalone="yes" in the XML Declaration

Violations of the validity constraints Proper Group/PE Nesting and Proper Conditional Section/PE Nesting are not detected. They could only happen inside a invalid DTD, not in the content of a document.

-

KEYWORDS

+

KEYWORDS

Validation, DTD

Index: generic/tcldom.c ================================================================== --- generic/tcldom.c +++ generic/tcldom.c @@ -218,10 +218,11 @@ " isPIValue string \n" " isName string \n" " isQName string \n" " isNCName string \n" " isPIName string \n" + " featureinfo feature \n" ; static char doc_usage[] = "Usage domDoc , where method can be:\n" " documentElement ?objVar? \n" @@ -5662,10 +5663,98 @@ 0); #endif } +/*---------------------------------------------------------------------------- +| tcldom_featureinfo +| +\---------------------------------------------------------------------------*/ +static +int tcldom_featureinfo ( + ClientData clientData, + Tcl_Interp *interp, + int objc, + Tcl_Obj * const objv[] +) +{ + int featureIndex, result; + + static CONST84 char *features[] = { + "expatversion", "expatmajorversion", "expatminorversion", + "expatmicroversion", "dtd", "ns", + "unknown", "tdomalloc", "lessns", + NULL + }; + enum feature { + o_expatversion, o_expatmajorversion, o_expatminorversion, + o_expatmicroversion, o_dtd, o_ns, + o_unknown, o_tdomalloc, o_lessns + }; + + if (Tcl_GetIndexFromObj(interp, objv[1], features, "feature", 0, + &featureIndex) != TCL_OK) { + return TCL_ERROR; + } + + switch ((enum feature) featureIndex) { + case o_expatversion: + SetResult(XML_ExpatVersion()); + break; + case o_expatmajorversion: + SetIntResult(XML_MAJOR_VERSION); + break; + case o_expatminorversion: + SetIntResult(XML_MINOR_VERSION); + break; + case o_expatmicroversion: + SetIntResult(XML_MICRO_VERSION); + break; + case o_dtd: +#ifdef XML_DTD + result = 1; +#else + result = 0; +#endif + SetBooleanResult(result); + break; + case o_ns: +#ifdef XML_NS + result = 1; +#else + result = 0; +#endif + SetBooleanResult(result); + break; + case o_unknown: +#ifdef TDOM_NO_UNKNOWN_CMD + result = 0; +#else + result = 1; +#endif + SetBooleanResult(result); + break; + case o_tdomalloc: +#ifdef USE_NORMAL_ALLOCATOR + result = 0; +#else + result = 1; +#endif + SetBooleanResult(result); + break; + case o_lessns: +#ifdef TDOM_LESS_NS + result = 1; +#else + result = 0; +#endif + SetBooleanResult(result); + break; + } + return TCL_OK; + +} /*---------------------------------------------------------------------------- | tcldom_DomObjCmd | \---------------------------------------------------------------------------*/ @@ -5688,10 +5777,11 @@ "parse", "setResultEncoding", "setStoreLineColumn", "isCharData", "isName", "isPIName", "isQName", "isComment", "isCDATA", "isPIValue", "isNCName", "createDocumentNode", "setNameCheck", "setTextCheck", "setObjectCommands", + "featureinfo", #ifdef TCL_THREADS "attachDocument", "detachDocument", #endif NULL }; @@ -5699,11 +5789,12 @@ m_createDocument, m_createDocumentNS, m_createNodeCmd, m_parse, m_setResultEncoding, m_setStoreLineColumn, m_isCharData, m_isName, m_isPIName, m_isQName, m_isComment, m_isCDATA, m_isPIValue, m_isNCName, m_createDocumentNode, - m_setNameCheck, m_setTextCheck, m_setObjectCommands + m_setNameCheck, m_setTextCheck, m_setObjectCommands, + m_featureinfo #ifdef TCL_THREADS ,m_attachDocument, m_detachDocument #endif }; @@ -5924,10 +6015,13 @@ case m_isNCName: CheckArgs(3,3,2,"string"); SetBooleanResult(domIsNCNAME(Tcl_GetString(objv[2]))); return TCL_OK; + case m_featureinfo: + CheckArgs(3,3,2,"feature") + return tcldom_featureinfo(clientData, interp, --objc, objv+1); } SetResult( dom_usage); return TCL_ERROR; } Index: tests/dom.test ================================================================== --- tests/dom.test +++ tests/dom.test @@ -11,10 +11,11 @@ # dom-6.*: use in slave interpreter # dom-7.*: setNameCheck, setTextCheck # dom-8.*: createDocumentNode, documentNodes # dom-9.*: setObjectCommands # dom-10.*: createNodeCmd +# dom-11.*: featureinfo # # Copyright (c) 2002, 2003, 2004 Rolf Ade. source [file join [file dir [info script]] loadtdom.tcl] @@ -1295,9 +1296,25 @@ }} errMsg] lappend result $errMsg } {{Some text} 1 {called outside domNode context}} namespace delete nodeCmds + +test dom-11.1 {featureinfo - expatversion} -body { + dom featureinfo expatversion +} -match regexp -result {expat_.*} + +test dom-11.2 {featureinfo - invalid arg} -body { + catch {dom featureinfo foo} errMsg +} -result 1 + +test dom-11.3 {featureinfo - expatmajorversion} -body { + dom featureinfo expatmajorversion +} -match regexp -result {(1|2)} + +test dom-11.4 {featureinfo - dtd} -body { + dom featureinfo dtd +} -match regexp -result {(0|1)} # cleanup ::tcltest::cleanupTests return