[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: ben senior <ben@xxxxxxxxxxxxx>
Date: Fri, 15 Apr 2005 11:23:30 +0200
xslt textarea collapsing
As mentioned before, not just IE. FYI, we also have big problems with <textarea> and mozilla, for instance.

Ta,
B

Andrew Welch wrote:



In our case it turns out that it is XML transforms happening long before XSL comes on the scene that are causing the minimisation.

Although, I suppose we could then use XSL to find nodes with no content, and then 'un-minimise' them by inserting some comments text. Hmm.. it's worth a go I suppose.



Yes - the part you are concerned with here is the way that the result tree (the result of the transformation) gets serialised. XSLT operates on a source tree created by the XML parser - XSLT doesn't know whether in the XML the element was written as <foo/> or <foo></foo>, all it sees is a node in a tree. Equally in the result tree a node is just a node, only when that node gets serialised is there any influence over whether the node gets written out as <foo/> or <foo></foo>. XSLT generates the result tree, the serialiser operates on the result tree to produce the output.

If you have specified the HTML output method, then the serialiser checks
against a set of rules and will write out HTML elements correctly eg
<meta> with no closing tag as it is defined as EMPTY in the HTML DTD.
If you have specified the XHTML output method of 2.0 then the serialiser
will write out <meta /> as an empty XML element, as that how it defined
in XHTML. The key to remember here is that in XML <foo/> and
<foo></foo> are identical - it's only when we send XML to the HTML
parser in IE that it becomes significant.


cheers
andrew

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.