Re: [xsl] Closing element required instead of self closing

Subject: Re: [xsl] Closing element required instead of self closing
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Tue, 15 Jul 2008 14:54:57 +0100
2008/7/15 Owen Rees <owen.rees@xxxxxx>:
> --On Tuesday, July 15, 2008 13:23:00 +0100 Andrew Welch wrote:
>
>> However they do mention XHTML in the 1.0 spec, in fact there's an
>> example transforming to XHTML which uses the XML output method:
>>
>> http://www.w3.org/TR/xslt#section-Document-Example
>>
>> Perhaps it was thought that the XML output method was sufficient?
>
> If you are using XSLT to transform XML into something to be consumed by an
> HTML user agent it seems to me to make sense to use the HTML output method
> to generate real HTML rather than trying to generate Appendix C style XHTML
> in the hope that the HTML user agent will be able to cope with it.

In the real world, many people try to deliver a standards based
website using XSLT -  they choose strict XHTML but are quite often
limited to XSLT 1.0 and it's XML output method, so all of the various
hacks are needed.  It really wouldn't have been such a big deal if a
processor offered a tag-minimization="no" serialization option....the
two forms are equivalent - any XML consumer of that seriallized data
wouldn't have complained - it's always been unfathomable to me why
there is such opposition to this when it makes *no difference* to an
XML parser.

And come on, saying deliver HTML to an HTML user agent is pretty
unhelpful - you just flick a switch don't you?  :)


> If you are delivering content as application/xhtml+xml to an agent that
> understands XHTML then any valid serialisation of the XML will do just fine.

You might be right, but don't all the elements have to be lowercase?
So <DIV/> wouldn't be valid XHTML... There must a be a few more
differences...



-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

Current Thread