diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/transform/test-to-c.xsl | 976 | ||||
-rw-r--r-- | test/xml/tests/attrcreatedocumentfragment.xml | 51 | ||||
-rw-r--r-- | test/xml/tests/attreffectivevalue.xml | 44 | ||||
-rw-r--r-- | test/xml/tests/attrentityreplacement.xml | 48 | ||||
-rw-r--r-- | test/xml/tests/attrname.xml | 47 | ||||
-rw-r--r-- | test/xml/tests/attrnextsiblingnull.xml | 44 | ||||
-rw-r--r-- | test/xml/tests/documentcreateattribute.xml | 45 | ||||
-rw-r--r-- | test/xml/tests/documentcreateelement.xml | 44 | ||||
-rw-r--r-- | test/xml/tests/documentcreatetextnode.xml | 43 | ||||
-rw-r--r-- | test/xml/tests/documentgetdoctype.xml | 49 | ||||
-rw-r--r-- | test/xml/tests/nodegetfirstchildnull.xml | 52 | ||||
-rw-r--r-- | test/xml/tests/nodegetlastchildnull.xml | 52 | ||||
-rw-r--r-- | test/xml/tests/nodegetnextsiblingnull.xml | 48 | ||||
-rw-r--r-- | test/xml/tests/nodegetownerdocument.xml | 50 | ||||
-rw-r--r-- | test/xml/tests/nodegetownerdocumentnull.xml | 31 | ||||
-rw-r--r-- | test/xml/tests/nodeinsertbeforerefchildnull.xml | 52 | ||||
-rw-r--r-- | test/xml/tests/nodelistindexgetlengthofemptylist.xml | 47 | ||||
-rw-r--r-- | test/xml/tests/nodeparentnode.xml | 47 |
18 files changed, 243 insertions, 1527 deletions
diff --git a/test/transform/test-to-c.xsl b/test/transform/test-to-c.xsl index 211f006..5b4943a 100644 --- a/test/transform/test-to-c.xsl +++ b/test/transform/test-to-c.xsl @@ -27,814 +27,324 @@ test representation. --> <xsl:param name="interfaces-docname">dom1-interfaces.xml</xsl:param> - <!-- - The ctypes document maps interfaces, methods and attributes in the - interfaces document to their C counterparts, proving the ability to - override names and types. - --> - <xsl:param name="ctypes-docname">ctypes.xml</xsl:param> <xsl:param name="target-uri-base">http://www.w3.org/2001/DOM-Test-Suite/tests/Level-1/</xsl:param> <xsl:output method="text" encoding="UTF-8"/> <xsl:variable name="domspec" select="document($interfaces-docname)"/> - <xsl:variable name="ctypes" select="document($ctypes-docname)"/> -<!-- swallow any text which we don't understand --> -<xsl:template match="text()" mode="body"/> +<xsl:template match="/"> + <xsl:apply-templates/> +</xsl:template> -<!-- -for anything that doesn't match another template, -we expect this the element to be found in the library located -at $interfaces-docname. +<xsl:template match="*[local-name() = 'test']"> +</xsl:template> -This should either be a <method> or <attribute>. If it is neither, -we generate an <xsl:message> reporting that the element is not known. ---> -<xsl:template match="*" mode="body"> - <!-- the element name matches by this template --> - <xsl:variable name="feature" select="local-name(.)"/> - <xsl:variable name="interface" select="@interface"/> +<!-- + <package> - <!-- - Try to find a method having the @name of $feature. - If $interface is defined, make sure search for - a match on that interface in the $domspec document. - --> - <xsl:variable name="method" select="$domspec/library/interface[not($interface) or @name = $interface]/method[@name = $feature]"/> - <xsl:choose> - <xsl:when test="$method"> - <xsl:call-template name="produce-method"> - <xsl:with-param name="method" select="$method"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <!-- - Try to find an attribute having the name of $feature. - Again, if $interface is defined, restrict the search to - that interface - --> - <xsl:variable name="attribute" select="$domspec/library/interface[not($interface) or @name = $interface]/attribute[@name = $feature]"/> - <xsl:choose> - <xsl:when test="$attribute"> - <xsl:call-template name="produce-attribute"/> - </xsl:when> - - <xsl:otherwise> - <xsl:message>Unrecognized element <xsl:value-of select="local-name(.)"/></xsl:message> - </xsl:otherwise> - </xsl:choose> - </xsl:otherwise> - </xsl:choose> + Not used. + --> +<xsl:template match="*[local-name() = 'package']"> + <xsl:message terminate="yes">package not implemented</xsl:message> </xsl:template> -<xsl:template match="/"> - <xsl:apply-templates/> +<xsl:template match="*[local-name() = 'suite']"> </xsl:template> -<xsl:template match="*[local-name() = 'test']"> -<xsl:text>#include <string.h> - -#include <dom/dom.h> -#include "testutils.h" - -</xsl:text> - - <xsl:apply-templates select="*[local-name() = 'metadata']"/> -<xsl:text> -int main(int argc, char **argv) -{ - dom_exception err; -</xsl:text> -<xsl:apply-templates mode="body"/> -<xsl:text> - return 0; -} -</xsl:text> -</xsl:template> - -<xsl:template match="comment()[contains(., 'Copyright')]"> -/* -This source file was generated by test-to-c.xsl -and is a derived work from the source document. -The source document contained the following notice: - -<xsl:value-of select="."/> -*/ -</xsl:template> - -<xsl:template match="*[local-name() = 'metadata']"> -<xsl:text>/** -</xsl:text> - <xsl:call-template name="emit-description"> - <xsl:with-param name="description" select="translate(*[local-name() = 'description'], '	', ' ')"/> - </xsl:call-template> - <xsl:text> */</xsl:text> -</xsl:template> - -<!-- swallowing templates in body mode --> -<xsl:template match="*[local-name() = 'metadata']" mode="body"/> - -<xsl:template match="*[local-name() = 'load']" mode="body"> - <!-- - TODO: need to handle the case where we load more than one testObject. - append a counter to the variable name? - --> - <xsl:text> - TestObject *testObject = test_object_create(argc, argv, "</xsl:text><xsl:value-of select="@href"/><xsl:text>.xml", false); - assert(testObject != NULL); +<xsl:template match="*[local-name() = 'suite.member']"> +</xsl:template> + +<!-- + <wait> - </xsl:text><xsl:value-of select="@var"/><xsl:text> = test_object_get_doc(testObject); - assert(</xsl:text><xsl:value-of select="@var"/><xsl:text> != NULL); -</xsl:text> + Not used. + --> +<xsl:template match="*[local-name() = 'wait']"> + <xsl:message terminate="yes">wait not implemented</xsl:message> </xsl:template> <!-- -not sure what <contentType> is used for, -but it's implemented in subclasses of DOMTestDocumentBuilderFactory.getContentType() +================================================================ +Asserts +================================================================ --> -<xsl:template match="*[local-name() = 'contentType']" mode="body"> - <xsl:text>strcmp(test_object_get_mimetype(testObject), "</xsl:text><xsl:value-of select="@type"/><xsl:text>") == 0</xsl:text> + +<xsl:template match="*[local-name() = 'fail']"> </xsl:template> -<!-- -================================ -Language construct templates -================================ ---> +<xsl:template match="*[local-name() = 'assertNull']"> +</xsl:template> -<!-- a variable declaration --> -<xsl:template match="*[local-name() = 'var']" mode="body"> - <xsl:text> </xsl:text> - <xsl:call-template name="produce-var-type-declaration"> - <xsl:with-param name="var-type" select="./@type"/> - </xsl:call-template> - <xsl:value-of select="@name"/>; +<xsl:template match="*[local-name() = 'assertNotNull']"> </xsl:template> -<xsl:template match="*[local-name() = 'if']" mode="body"> - <!-- - Apply condition template in before-invocation mode - to give it a chance to set up temporary variables (such as DOMStrings) - --> - <xsl:apply-templates select="*[1]" mode="before-invocation"/> - <xsl:text> - if (</xsl:text><xsl:apply-templates select="*[1]" mode="body"/><xsl:text>) { - </xsl:text> - <xsl:apply-templates select="*[position() > 1 and local-name() != 'else']" mode="body"/> - <xsl:text> }</xsl:text> - <xsl:for-each select="*[local-name() = 'else']"> - <xsl:text> else { -</xsl:text> - <xsl:apply-templates mode="body"/> - <xsl:text> }</xsl:text> - </xsl:for-each> - <xsl:text> -</xsl:text> +<xsl:template match="*[local-name() = 'assertTrue']"> </xsl:template> -<xsl:template match="*[local-name() = 'equals']" mode="before-invocation"> - <!-- FIXME: implement --> +<xsl:template match="*[local-name() = 'assertFalse']"> </xsl:template> -<xsl:template match="*[local-name() = 'notEquals']" mode="before-invocation"> - <!-- FIXME: implement --> +<xsl:template match="*[local-name() = 'assertEquals']"> </xsl:template> -<xsl:template match="*[local-name() = 'equals']" mode="body"> - <xsl:message terminate="yes"><!-- FIXME: implement -->equals not implemented</xsl:message> +<xsl:template match="*[local-name() = 'assertNotEquals']"> </xsl:template> -<!-- -================================ -DOM templates -================================ ---> +<xsl:template match="*[local-name() = 'assertInstanceOf']"> +</xsl:template> -<xsl:template name="produce-method"> - <xsl:variable name="methodName" select="local-name(.)"/> - <!-- if interface is specified --> - <xsl:choose> - <xsl:when test="@interface"> - <xsl:variable name="interface" select="@interface"/> - <xsl:call-template name="produce-specific-method"> - <!-- TODO: move vardefs up --> - <xsl:with-param name="vardefs" select="//*[local-name() = 'var']"/> - <xsl:with-param name="method" select="$domspec/library/interface[@name = $interface]/method[@name = $methodName]"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:variable name="methods" select="$domspec/library/interface/method[@name = $methodName]"/> - <xsl:call-template name="produce-specific-method"> - <xsl:with-param name="vardefs" select="//*[local-name() = 'var']"/> - <xsl:with-param name="method" select="$methods[1]"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - -<xsl:template name="produce-attribute"> - <xsl:variable name="attribName" select="local-name(.)"/> - <xsl:choose> - <!-- if interface is specified --> - <xsl:when test="@interface"> - <xsl:variable name="interface" select="@interface"/> - <xsl:call-template name="produce-specific-attribute"> - <xsl:with-param name="attribute" select="$domspec/library/interface[@name = $interface]/attribute[@name = $attribName]"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="produce-specific-attribute"> - <xsl:with-param name="attribute" select="$domspec/library/interface/attribute[@name = $attribName]"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> +<xsl:template match="*[local-name() = 'assertSize']"> </xsl:template> -<!-- -Produce a statement to get or set an attribute. -If @var is specified, the accessor is called and @var is given the result value. -err = dom_document_get_doctype(doc, &docType); -assert(err == DOM_NO_ERR); +<xsl:template match="*[local-name() = 'assertDOMException']"> +</xsl:template> -If @value is specified, the mutator is called and @value is used as the parameter argument. +<xsl:template match="*[local-name() = 'assertURIEquals']"> +</xsl:template> ---> -<xsl:template name="produce-specific-attribute"> - <!-- - An <attribute> node in the $domspec document. - --> - <xsl:param name="attribute"/> - - <!-- the object which contains the attribute --> - <xsl:variable name="obj" select="@obj"/> - - <!-- the <var> for the $obj --> - <xsl:variable name="obj-var" select="//*[local-name() = 'var' and @name = $obj]"/> - - <!-- - The C type for the object's type containing $attribute. - This may be the object's own type, or a supertype. For example, $obj - may be an Element, but the nodeValue attribute is a member of the Node - supertype. - Note that this is the <type> element itself, not the @c attribute. - --> - <xsl:variable name="obj-ctype" select="$ctypes/types/type[@idl = $attribute/parent::interface/@name]"/> - - <!-- - The C name of the attribute. This is either $attribute/@name, or - the value in $ctypes if it overrides it. - --> - <xsl:variable name="attribute-cname"> - <xsl:choose> - <xsl:when test="$obj-ctype/attribute[@idl = $attribute/@name]/@c"> - <xsl:value-of select="$obj-ctype/attribute[@idl = $attribute/@name]/@c"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$attribute/@name"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <!-- - The attribute type. This is either $attribute/@type, or - the <override-type> in $ctypes if it is specified. - The resulting attribute type may be an IDL-style name (e.g. DocumentType) - or a C-style name (e.g. dom_node_type). - --> - <xsl:variable name="attribute-type"> - <xsl:choose> - <xsl:when test="$obj-ctype/attribute[@idl = $attribute/@name]/override-type"> - <xsl:value-of select="$obj-ctype/attribute[@idl = $attribute/@name]/override-type/text()"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$attribute/@type"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:text> err = </xsl:text> - <xsl:if test="@value"> - <xsl:value-of select="$obj-ctype/@c"/> - <xsl:text>_set_</xsl:text> - <xsl:value-of select="$attribute-cname"/> - <xsl:text>(</xsl:text> - <!-- TODO: function parameters --> - <xsl:text>);</xsl:text> - </xsl:if> - <xsl:if test="@var"> - <xsl:variable name="var" select="@var"/> - <xsl:variable name="var-type" select="//*[local-name() = 'var' and @name = $var]/@type"/> - - <xsl:value-of select="$obj-ctype/@c"/> - <xsl:text>_get_</xsl:text> - <xsl:value-of select="$attribute-cname"/> - <xsl:text>(</xsl:text> - <xsl:call-template name="cast"> - <xsl:with-param name="var-type" select="//*[local-name() = 'var' and @name = $obj]/@type"/> - <xsl:with-param name="interface-type" select="$obj-ctype/@c"/> - </xsl:call-template> - <xsl:value-of select="$obj"/> - <xsl:text>, </xsl:text> - <xsl:call-template name="cast"> - <xsl:with-param name="var-type" select="$var-type"/> - <xsl:with-param name="interface-type" select="$attribute-type"/> - </xsl:call-template> - <xsl:text>&</xsl:text> - <xsl:value-of select="@var"/> - <xsl:text>);</xsl:text> - </xsl:if> - <xsl:text> - assert(err == DOM_NO_ERR); -</xsl:text> -</xsl:template> - -<xsl:template name="produce-specific-method"> - <xsl:param name="vardefs"/> - - <!-- a <method> from $domspec --> - <xsl:param name="method"/> - - <!-- the current context node --> - <xsl:variable name="current-node" select="."/> - - <!-- the object which contains the attribute --> - <xsl:variable name="obj" select="@obj"/> - - <!-- the <var> for the $obj --> - <xsl:variable name="obj-var" select="//*[local-name() = 'var' and @name = $obj]"/> - - <!-- the C-type on which the method is called --> - <xsl:variable name="interface-ctype"> - <xsl:call-template name="get-ctype"> - <xsl:with-param name="type" select="$method/parent::interface/@name"/> - </xsl:call-template> - </xsl:variable> - - <xsl:variable name="method-cname"> - <xsl:choose> - <xsl:when test="$ctypes/types/type[@c = $interface-ctype]/method[@idl = $method/@name]/@c"> - <xsl:value-of select="$ctypes/types/type[@c = $interface-ctype]/method[@idl = $method/@name]/@c"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$method/@name"/> - </xsl:otherwise> - </xsl:choose> - </xsl:variable> - - <xsl:variable name="current-position"><xsl:number level="any" count="*"/></xsl:variable> - - <!-- - setup variables to hold parameter literals (for DOMStrings) - TODO: needs testing with method that takes more than one parameter - TODO: needs testing with more than one method call per test - --> - <xsl:for-each select="$method/parameters/param"> - <xsl:variable name="paramDef" select="."/> - <xsl:variable name="value" select="$current-node/@*[name() = $paramDef/@name]"/> - - <xsl:if test="starts-with($value, '"')"> - <xsl:call-template name="produce-dom-string"> - <xsl:with-param name="vardefs" select="$vardefs"/> - <xsl:with-param name="var-name"><xsl:text>domString</xsl:text><xsl:value-of select="$current-position"/>_<xsl:number/></xsl:with-param> - <xsl:with-param name="string" select="$value"/> - </xsl:call-template> - </xsl:if> - </xsl:for-each> - - <!-- function call --> - <xsl:text> err = </xsl:text> - <xsl:value-of select="$interface-ctype"/> - <xsl:text>_</xsl:text> - <xsl:value-of select="$method-cname"/> - <xsl:text>(</xsl:text> - - <!-- the object to invoke the method upon --> - <xsl:call-template name="cast"> - <xsl:with-param name="var-type" select="$obj-var/@type"/> - <xsl:with-param name="interface-type" select="$method/parent::interface/@name"/> - </xsl:call-template> - <xsl:value-of select="$obj"/> - - <!-- method parameters --> - <xsl:for-each select="$method/parameters/param"> - <xsl:variable name="paramDef" select="."/> - <xsl:variable name="value" select="$current-node/@*[name() = $paramDef/@name]"/> - - <xsl:text>, </xsl:text> - - <xsl:call-template name="produce-param"> - <xsl:with-param name="vardefs" select="$vardefs"/> - <xsl:with-param name="var-or-literal" select="$value"/> - <xsl:with-param name="interface-type" select="./@type"/> - <xsl:with-param name="current-position" select="$current-position"/> - </xsl:call-template> - </xsl:for-each> - - <!-- return variable --> - <xsl:if test="@var"> - <xsl:variable name="var" select="@var"/> - - <!-- the <var> for the variable $var --> - <xsl:variable name="var-var" select="//*[local-name() = 'var' and @name = $var]"/> - - <xsl:text>, </xsl:text> - <!-- - FIXME: any explicit cast won't work because _address of_ return params are passed (using &) - need to use extra * on the cast - --> - <xsl:call-template name="cast"> - <xsl:with-param name="var-type" select="$var-var/@type"/> - <xsl:with-param name="interface-type" select="$method/returns/@type"/> - <xsl:with-param name="indirection" select="2"/> - </xsl:call-template> - <xsl:text>&</xsl:text> - <xsl:value-of select="$var"/> - </xsl:if> - <xsl:text>);</xsl:text> - <xsl:text> - assert(err == DOM_NO_ERR); -</xsl:text> +<xsl:template match="*[local-name() = 'assertDOMException']"> </xsl:template> -<!-- -This template expects to be called with -a current context of a $domspec//method/parameters/param. +<xsl:template match="*[local-name() = 'assertImplementationException']"> +</xsl:template> -TODO: If this template needs to be more flexible, will need to pass $current-position -through as a parameter ---> -<xsl:template name="produce-param"> - <xsl:param name="vardefs"/> - - <!-- a string that may be a literal or a variable name --> - <xsl:param name="var-or-literal"/> - - <!-- the parameter's expected type --> - <xsl:param name="interface-type"/> - - <!-- used for referencing DOMStrings --> - <xsl:param name="current-position"/> - - <!-- the IDL type of $var-or-literal --> - <xsl:variable name="var-type"> - <xsl:call-template name="guess-var-or-literal-type"> - <xsl:with-param name="vardefs" select="$vardefs"/> - <xsl:with-param name="var-or-literal" select="$var-or-literal"/> - <xsl:with-param name="interface-type" select="$interface-type"/> - </xsl:call-template> - </xsl:variable> - - <xsl:choose> - <xsl:when test="$var-type = 'DOMString'"> - <!-- - TODO: put this string creation in its own template so it can be reused. - Be careful with the behaviour of xsl:number, though. - --> - <xsl:text>domString</xsl:text><xsl:value-of select="$current-position"/>_<xsl:number/> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="cast"> - <xsl:with-param name="var-type" select="$var-type"/> - <xsl:with-param name="interface-type" select="$interface-type"/> - </xsl:call-template> - <xsl:value-of select="$var-or-literal"/> - </xsl:otherwise> - </xsl:choose> - -</xsl:template> - -<!-- guesses at the IDL type of the supplied var or literal --> -<xsl:template name="guess-var-or-literal-type"> - <xsl:param name="vardefs"/> - - <!-- the variable name or literal --> - <xsl:param name="var-or-literal"/> - - <!-- the expected type of $var-or-literal --> - <xsl:param name="interface-type"/> - - <xsl:choose> - <!-- string literal --> - <xsl:when test="starts-with($var-or-literal, '"')"> - <xsl:text>DOMString</xsl:text> - </xsl:when> - <!-- variable --> - <xsl:when test="$vardefs[@name = $var-or-literal]"> - <xsl:value-of select="$vardefs[@name = $var-or-literal]/@type"/> - </xsl:when> - <!-- unknown; return the interface type --> - <xsl:otherwise> - <xsl:value-of select="$interface-type"/> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - -<xsl:template name="cast"> - <!-- the variable's type (e.g. Document, dom_node_type or int) --> - <xsl:param name="var-type"/> - - <!-- the required type (e.g. Document or dom_node_type) --> - <xsl:param name="interface-type"/> - - <xsl:param name="indirection" select="1"/> - - <!-- the variable's C-style type --> - <xsl:variable name="var-ctype"> - <xsl:call-template name="get-ctype"> - <xsl:with-param name="type" select="$var-type"/> - </xsl:call-template> - </xsl:variable> - - <!-- the interface's C-style type --> - <xsl:variable name="interface-ctype"> - <xsl:call-template name="get-ctype"> - <xsl:with-param name="type" select="$interface-type"/> - </xsl:call-template> - </xsl:variable> +<xsl:template match="*[local-name() = 'assertLowerSeverity']"> +</xsl:template> + +<!-- + <assertEventCount> - <xsl:if test="$var-ctype != $interface-ctype"> - <xsl:text>(</xsl:text> - <xsl:call-template name="produce-var-type-declaration"> - <xsl:with-param name="var-type" select="$interface-ctype"/> - <xsl:with-param name="indirection" select="$indirection"/> - </xsl:call-template> - <xsl:text>) </xsl:text> - </xsl:if> + Not used. + --> +<xsl:template match="*[local-name() = 'assertEventCount']"> + <xsl:message terminate="yes">assertEventCount not implemented</xsl:message> </xsl:template> <!-- -================================ -Assert templates -================================ +================================================================ +Statements +================================================================ --> -<xsl:template match="*[local-name() = 'assertNotNull']" mode="body"> - <!-- TODO: what does the @id string do, and do we need it here? --> - <xsl:text> - assert(</xsl:text><xsl:value-of select="@actual"/><xsl:text> != NULL); -</xsl:text> +<xsl:template match="*[local-name() = 'var']"> </xsl:template> -<xsl:template match="*[local-name() = 'assertNull']" mode="body"> - <!-- TODO: what does the @id string do, and do we need it here? --> - <xsl:text> - assert(</xsl:text><xsl:value-of select="@actual"/><xsl:text> == NULL); -</xsl:text> +<xsl:template match="*[local-name() = 'assign']"> </xsl:template> -<!-- TODO: implement nested elements, such as <or> --> -<xsl:template match="*[local-name() = 'assertTrue']" mode="body"> - <!-- TODO: what does the @id string do, and do we need it here? --> - <xsl:text> - assert(</xsl:text><xsl:value-of select="@actual"/><xsl:text> == true); -</xsl:text> +<xsl:template match="*[local-name() = 'increment']"> </xsl:template> -<xsl:template match="*[local-name() = 'assertFalse']" mode="body"> - <!-- TODO: what does the @id string do, and do we need it here? --> - <xsl:text> - assert(</xsl:text><xsl:value-of select="@actual"/><xsl:text> == false); -</xsl:text> +<xsl:template match="*[local-name() = 'decrement']"> </xsl:template> -<!-- -TODO: somehow want to reuse this for <equals> tests. -The problem is that <equals> is nested inside <if>, and for DOMStrings, -a temporary string must be created first. +<xsl:template match="*[local-name() = 'append']"> +</xsl:template> -Perhaps the <if> template could <xsl:apply-templates/> in two modes. -The first generates temporary variables, and the second generates the equality -test itself. - --> -<xsl:template match="*[local-name() = 'assertEquals']" mode="body"> - <xsl:variable name="vardefs" select="//*[local-name() = 'var']"/> +<xsl:template match="*[local-name() = 'plus']"> +</xsl:template> - <xsl:variable name="actual" select="@actual"/> - - <xsl:variable name="var-type"> - <xsl:call-template name="get-idltype"> - <xsl:with-param name="vardefs" select="$vardefs"/> - <xsl:with-param name="var-name" select="$actual"/> - </xsl:call-template> - </xsl:variable> - - <xsl:choose> - <xsl:when test="$var-type = 'DOMString'"> - <!-- a globally unique identifier for the temporary string --> - <xsl:variable name="dom-string-id"><xsl:number level="any" count="*"/></xsl:variable> - - <xsl:call-template name="produce-dom-string"> - <xsl:with-param name="vardefs" select="$vardefs"/> - <xsl:with-param name="var-name">matchString_<xsl:value-of select="$dom-string-id"/></xsl:with-param> - <xsl:with-param name="string" select="@expected"/> - </xsl:call-template> - <xsl:text> assert(</xsl:text> - <xsl:choose> - <xsl:when test="@ignoreCase = 'true'"> - <xsl:text>dom_string_icmp</xsl:text> - </xsl:when> - <xsl:when test="@ignoreCase = 'auto'"> - <!-- - TODO: implement auto case comparison (see java's DOMTestCase.assertEqualsAutoCase() - --> - <xsl:message><assertEquals ignoreCase='auto'> not supported</xsl:message> - </xsl:when> - <xsl:otherwise> - <xsl:text>dom_string_cmp</xsl:text> - </xsl:otherwise> - </xsl:choose> - <xsl:text>(</xsl:text> - <xsl:value-of select="@actual"/> - <xsl:text>, matchString_</xsl:text> - <xsl:value-of select="$dom-string-id"/> - <xsl:text>) == 0); -</xsl:text> - </xsl:when> - <xsl:when test="$var-type = 'int'"> - <xsl:text> assert(</xsl:text> - <xsl:value-of select="@actual"/> - <xsl:text> == </xsl:text> - <xsl:value-of select="@expected"/> - <xsl:text>); -</xsl:text> - </xsl:when> - <xsl:otherwise> - <xsl:message>assertEquals on unknown type <xsl:value-of select="$var-type"/></xsl:message> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - -<xsl:template match="*[local-name() = 'assertSize']" mode="body"> - <xsl:variable name="vardefs" select="//*[local-name() = 'var']"/> - - <xsl:variable name="collection" select="@collection"/> +<!-- + <subtract> - <xsl:variable name="current-position"><xsl:number level="any" count="*"/></xsl:variable> + Not used. + --> +<xsl:template match="*[local-name() = 'subtract']"> + <xsl:message terminate="yes">subtract not implemented</xsl:message> +</xsl:template> + +<xsl:template match="*[local-name() = 'mult']"> +</xsl:template> + +<!-- + <divide> - <xsl:text> - unsigned long len_</xsl:text> - <xsl:value-of select="$current-position"/> - <xsl:text>;</xsl:text> - <xsl:text> - err = </xsl:text> - <xsl:call-template name="get-ctype"> - <xsl:with-param name="type" select="$vardefs[@name = $collection]/@type"/> - </xsl:call-template> - <xsl:text>_get_length(</xsl:text> - <xsl:value-of select="$collection"/> - <xsl:text>, &len_</xsl:text> - <xsl:value-of select="$current-position"/> - <xsl:text>);</xsl:text> + Not used. + --> +<xsl:template match="*[local-name() = 'divide']"> + <xsl:message terminate="yes">divide not implemented</xsl:message> +</xsl:template> + +<xsl:template match="*[local-name() = 'load']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'if']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'while']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'try']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'for-each']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'comment']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'return']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'substring']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'createTempURI']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'allErrors']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'allNotifications']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'operation']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'key']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'dst']"> +</xsl:template> + +<!-- + <userObj> - <xsl:text> - assert(err == DOM_NO_ERR); - assert(len_</xsl:text> - <xsl:value-of select="$current-position"/> - <xsl:text> == </xsl:text> - <xsl:value-of select="@size"/> - <xsl:text>);</xsl:text> + Not used. + --> +<xsl:template match="*[local-name() = 'userObj']"> + <xsl:message terminate="yes">userObj not implemented</xsl:message> </xsl:template> -<!-- TODO: difficult, because it contains nested elements --> -<xsl:template match="*[local-name() = 'assertDOMException']" mode="body"> +<xsl:template match="*[local-name() = 'atEvents']"> +</xsl:template> - <xsl:message terminate="yes"><!-- FIXME: implement -->assertDOMException not implemented</xsl:message> +<xsl:template match="*[local-name() = 'capturedEvents']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'bubbledEvents']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'allEvents']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'allEvents']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'allEvents']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'createXPathEvaluator']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'getResourceURI']"> </xsl:template> <!-- -================================ -Helper templates -================================ +================================================================ +Conditions +================================================================ --> -<xsl:template name="produce-var-type-declaration"> - <!-- a type (e.g. Document, dom_node_type or int) --> - <xsl:param name="var-type"/> - - <!-- - Number of *s to generate. - Applies to structs and enums only (not primitives) - Default is 1 - --> - <xsl:param name="indirection" select="1"/> - - <xsl:variable name="var-ctype"> - <xsl:call-template name="get-ctype"> - <xsl:with-param name="type" select="$var-type"/> - </xsl:call-template> - </xsl:variable> +<!-- + <same> - <xsl:choose> - <xsl:when test="$ctypes/types/primitive[@c = $var-ctype]"> - <!-- TODO: support the overriding of primitive name in ctypes document --> - <xsl:value-of select="$var-ctype"/><xsl:text> </xsl:text> - </xsl:when> - <xsl:when test="$ctypes/types/type[@c = $var-ctype]"> - <xsl:text>struct </xsl:text> - <xsl:value-of select="$ctypes/types/type[@c = $var-ctype]/@c"/> - <xsl:text> </xsl:text> - <xsl:call-template name="str:generate-string"> - <xsl:with-param name="text" select="'*'"/> - <xsl:with-param name="count" select="$indirection"/> - </xsl:call-template> - </xsl:when> - - <!-- assume this is not a struct, and not a primitive (e.g. an enum) --> - <xsl:otherwise> - <xsl:value-of select="$var-ctype"/> - <!-- TODO: should this * be here? Probably, for normal parameters, no. - Probably need one fewer *s that $indirection --> - <xsl:text> *</xsl:text> - </xsl:otherwise> - </xsl:choose> -</xsl:template> - -<xsl:template name="produce-dom-string"> - <xsl:param name="vardefs"/> - - <!-- the variable name for the dom_string --> - <xsl:param name="var-name"/> + Not used. + --> +<xsl:template match="*[local-name() = 'same']"> + <xsl:message terminate="yes">same not implemented</xsl:message> +</xsl:template> + +<xsl:template match="*[local-name() = 'equals']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'notEquals']"> +</xsl:template> + +<!-- + <lessOrEquals> - <!-- The string literal. Should already be enclosed in double quotes. --> - <xsl:param name="string"/> + Not used. + --> +<xsl:template match="*[local-name() = 'lessOrEquals']"> + <xsl:message terminate="yes">lessOrEquals not implemented</xsl:message> +</xsl:template> + +<xsl:template match="*[local-name() = 'greater']"> +</xsl:template> + +<!-- + <greaterOrEquals> - <!-- a list of all Document variables --> - <xsl:variable name="docs" select="$vardefs[@type = 'Document']"/> + Not used. + --> +<xsl:template match="*[local-name() = 'greaterOrEquals']"> + <xsl:message terminate="yes">greaterOrEquals not implemented</xsl:message> +</xsl:template> + +<!-- + <isNull> - <xsl:text> - struct dom_string *</xsl:text><xsl:value-of select="$var-name"/> - <xsl:text>; - err = dom_string_create_from_const_ptr(</xsl:text> - <xsl:value-of select="$docs[1]/@name"/> - <xsl:text>, (uint8_t *) </xsl:text> - <xsl:value-of select="$string"/> - <xsl:text>, SLEN(</xsl:text> - <xsl:value-of select="$string"/> - <xsl:text>), &</xsl:text> - <xsl:value-of select="$var-name"/> - <xsl:text>); - assert(err == DOM_NO_ERR); -</xsl:text> -</xsl:template> - -<xsl:template name="get-idltype"> - <xsl:param name="vardefs"/> + Not used. + --> +<xsl:template match="*[local-name() = 'isNull']"> + <xsl:message terminate="yes">isNull not implemented</xsl:message> +</xsl:template> + +<xsl:template match="*[local-name() = 'notNull']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'and']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'or']"> +</xsl:template> + +<!-- + <xor> - <!-- variable name --> - <xsl:param name="var-name"/> + Not used. + --> +<xsl:template match="*[local-name() = 'xor']"> + <xsl:message terminate="yes">xor not implemented</xsl:message> +</xsl:template> + +<xsl:template match="*[local-name() = 'not']"> +</xsl:template> + +<!-- + <instanceOf> - <xsl:value-of select="$vardefs[@name = $var-name]/@type"/> + Not used. + --> +<xsl:template match="*[local-name() = 'instanceOf']"> + <xsl:message terminate="yes">instanceOf not implemented</xsl:message> +</xsl:template> + +<xsl:template match="*[local-name() = 'isTrue']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'isFalse']"> </xsl:template> -<xsl:template name="get-ctype"> - <!-- - a type (e.g. Document, dom_node_type or int) - if $type is already a C-style type, or was a primitive, this is - used instead - --> - <xsl:param name="type"/> +<!-- + <hasSize> - <xsl:choose> - <xsl:when test="$ctypes/types/type[@idl = $type]/@c"> - <xsl:value-of select="$ctypes/types/type[@idl = $type]/@c"/> - </xsl:when> - <xsl:when test="$ctypes/types/primitive[@idl = $type]/@c"> - <xsl:value-of select="$ctypes/types/primitive[@idl = $type]/@c"/> - </xsl:when> - <xsl:otherwise> - <xsl:value-of select="$type"/> - </xsl:otherwise> - </xsl:choose> + Not used. + --> +<xsl:template match="*[local-name() = 'hasSize']"> + <xsl:message terminate="yes">hasSize not implemented</xsl:message> </xsl:template> -<!-- -Taken from test-to-java.xsl -Prepends every line with asterisks, suitable for use in a block comment ---> -<xsl:template name="emit-description"> - <xsl:param name="description"/> - <xsl:choose> - <xsl:when test="contains($description, '
')"> - <xsl:variable name="preceding" select="substring-before($description, '
')"/> - <xsl:if test="string-length($preceding) > 0"> - <xsl:text> * </xsl:text> - <xsl:value-of select="substring-before($description, '
')"/> -<xsl:text> -</xsl:text> - </xsl:if> - <xsl:variable name="following" select="substring-after($description, '
')"/> - <xsl:if test="string-length($following) > 0"> - <xsl:call-template name="emit-description"> - <xsl:with-param name="description" select="substring-after($description, '
')"/> - </xsl:call-template> - </xsl:if> - </xsl:when> - <xsl:otherwise> - <xsl:text> * </xsl:text> - <xsl:value-of select="$description"/> - <xsl:text> - </xsl:text> - </xsl:otherwise> - </xsl:choose> +<xsl:template match="*[local-name() = 'contentType']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'contains']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'hasFeature']"> +</xsl:template> + +<xsl:template match="*[local-name() = 'implementationAttribute']"> </xsl:template> </xsl:stylesheet> diff --git a/test/xml/tests/attrcreatedocumentfragment.xml b/test/xml/tests/attrcreatedocumentfragment.xml deleted file mode 100644 index b07b191..0000000 --- a/test/xml/tests/attrcreatedocumentfragment.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="attrcreatedocumentfragment"> -<metadata> -<title>attrCreateDocumentFragment</title> -<creator>NIST</creator> -<description> - Attr nodes may be associated with Element nodes contained within a DocumentFragment. - Create a new DocumentFragment and add a newly created Element node(with one attribute). - Once the element is added, its attribute should be available as an attribute associated - with an Element within a DocumentFragment. -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<!-- createDocumentFragment --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-35CB04B5"/> -<!-- setAttribute --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68F082"/> -<!-- DocumentFragment --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A3"/> -</metadata> -<var name="doc" type="Document"/> -<var name="docFragment" type="DocumentFragment"/> -<var name="newOne" type="Element"/> -<var name="domesticNode" type="Node"/> -<var name="domesticAttr" type="NamedNodeMap"/> -<var name="attrs" type="Attr"/> -<var name="attrName" type="DOMString"/> -<var name="appendedChild" type="Node"/> -<load var="doc" href="staff" willBeModified="true"/> -<createDocumentFragment obj="doc" var="docFragment"/> -<createElement obj="doc" var="newOne" tagName=""newElement""/> -<setAttribute obj="newOne" name=""newdomestic"" value=""Yes""/> -<appendChild var="appendedChild" obj="docFragment" newChild="newOne"/> -<firstChild interface="Node" obj="docFragment" var="domesticNode"/> -<attributes obj="domesticNode" var="domesticAttr"/> -<item interface="NamedNodeMap" obj="domesticAttr" var="attrs" index="0"/> -<name interface="Attr" obj="attrs" var="attrName"/> -<assertEquals actual="attrName" expected=""newdomestic"" id="attrCreateDocumentFragmentAssert" ignoreCase="false"/> -</test> diff --git a/test/xml/tests/attreffectivevalue.xml b/test/xml/tests/attreffectivevalue.xml deleted file mode 100644 index dbda4da..0000000 --- a/test/xml/tests/attreffectivevalue.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="attreffectivevalue"> -<metadata> -<title>attrEffectiveValue</title> -<creator>NIST</creator> -<description> - If an Attr is explicitly assigned any value, then that value is the attributes effective value. - Retrieve the attribute named "domestic" from the last child of of the first employee - and examine its nodeValue attribute. This test uses the "getNamedItem(name)" method - from the NamedNodeMap interface. -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<!-- Element.attributes --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096"/> -<!-- NamedNodeMap.getNamedItem --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1074577549"/> -</metadata> -<var name="doc" type="Document"/> -<var name="addressList" type="NodeList"/> -<var name="testNode" type="Node"/> -<var name="attributes" type="NamedNodeMap"/> -<var name="domesticAttr" type="Attr"/> -<var name="value" type="DOMString"/> -<load var="doc" href="staff" willBeModified="false"/> -<getElementsByTagName interface="Document" obj="doc" var="addressList" tagname=""address""/> -<item interface="NodeList" obj="addressList" var="testNode" index="0"/> -<attributes obj="testNode" var="attributes"/> -<getNamedItem obj="attributes" var="domesticAttr" name=""domestic""/> -<nodeValue obj="domesticAttr" var="value"/> -<assertEquals actual="value" expected=""Yes"" id="attrEffectiveValueAssert" ignoreCase="false"/> -</test> diff --git a/test/xml/tests/attrentityreplacement.xml b/test/xml/tests/attrentityreplacement.xml deleted file mode 100644 index d8fd431..0000000 --- a/test/xml/tests/attrentityreplacement.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001-2004 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="attrentityreplacement"> -<metadata> -<title>attrEntityReplacement</title> -<creator>NIST</creator> -<description> - The "getValue()" method will return the value of the - attribute as a string. The general entity references - are replaced with their values. - Retrieve the attribute named "street" from the last - child of of the fourth employee and examine the string - returned by the "getValue()" method. The value should - be set to "Yes" after the EntityReference is - replaced with its value. This test uses the - "getNamedItem(name)" method from the NamedNodeMap - interface. -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<!-- Attr.value --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-221662474"/> -</metadata> -<var name="doc" type="Document"/> -<var name="addressList" type="NodeList"/> -<var name="testNode" type="Node"/> -<var name="attributes" type="NamedNodeMap"/> -<var name="streetAttr" type="Attr"/> -<var name="value" type="DOMString"/> -<load var="doc" href="staff" willBeModified="true"/> -<getElementsByTagName interface="Document" obj="doc" var="addressList" tagname=""address""/> -<item interface="NodeList" obj="addressList" var="testNode" index="3"/> -<attributes obj="testNode" var="attributes"/> -<getNamedItem obj="attributes" var="streetAttr" name=""street""/> -<value interface="Attr" obj="streetAttr" var="value"/> -<assertEquals actual="value" expected='"Yes"' id="streetYes" ignoreCase="false"/> -</test> diff --git a/test/xml/tests/attrname.xml b/test/xml/tests/attrname.xml deleted file mode 100644 index 9243905..0000000 --- a/test/xml/tests/attrname.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="attrname"> -<metadata> -<title>attrName</title> -<creator>NIST</creator> -<description> - The getNodeName() method of an Attribute node. - Retrieve the attribute named street from the last - child of of the second employee and examine its - NodeName. This test uses the getNamedItem(name) method from the NamedNodeMap - interface. -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<!-- Node.nodeName --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095"/> -<!-- Attr.name --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1112119403"/> -</metadata> -<var name="doc" type="Document"/> -<var name="addressList" type="NodeList"/> -<var name="testNode" type="Node"/> -<var name="attributes" type="NamedNodeMap"/> -<var name="streetAttr" type="Attr"/> -<var name="name" type="DOMString"/> -<load var="doc" href="staff" willBeModified="false"/> -<getElementsByTagName interface="Document" obj="doc" var="addressList" tagname=""address""/> -<item interface="NodeList" obj="addressList" var="testNode" index="1"/> -<attributes obj="testNode" var="attributes"/> -<getNamedItem obj="attributes" var="streetAttr" name=""street""/> -<nodeName obj="streetAttr" var="name"/> -<assertEquals actual="name" expected=""street"" id="nodeName" ignoreCase="false"/> -<name obj="streetAttr" var="name" interface="Attr"/> -<assertEquals actual="name" expected=""street"" id="name" ignoreCase="false"/> -</test> diff --git a/test/xml/tests/attrnextsiblingnull.xml b/test/xml/tests/attrnextsiblingnull.xml deleted file mode 100644 index d425671..0000000 --- a/test/xml/tests/attrnextsiblingnull.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="attrnextsiblingnull"> -<metadata> -<title>attrNextSiblingNull</title> -<creator>NIST</creator> -<description> -The "getNextSibling()" method for an Attr node should return null. -Retrieve the attribute named "domestic" from the last child of of the -first employee and examine its NextSibling node. This test uses the -"getNamedItem(name)" method from the NamedNodeMap interface. -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<!--nextSibling attribute --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6AC54C2F"/> -<!-- Attr interface --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024"/> -</metadata> -<var name="doc" type="Document"/> -<var name="addressList" type="NodeList"/> -<var name="testNode" type="Node"/> -<var name="attributes" type="NamedNodeMap"/> -<var name="domesticAttr" type="Attr"/> -<var name="s" type="Node"/> -<load var="doc" href="staff" willBeModified="false"/> -<getElementsByTagName interface="Document" obj="doc" var="addressList" tagname=""address""/> -<item interface="NodeList" obj="addressList" var="testNode" index="0"/> -<attributes obj="testNode" var="attributes"/> -<getNamedItem obj="attributes" var="domesticAttr" name=""domestic""/> -<nextSibling interface="Node" obj="domesticAttr" var="s"/> -<assertNull actual="s" id="attrNextSiblingNullAssert"/> -</test> diff --git a/test/xml/tests/documentcreateattribute.xml b/test/xml/tests/documentcreateattribute.xml deleted file mode 100644 index d34e97a..0000000 --- a/test/xml/tests/documentcreateattribute.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="documentcreateattribute"> -<metadata> -<title>documentCreateAttribute</title> -<creator>NIST</creator> -<description> - The "createAttribute(name)" method creates an Attribute - node of the given name. - - Retrieve the entire DOM document and invoke its - "createAttribute(name)" method. It should create a - new Attribute node with the given name. The name, value - and type of the newly created object are retrieved and - output. -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1084891198"/> -</metadata> -<var name="doc" type="Document"/> -<var name="newAttrNode" type="Attr"/> -<var name="attrValue" type="DOMString"/> -<var name="attrName" type="DOMString"/> -<var name="attrType" type="int"/> -<load var="doc" href="staff" willBeModified="true"/> -<createAttribute obj="doc" var="newAttrNode" name=""district""/> -<nodeValue obj="newAttrNode" var="attrValue"/> -<assertEquals actual="attrValue" expected="""" ignoreCase="false" id="value"/> -<nodeName obj="newAttrNode" var="attrName"/> -<assertEquals actual="attrName" expected=""district"" ignoreCase="false" id="name"/> -<nodeType obj="newAttrNode" var="attrType"/> -<assertEquals actual="attrType" expected="2" ignoreCase="false" id="type"/> -</test> diff --git a/test/xml/tests/documentcreateelement.xml b/test/xml/tests/documentcreateelement.xml deleted file mode 100644 index 9139ad2..0000000 --- a/test/xml/tests/documentcreateelement.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="documentcreateelement"> -<metadata> -<title>documentCreateElement</title> -<creator>NIST</creator> -<description> - The "createElement(tagName)" method creates an Element - of the type specified. - Retrieve the entire DOM document and invoke its - "createElement(tagName)" method with tagName="address". - The method should create an instance of an Element node - whose tagName is "address". The NodeName, NodeType - and NodeValue are returned. -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-2141741547"/> -</metadata> -<var name="doc" type="Document"/> -<var name="newElement" type="Element"/> -<var name="newElementName" type="DOMString"/> -<var name="newElementType" type="int"/> -<var name="newElementValue" type="DOMString"/> -<load var="doc" href="staff" willBeModified="true"/> -<createElement obj="doc" var="newElement" tagName=""address""/> -<nodeName obj="newElement" var="newElementName"/> -<assertEquals actual="newElementName" expected=""address"" ignoreCase="false" id="name"/> -<nodeType obj="newElement" var="newElementType"/> -<assertEquals actual="newElementType" expected="1" ignoreCase="false" id="type"/> -<nodeValue obj="newElement" var="newElementValue"/> -<assertNull actual="newElementValue" id="valueInitiallyNull"/> -</test> diff --git a/test/xml/tests/documentcreatetextnode.xml b/test/xml/tests/documentcreatetextnode.xml deleted file mode 100644 index b583e12..0000000 --- a/test/xml/tests/documentcreatetextnode.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="documentcreatetextnode"> -<metadata> -<title>documentCreateTextNode</title> -<creator>NIST</creator> -<description> - The "createTextNode(data)" method creates a Text node - given the specfied string. - Retrieve the entire DOM document and invoke its - "createTextNode(data)" method. It should create a - new Text node whose "data" is the specified string. - The NodeName and NodeType are also checked. -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1975348127"/> -</metadata> -<var name="doc" type="Document"/> -<var name="newTextNode" type="Text"/> -<var name="newTextName" type="DOMString"/> -<var name="newTextValue" type="DOMString"/> -<var name="newTextType" type="int"/> -<load var="doc" href="staff" willBeModified="true"/> -<createTextNode obj="doc" var="newTextNode" data=""This is a new Text node""/> -<nodeValue obj="newTextNode" var="newTextValue"/> -<assertEquals actual="newTextValue" expected=""This is a new Text node"" ignoreCase="false" id="value"/> -<nodeName obj="newTextNode" var="newTextName"/> -<assertEquals actual="newTextName" expected=""#text"" ignoreCase="false" id="name"/> -<nodeType obj="newTextNode" var="newTextType"/> -<assertEquals actual="newTextType" expected="3" ignoreCase="false" id="type"/> -</test> diff --git a/test/xml/tests/documentgetdoctype.xml b/test/xml/tests/documentgetdoctype.xml deleted file mode 100644 index 655d6f1..0000000 --- a/test/xml/tests/documentgetdoctype.xml +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001-2004 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="documentgetdoctype"> -<metadata> -<title>documentGetDocType</title> -<creator>NIST</creator> -<description> - The "getDoctype()" method returns the Document - Type Declaration associated with this document. - Retrieve the entire DOM document and invoke its - "getDoctype()" method. The name of the document - type should be returned. The "getName()" method - should be equal to "staff" or "svg". -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-B63ED1A31"/> -<!-- Node.nodeValue --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D080"/> -<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=249"/> -</metadata> -<var name="doc" type="Document"/> -<var name="docType" type="DocumentType"/> -<var name="docTypeName" type="DOMString"/> -<var name="nodeValue" type="DOMString"/> -<load var="doc" href="staff" willBeModified="false"/> -<doctype obj="doc" var="docType"/> -<assertNotNull actual="docType" id="docTypeNotNull"/> -<name interface="DocumentType" obj="docType" var="docTypeName"/> -<if><contentType type="image/svg+xml"/> - <assertEquals actual="docTypeName" expected='"svg"' id="doctypeNameSVG" ignoreCase="false"/> - <else> - <assertEquals actual="docTypeName" expected='"staff"' id="doctypeName" ignoreCase="false"/> - </else> -</if> -<nodeValue obj="docType" var="nodeValue"/> -<assertNull actual="nodeValue" id="initiallyNull"/> -</test> diff --git a/test/xml/tests/nodegetfirstchildnull.xml b/test/xml/tests/nodegetfirstchildnull.xml deleted file mode 100644 index cd67a6f..0000000 --- a/test/xml/tests/nodegetfirstchildnull.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodegetfirstchildnull"> -<metadata> -<title>nodeGetFirstChildNull</title> -<creator>NIST</creator> -<description> - - If there is not a first child then the "getFirstChild()" - - method returns null. - - - - Retrieve the Text node form the second child of the first - - employee and invoke the "getFirstChild()" method. It - - should return null. - -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-169727388"/> -</metadata> -<var name="doc" type="Document"/> -<var name="elementList" type="NodeList"/> -<var name="employeeNode" type="Node"/> -<var name="employeeList" type="NodeList"/> -<var name="secondChildNode" type="Node"/> -<var name="textNode" type="Node"/> -<var name="noChildNode" type="Node"/> -<load var="doc" href="staff" willBeModified="false"/> -<getElementsByTagName interface="Document" obj="doc" tagname=""employee"" var="elementList"/> -<item interface="NodeList" obj="elementList" index="0" var="employeeNode"/> -<childNodes obj="employeeNode" var="employeeList"/> -<item interface="NodeList" obj="employeeList" index="1" var="secondChildNode"/> -<firstChild interface="Node" obj="secondChildNode" var="textNode"/> -<firstChild interface="Node" obj="textNode" var="noChildNode"/> -<assertNull actual="noChildNode" id="nodeGetFirstChildNullAssert1"/> -</test> diff --git a/test/xml/tests/nodegetlastchildnull.xml b/test/xml/tests/nodegetlastchildnull.xml deleted file mode 100644 index f493e1c..0000000 --- a/test/xml/tests/nodegetlastchildnull.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodegetlastchildnull"> -<metadata> -<title>nodeGetLastChildNull</title> -<creator>NIST</creator> -<description> - - If there is not a last child then the "getLastChild()" - - method returns null. - - - - Retrieve the Text node from the second child of the first - - employee and invoke the "getLastChild()" method. It - - should return null. - -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-61AD09FB"/> -</metadata> -<var name="doc" type="Document"/> -<var name="elementList" type="NodeList"/> -<var name="employeeNode" type="Node"/> -<var name="employeeList" type="NodeList"/> -<var name="secondChildNode" type="Node"/> -<var name="textNode" type="Node"/> -<var name="noChildNode" type="Node"/> -<load var="doc" href="staff" willBeModified="false"/> -<getElementsByTagName interface="Document" obj="doc" tagname=""employee"" var="elementList"/> -<item interface="NodeList" obj="elementList" index="0" var="employeeNode"/> -<childNodes obj="employeeNode" var="employeeList"/> -<item interface="NodeList" obj="employeeList" index="1" var="secondChildNode"/> -<firstChild interface="Node" obj="secondChildNode" var="textNode"/> -<lastChild interface="Node" obj="textNode" var="noChildNode"/> -<assertNull actual="noChildNode" id="nodeGetLastChildNullAssert1"/> -</test> diff --git a/test/xml/tests/nodegetnextsiblingnull.xml b/test/xml/tests/nodegetnextsiblingnull.xml deleted file mode 100644 index b9ab799..0000000 --- a/test/xml/tests/nodegetnextsiblingnull.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodegetnextsiblingnull"> -<metadata> -<title>nodeGetNextSiblingNull</title> -<creator>NIST</creator> -<description> - - If there is not a node immediately following this node the - - "getNextSibling()" method returns null. - - - - Retrieve the first child of the second employee and - - invoke the "getNextSibling()" method. It should - - be set to null. - -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6AC54C2F"/> -</metadata> -<var name="doc" type="Document"/> -<var name="elementList" type="NodeList"/> -<var name="employeeNode" type="Node"/> -<var name="lcNode" type="Node"/> -<var name="nsNode" type="Node"/> -<load var="doc" href="staff" willBeModified="false"/> -<getElementsByTagName interface="Document" obj="doc" tagname=""employee"" var="elementList"/> -<item interface="NodeList" obj="elementList" index="1" var="employeeNode"/> -<lastChild interface="Node" obj="employeeNode" var="lcNode"/> -<nextSibling interface="Node" obj="lcNode" var="nsNode"/> -<assertNull actual="nsNode" id="nodeGetNextSiblingNullAssert1"/> -</test> diff --git a/test/xml/tests/nodegetownerdocument.xml b/test/xml/tests/nodegetownerdocument.xml deleted file mode 100644 index 414a607..0000000 --- a/test/xml/tests/nodegetownerdocument.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001-2003 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodegetownerdocument"> -<metadata> -<title>nodeGetOwnerDocument</title> -<creator>NIST</creator> -<description> - The "getOwnerDocument()" method returns the Document - object associated with this node. - - Retrieve the second employee and examine Document - returned by the "getOwnerDocument()" method. Invoke - the "getDocumentElement()" on the Document which will - return an Element that is equal to "staff". -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#node-ownerDoc"/> -<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=251"/> -</metadata> -<var name="doc" type="Document"/> -<var name="elementList" type="NodeList"/> -<var name="docNode" type="Node"/> -<var name="ownerDocument" type="Document"/> -<var name="docElement" type="Element"/> -<var name="elementName" type="DOMString"/> -<load var="doc" href="staff" willBeModified="false"/> -<getElementsByTagName interface="Document" obj="doc" tagname=""employee"" var="elementList"/> -<item interface="NodeList" obj="elementList" index="1" var="docNode"/> -<ownerDocument obj="docNode" var="ownerDocument"/> -<documentElement obj="ownerDocument" var="docElement"/> -<nodeName obj="docElement" var="elementName"/> -<if><contentType type="image/svg+xml"/> -<assertEquals actual="elementName" expected='"svg"' id="svgTagName" ignoreCase="false"/> -<else> -<assertEquals actual="elementName" expected=""staff"" id="nodeGetOwnerDocumentAssert1" ignoreCase="false"/> -</else> -</if> -</test> diff --git a/test/xml/tests/nodegetownerdocumentnull.xml b/test/xml/tests/nodegetownerdocumentnull.xml deleted file mode 100644 index ca50949..0000000 --- a/test/xml/tests/nodegetownerdocumentnull.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001-2004 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodegetownerdocumentnull"> -<metadata> -<title>nodeGetOwnerDocumentNull</title> -<creator>NIST</creator> -<description> - The "getOwnerDocument()" method returns null if the target - node itself is a document. -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#node-ownerDoc"/> -</metadata> -<var name="doc" type="Document"/> -<var name="ownerDocument" type="Document"/> -<load var="doc" href="staff" willBeModified="false"/> -<ownerDocument obj="doc" var="ownerDocument"/> -<assertNull actual="ownerDocument" id="documentOwnerDocumentNull"/> -</test> diff --git a/test/xml/tests/nodeinsertbeforerefchildnull.xml b/test/xml/tests/nodeinsertbeforerefchildnull.xml deleted file mode 100644 index a104b02..0000000 --- a/test/xml/tests/nodeinsertbeforerefchildnull.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodeinsertbeforerefchildnull"> -<metadata> -<title>nodeInsertBeforeRefChildNull</title> -<creator>NIST</creator> -<description> - If the "refChild" is null then the - "insertBefore(newChild,refChild)" method inserts the - node "newChild" at the end of the list of children. - - Retrieve the second employee and invoke the - "insertBefore(newChild,refChild)" method with - refChild=null. Since "refChild" is null the "newChild" - should be added to the end of the list. The last item - in the list is checked after insertion. The last Element - node of the list should be "newChild". -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-952280727"/> -</metadata> -<var name="doc" type="Document"/> -<var name="elementList" type="NodeList"/> -<var name="employeeNode" type="Node"/> -<var name="childList" type="NodeList"/> -<var name="refChild" type="Node" isNull="true"/> -<var name="newChild" type="Node"/> -<var name="child" type="Node"/> -<var name="childName" type="DOMString"/> -<var name="insertedNode" type="Node"/> -<load var="doc" href="staff" willBeModified="true"/> -<getElementsByTagName interface="Document" obj="doc" tagname=""employee"" var="elementList"/> -<item interface="NodeList" obj="elementList" index="1" var="employeeNode"/> -<childNodes obj="employeeNode" var="childList"/> -<createElement obj="doc" tagName=""newChild"" var="newChild"/> -<insertBefore var="insertedNode" obj="employeeNode" newChild="newChild" refChild="refChild"/> -<lastChild interface="Node" obj="employeeNode" var="child"/> -<nodeName obj="child" var="childName"/> -<assertEquals actual="childName" expected=""newChild"" id="nodeInsertBeforeRefChildNullAssert1" ignoreCase="false"/> -</test> diff --git a/test/xml/tests/nodelistindexgetlengthofemptylist.xml b/test/xml/tests/nodelistindexgetlengthofemptylist.xml deleted file mode 100644 index f33c17b..0000000 --- a/test/xml/tests/nodelistindexgetlengthofemptylist.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodelistindexgetlengthofemptylist"> -<metadata> -<title>nodelistIndexGetLengthOfEmptyList</title> -<creator>NIST</creator> -<description> - The "getLength()" method returns the number of nodes - in the list.(Test for EMPTY list) - - Create a list of all the children of the Text node - inside the first child of the third employee and - invoke the "getLength()" method. It should contain - the value 0. -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<!--length attribute --> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-203510337"/> -</metadata> -<var name="doc" type="Document"/> -<var name="elementList" type="NodeList"/> -<var name="employeeNode" type="Node"/> -<var name="employeeList" type="NodeList"/> -<var name="childNode" type="Node"/> -<var name="textNode" type="Node"/> -<var name="textList" type="NodeList"/> -<load var="doc" href="staff" willBeModified="false"/> -<getElementsByTagName interface="Document" obj="doc" var="elementList" tagname=""employee""/> -<item interface="NodeList" obj="elementList" var="employeeNode" index="2"/> -<childNodes obj="employeeNode" var="employeeList"/> -<item interface="NodeList" obj="employeeList" var="childNode" index="1"/> -<firstChild interface="Node" obj="childNode" var="textNode"/> -<childNodes obj="textNode" var="textList"/> -<assertSize collection="textList" size="0" id="nodelistIndexGetLengthOfEmptyListAssert"/> -</test> diff --git a/test/xml/tests/nodeparentnode.xml b/test/xml/tests/nodeparentnode.xml deleted file mode 100644 index 1984a7b..0000000 --- a/test/xml/tests/nodeparentnode.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Copyright (c) 2001-2003 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de -Recherche en Informatique et en Automatique, Keio University). All -Rights Reserved. This program is distributed under the W3C's Software -Intellectual Property License. This program is distributed in the -hope that it will be useful, but WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. -See W3C License http://www.w3.org/Consortium/Legal/ for more details. ---><!DOCTYPE test SYSTEM "dom1.dtd"> - -<test xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1" name="nodeparentnode"> -<metadata> -<title>nodeParentNode</title> -<creator>NIST</creator> -<description> - The "getParentNode()" method returns the parent - of this node. - - Retrieve the second employee and invoke the - "getParentNode()" method on this node. It should - be set to "staff". -</description> -<contributor>Mary Brady</contributor> -<date qualifier="created">2001-08-17</date> -<subject resource="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1060184317"/> -<subject resource="http://www.w3.org/Bugs/Public/show_bug.cgi?id=251"/> -</metadata> -<var name="doc" type="Document"/> -<var name="elementList" type="NodeList"/> -<var name="employeeNode" type="Node"/> -<var name="parentNode" type="Node"/> -<var name="parentName" type="DOMString"/> -<load var="doc" href="staff" willBeModified="false"/> -<getElementsByTagName interface="Document" obj="doc" tagname=""employee"" var="elementList"/> -<item interface="NodeList" obj="elementList" index="1" var="employeeNode"/> -<parentNode interface="Node" obj="employeeNode" var="parentNode"/> -<nodeName obj="parentNode" var="parentName"/> -<if><contentType type="image/svg+xml"/> -<assertEquals actual="parentName" expected='"svg"' id="svgTagName" ignoreCase="false"/> -<else> -<assertEquals actual="parentName" expected='"staff"' id="nodeParentNodeAssert1" ignoreCase="false"/> -</else> -</if> -</test> |