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

Re: Understanding why <tag></tag> is the way it is (wa

Subject: Re: Understanding why <tag></tag> is the way it is (was Re: IE Client side transformation issue)
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Fri, 03 Aug 2007 18:51:19 +0200
Re:  Understanding why <tag></tag> is the way it is (wa
Maybe I wasn't clear that the examples I mentioned were about XHTML, not about HTML, because the OP was all about XHTML rendering with XSLT 1.0

David Carlisle wrote:
instead of the more sensible <script />,
You say sensible, but in html it's a syntax error.

Not in XHTML. In XHTML you can write: <script type="text/javascript" src="scripts/myscript.js" /> as well as <script type="text/javascript" src="scripts/myscript.js" ></script>

but the first will not render well in IE, both will render well in FF and Opera, I don't know about Safari and Konqeror. I assume the correct document type is set (I believe the OP had one set correctly).



(the opposite is also true: <br /> should not be written as <br></br> because, you guessed it right, IE cannot handle it well)

that's a syntax error in HTML as well, so why should IE handle it?
(when acting as an HTML system, which is all it claims to act as).

Same here. XHTML 1.0 allows both <br />, <br/> <br></br> but discourages the second and third because of possible incorrect rendering by engines that were before used to HTML: http://www.w3.org/TR/xhtml1/#h-4.6 and http://www.w3.org/TR/xhtml1/#C_2 (informative)


The opposite is also true, if the content is not defined as EMPTY in the DTD (i.e, like a <p> tag), omitting the end-tag is allowed by the spec, but discouraged by the compatibility guidelines: http://www.w3.org/TR/xhtml1/#C_3 (informative)

this latter is far more a problem when naively creating XHTML with an XSLT 1.0 processor with output method "xml". There is a cdata-section-elements on xsl:output, but not a never-minimize-elements attribute or something similar.

Cheers,
-- Abel Braaksma

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.