Re: Fwd: Over/under trimming of whitespace
[David Morris] > > I have a stylesheet to convert from XHTML to FOP. I haven't been > able to come up with a good way to distinguish between an element > like <td></td>, <td/>, and <td>-some whitespace-</td>. > > I want an element with whitespace to do nothing and to generate an: > <fo:inline white-space-collapse="false"> </fo:inline> > >... > The bigger problem is that specifying the following > on a template rule that matches an element with whitespace > > <fo:inline white-space-collapse="false"> </fo:inline> > > becomes > > <fo:inline white-space-collapse="false"/> > > rendering this solution completely useless. > You could put in a non-breaking space: <fo:inline white-space-collapse="false"> </fo:inline> Otherwise, you have to instruct the parser to leave whitespace-only nodes alone (depends on the parser defaults). How to do that depends on the parser. If the parser takes them out, xsl:preserve-space can't do anything about because it's too late by then. Cheers, Tom P XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format