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

Re: Preventing tags from collapsing

Subject: Re: Preventing tags from collapsing
From: "Joe Fawcett" <joefawcett@xxxxxxxxxxx>
Date: Thu, 14 Apr 2005 14:25:40 +0100
Re:  Preventing tags from collapsing
----- Original Message ----- From: "ben senior" <ben@xxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, April 14, 2005 2:11 PM
Subject: Preventing tags from collapsing



We have yet to find a way to stop tags containing no content from being collapsed :

e.g.

<script></script> is always output as <script/> or
<textarea></textarea> as <textarea/>

This is sending us barking as browsers do not treat the two different renditions equally.

Does anybody have any suggestion?

Thanks,

Ben


Sounds like you're trying to output xhtml, if xsl:output method is set to html this shouldn't happen. As the most widely used browser, for better or for worse this is still IE, doesn't support xhtml you're fighting a losing battle. Unless you are targetting an audience where the browser can be specified you'll need a workaround.
For script can you test if the content is empty and if so output a script comment (//this is a comment, for example)?
For textarea it depends, can you have a single space?



Joe


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.