output html as lower case?

Jacob Kjome <[email protected]>
Newsgroups gmane.comp.java.enhydra.xmlc
Message-ID <[email protected]>
Hi Everyone,

Just pinging the list about a conversation I had with David Li about making 
XMLC output HTML in lower case.  HTML tags are not case sensitive, but 
XHTML is (because it is XML compliant).  Now, the reason why having XMLC 
output tags in all upper case is kind of annoying (besides the ugliness of 
all upper case) is for things like XPath which, being an application of 
XML, is also case sensitive.  If I write an XPath expression, it will only 
work on HTML and not XHTML or vice-versa, but not both.

For example, the following XPath will work on an XMLC-formatted HTML 
document but not on an XHTML document with the same structure...

/HTML/HEAD/TITLE

For the XHTML document, I'd have to use...

/html/head/title

Basically, what I propose is to for HTML output to be all lower case just 
like XHTML output.  That will make it so we can count on a single case for 
all elements making the latter XPath expression work for HTML, XHTML, and 
XML documents.  I suppose this should also be extended to WML and any other 
type of *ML as well (if they don't already do it anyway).  Does this make 
sense to do?  Will it break anything out there?  Can anyone think of any 
problems that might be caused by a change like this?

I'd like to see this in the XMLC-2.2 release unless someone can think of 
major compatibility problems that might occur. Comments?


Below is a copy of the question I posed to David Li and his response....

At 10:12 AM 6/13/2003 +0900, you wrote:
>>Yes, but we control how HTML is stored in the DOM.  I think we could 
>>force it all to lower case just as XHTML requires.  I think we should be 
>>able to use XPath without having to go through a filter to make it work 
>>for XMLC doms.  I'm not sure what would be entailed in forcing all the 
>>elements in the XMLC dom to be stored in lower case as opposed to upper 
>>case, though.  What does Xerces2 html dom Impl do?  I guess we should 
>>probably do whatever it does.
>
>It's done by the XMLC codes and should not be hard to change. I will look 
>into this. I think there isn't any problem changing the case of element 
>name from upper to lower case.


Jake
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.