Thank you Alessandro.

Just found another interesting document:
http://ejohn.org/blog/xhtml-documentwrite-and-adsense/

Sebastian


Alessandro Sala schrieb:
> Hi all,
> 
> I've just committed several changes to qooxdoo classes and to 
> generator.py in order to allow applications to be included in XHTML 
> documents (those served with the mime-type application/xhtml+xml).
> 
> XHTML (http://www.w3.org/TR/xhtml1/#xhtml) will eventually replace HTML, 
> and using XHTML documents as containers for qooxdoo applications already 
> brings some benefits for browsers that support it (for example you can 
> take advantage of native SVG support in Opera and Firefox, see also 
> http://www.w3.org/MarkUp/2004/xhtml-faq#advantages)
> 
> Changes to qooxdoo classes are mainly related to tagname case handling: 
> HTML allows both uppercase and lowercase tags while XHTML only allows 
> lowercase tags, so all references to tag names have been converted to 
> lowercase, thus allowing for XHTML compliance while maintaining HTML 
> compatibility.
> 
> To avoid breaking this compatibility, all new code should follow this 
> guidelines:
> 
>    1. Always use lowercase tag names when calling createElement() or
>       getElementsByTagName().
>    2. Always convert the tagName attribute of elements to lowercase
>       before comparing it; for example, write
> 
>         if  (el.tagName.toLowerCase() == "body")    // This works in
>       both XHTML and HTML
> 
>       instead of
> 
>         if  (el.tagName == "BODY")   // This only works in HTML
> 
> 
> Changes to generator affect only the source build of applications: the 
> current includer script was using document.write() to load the 
> javascript sources of qooxdoo classes, but the XHTML DOM does not 
> include document.write() anymore, so a different way of loading sources 
> is needed.
> 
> The w3c-recommended alternative is to use DOM createElement() and 
> appendChild() (see http://www.w3.org/MarkUp/2004/xhtml-faq#docwrite).
> 
> Unfortunately, extensive testing with all major browser showed that 
> using createElement() and appendChild() to include external scripts is 
> not reliable in most of them (here I must thank Hugh Gibson, Jim Hunter, 
> David Perez and Sebastian Werner for their suggestions and explanations, 
> and Alex Dukhovniy and Andreas Junghans for testing with Safari and IE7 
> [hope I didn't forget anyone!]): currently, only Opera and Gecko-based 
> browsers seem to work as expected, so we can't get rid of 
> document.write() yet.
> 
> Therefore, the new includer selects the appropriate source-loading 
> technique based on the browser it is running in, according to the 
> following rules:
>  - Opera, Gecko => createElement() and appendChild()
>  - Khtml, Webkit, IE, unknown browser => document.write()
> 
> This means that XHTML support for source builds is currently only 
> available if running inside Opera or Gecko-based browsers. However, 
> custom builds don't have this limitation.
> 
> I've also added a new option to generator.py  
> --source-loader-type={auto|docwrite|domappend} and I have updated the 
> makefiles with the new variable SOURCELOADER: you can set it to one the 
> above values in order to force the loader to use DOM methods or 
> document.write(), should the auto-detection fail to select the proper 
> technique or if you want to try createElement() and appendChild() on new 
> versions of currently failing browsers.
> 
> Please report any problems.
> 
> 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