[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Closing element required instead of self closing

Subject: Re: Closing element required instead of self closing
From: Owen Rees <owen.rees@xxxxxx>
Date: Tue, 15 Jul 2008 14:21:55 +0100
Re:  Closing element required instead of self closing
--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.


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.

Perhaps when XSLT 1.0 was being written it was not anticipated that the dubious practice of delivering XHTML as text/html to HTML user agents would be so widespread.

If the requirement is to generate XHTML in Appendix C style then given an XSLT 2.0 processor, the xhtml output method is the answer. Attempting to extend the Appendix C tricks to some other form of XML will create an instant legacy system.

--
Owen Rees; speaking personally, and not on behalf of HP.
========================================================
Hewlett-Packard Limited.   Registered No: 690597 England
Registered Office:  Cain Road, Bracknell, Berks RG12 1HN

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.