Hi Alessandro,

sounds quite good. I hope you have found all comparsions of tag names. 
There are also things like "DIV", "INPUT", "TEXTAREA" inside the qooxdoo 
code I think.

I you feel you have found all these cases I think this would be a good 
change.

"document.write" is bad style. And this is not a bug in Opera or 
Firefox. It is just that they officially do not support document.write 
anymore in XHTML documents. This follows the specification of XHTML. I 
think it is better to completely rewrite the "includer" script. I don't 
think we need to different ways to handle the include system. Could you 
modify your changes accordingly?

Cheers,
Sebastian


Alessandro Sala schrieb:
> Hi all,
> 
> I was trying to use qooxdoo in XHTML documents in order to
> take advantage of native SVG support in Firefox and Opera, but
> I encountered a few problems, manly because tagnames case in the
> XHTML DOM  is handled differently from the HTML DOM.
> 
> While the HTML specifications allow both uppercase and lowercase
> tagnames, XHTML only allows lowercase tagnames, but in qooxdoo
> tagnames references are sometimes lowercase (often, but not always, when
> they are created) and sometimes uppercase (often when comparing
> elements' tagName attribute or when calling getElementsByTagName()).
> 
> I made some tests with FireFox 1.5 and 2.0RC3 and Opera 9 and
> concluded that:
> 
> - When the document type is HTML, both always return tag names in
> uppercase and accept both uppercase and lowercase tag names as arguments
> to getElementsByTagName() and createElement()
> 
> - When the document type is XHTML, both return tag names in their original
> case (which should be lowercase as per XHTML specifications), the
> argument to getElementsByTagName() must match the case of the tag
> being searched for and tags created by createElement() must be lowercase
> to work: this means that qooxdoo fails when an uppercase tag is
> created or expected.
> 
> In addition, it seems both FireFox and Opera have a bug which
> makes the document.write() call fail when the document type is XHTML:
> 
> - Firefox always raises the following exception:
>  "Object cannot be created in this context" code: "9" nsresult:
> "0x80530009 (NS_ERROR_DOM_NOT_SUPPORTED_ERR)"
> 
> - Opera fails silently, that is it doesn't write anything, if 
> document.write()
> is called while loading the document.
> 
> This means that the source build of an application fails to load, since
> the includer script created by generator.py cannot add the <script>
> tags needed to include the application and qooxdoo classes.
> 
> I prepared a patch which converts all tag names references
> to lowercase: this should improve XHTML support while maintaining
> HTML compatibility: I also suggest that, from now on, all new code
> should follow these two guidelines:
> 
> Always use lowercase tag names when calling createElement()
> or getElementsByTagName().
> 
> Always convert to lowercase the tagName attribute of elements before
> comparing it; for example, write
> 
>   el.tagName.toLowerCase() == "body"    // This works both in XHTML and 
> HTML
> 
> instead of
> 
>   el.tagName == "BODY"   // This only works in HTML
> 
> The patch also changes generator.py so that the includer script first tries
> document.write() and, if this fails, it creates script nodes using the
> DOM interface.
> 
> I think it's important that qooxdoo be compatible with XHTML
> documents, since XHTML is the natural evolution of HTML, and
> working with XHTML will enable qooxdoo to take advantage of
> of its new features; so, if you all agree, I will apply the patch to svn.
> 
> Cheers,
> Alessandro
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to