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

RE: tag minimisation

Subject: RE: tag minimisation
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Wed, 11 Sep 2002 11:05:23 +0100
RE:  tag minimisation
DC:
> so you need to make th elast stage in your pipeline convert to html.
> Just sending XML not using /> will cause IE to break in other places
> every <br></br> will cause a blank line (ie two line breaks) for
> example.
> 
> The easiest way to do an xhtml to html trasform for IE is to stick
> 
> <?xml-stylesheet type="text/xsl" href="idenity.xsl"/>
> 
> at the top of the file, where identity.xsl is an XSL identity 
> transform
> outputting using html outputmethod.
 
Yeah, this works.  Very cunning.  However, its an extra level of
processing and.. well, it just seems like overkill.  Very good though.


> yes it does what you need, not what you are asking for: it 
> outputs <br/>
> as <br /> not <br></br>.
> 

<br>'s aren't the problem, nor are <a> or <img>, as these generally
don't have styles.  The problem lies squarely with <div> <span> <td>
etc, getting minimised:

<td><xsl:apply-templates select="foo"/></td>
<td>bar</td>

Becomes, when <foo> is empty/not present:

<td/>
<td>bar</td>

which is then interpreted as:

<td>
  <td>bar</td>
</td>

which is incorrect.  The current realistic solution (no node-tests pls)
is to include some whitespace, to prevent the serialiser minimising the
element, so the output becomes:

<td> </td>
<td>bar</td>

All I was asking for was a switch to tell the serialiser not to bother
minimising empty elements.

cheers
andrew

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.385 / Virus Database: 217 - Release Date: 04/09/2002
 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.