W3C home > Mailing lists > Public > www-dom-ts@w3.org > December 2001

RE: contentType effects for test writers (build updated for HTML L2)

From: Arnold, Curt <Curt.Arnold@hyprotech.com>
Date: Mon, 10 Dec 2001 13:28:34 -0700
Message-ID: <70E215722F6AD511820A000103D141D40AA6D7@thor.aeathtl.com>
To: "'www-dom-ts@w3.org'" <www-dom-ts@w3.org>
Comments inlined.

-----Original Message-----
From: Mary Brady [mailto:mbrady@nist.gov] 
Sent: Monday, December 10, 2001 1:59 PM
To: www-dom-ts@w3.org
Subject: Re: contentType effects for test writers (build updated for HTML
L2)


We are trying to translate our existing HTML tests so that they may be 
used for DOM HTML Level 2.  In doing so, we need to write the tests 
so that they can be used for either HTML 4.0 or XHTML 1.0.  I think we've 
already agreed that we will use two different files to load content -- one 
will conform to HTML4.0 and will be named file.html -- e.g, anchor.html -- 
and the other will conform to XHTML 1.0, and be named file.xml -- 
e.g, anchor.xml -- 

[ca] That was my take

As Curt points out, we will leave the extension off the <load> element, and 
allow the extension to be determined by the contentType.  When we write 
tests for both HTML and XHTML, we will also put an ignoreCase="auto" on 
the <assertEquals> tag, etc.  In addition to this, do we update the 
alltests.xml, html_alltests.xml, and the xml_alltests.xml files according to
what 
tests should be run under what circumstances?  What about the 
<implementationAttribute> tag that was previously mentioned?  Is this still 
necessary?

[ca - begin] 
I don't believe that we need a case-sensitivity implementation attribute and
I have not implemented it.  ignoreCase="auto" should do the appropriate
thing with a lot less coding.  There should be very few tests that don't run
for both contentTypes, so you should just put the tests into alltests.xml
and they will automatically become part of html-alltests and xml-alltests.

The only time that you would need to segregate tests would be when testing
content that was legal HTML but not legal XHTML.  For example, anchor.html
had a <A> element as an immediate child of <BODY> and had a accessKey
attribute that was not defined in the XHTML DTD.  To make anchor.xml a valid
XML file, I put an intervening <p> element and removed the accessKey
attribute.  I don't know if anchor.html was valid HTML or if the XHTML DTD
added constraints beyond that of HTML.
[ca-end]


In setting up the HTML and XHTML files, should the tag names in both files 
be all lowercase?  The actual values of specific tags shouldn't make a
difference, 
should they?  When we try to access a particular tag via a DOM call, should
we 
always use lowercase values?  Is it necessary to use ignoreCase="auto" on
all 
calls to nodeNames or tagNames -- there may be several calls before a
particular 
assertion is made...

[ca]The tag and attribute names need to be lowercase in the XHTML source
documents to be valid XHTML.

Node name parameters to getElementsByTagName, getNamedItem, getAttribute and
similar should be lower case, per the discussion on HTML and XHTML
interoperability in the XHTML spec.  (ignoreCase auto only applies to
<assertEquals> and <equals> it does not apply to any elements that
correspond to DOM methods).   It is probably preferable for the HTML
documents to have upper case tag and attribute names since that would check
that the HTML processor is appropriately implementing case-folding on the
previously mentioned methods.

Any need to also support XHTML 1.1 -- Module Based XHTML?

[ca]Good question, I don't know my way around the XHTML family.  I think the
only think that would change would be the <!DOCTYPE> element, however.


We have about 100 of the HTML tests translated, and just need to make minor 
changes to support both HTML and XHTML, and then we'll check them into CVS.

[ca]That would be great.
Received on Monday, 10 December 2001 15:28:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 April 2009 12:58:45 GMT