Re: New requirement - Simplifying Meta Data Profile

As on http://www.w3.org/html/wg/il16 I seems you would like me to 
provide an example of an XHTML2 document that works in XHTML1: “Hunt 20 
Mar 2007 <http://www.w3.org/mid/45FE99D1.4070906@lachy.id.au> takes 
issue with a number of XHTML 2 features; a reply from Holst makes a 
number of compatibility claims. It would be useful to see these 
subtantiated by test cases.”

Attached is a version of the XHTML2 document that is backing the 
frontpage of www.backbase.com (home.xml). This document is a perfectly 
valid XHTML2 document, as far as I can tell.

If you change the namespace to http://www.w3.org/1999/xhtml, you will 
see that the page works as intended (I have also attached 
home-xhtml1.xml for your convenience). Note that it needs the following 
few lines of CSS, as I mentioned in my earlier posts:

l { display: block; }
h { display: block; font-size: xx-large; font-weight: bold; }
section { display: block; }
section h { font-size: x-large; }
section section h { font-size: large; }
section section section h { font-size: medium; }
section section section section h { font-size: small; }
separator { display: block; height: 1px; background: black; border: 1px 
outset gray; margin: 1em 2em; }

Also note that I could have used <h1>...<h6> here, had I wanted to do 
so, and it would still be valid XHTML2.

Another means to make it work in current browsers is by using CSS and 
XBL. This is what we actually use for internal writing of the documents, 
the referenced xhtml2-bdoc.css stylesheet does this. It uses the XHTML2 
namespace, and works in Opera, Mozilla and Prince. In Mozilla and 
Prince, it also supports href and src attributes directly on any element.

The final document that is output to the page however is an XHTML1 
document (served as application/xml, iirc) containing extensions in a 
Backbase namespace. This is created using a fairly simple XSLT 
transformation on the Cocoon framework.

So, I hope this shows how XHTML2 can be used in today’s XHTML1 
supporting browsers.


~Grauw

p.s. Note that personally I think we could introduce the <h>, 
<separator> and <l> elements in HTML5 as well, achieving backwards 
compatibility through the same means.

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.

Received on Wednesday, 28 March 2007 08:30:03 UTC