This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
test-to-ecmascript misgenerates <implementation obj="doc" var="impl"/> as impl = doc.getImplementation(); instead of impl = doc.implementation;
Fixed.
It is just a little more complicated than that. There are two "forms" of the implementation element, one to get an implementation from the framework and one to access Document.implementation. A couple of months ago, I implemented the framework form for ECMAScript and botched the Document.implementation form. <implementation var="impl"/> should generate impl = getImplementation(); to get an implementation from the framework and <implementation var="impl" obj="doc"/> should generate impl = doc.implementation; I'll fix this within the hour.
Patch relative to revision 1.20. Index: test-to-ecmascript.xsl =================================================================== RCS file: /sources/public/2001/DOM-Test-Suite/transforms/test-to-ecmascript.xsl,v retrieving revision 1.20 diff -u -r1.20 test-to-ecmascript.xsl --- test-to-ecmascript.xsl 21 May 2003 05:00:33 -0000 1.20 +++ test-to-ecmascript.xsl 20 Jun 2003 19:23:53 -0000 @@ -377,12 +377,17 @@ <xsl:template match="*[local-name()='implementation']" mode="body"> <xsl:value-of select="@var"/> <xsl:text> = </xsl:text> - <xsl:if test="@obj"> - <xsl:value-of select="@obj"/> - <xsl:text>.</xsl:text> - </xsl:if> - <xsl:text>getImplementation(); + <xsl:choose> + <xsl:when test="@obj"> + <xsl:value-of select="@obj"/> + <xsl:text>.implementation; </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>getImplementation(); +</xsl:text> + </xsl:otherwise> + </xsl:choose> </xsl:template> <xsl:template match="*[local-name()='createXPathEvaluator']" mode="body">