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

Re: xsl: preserving spaces preserves only one space?

Subject: Re: xsl: preserving spaces preserves only one space?
From: josh higgins <doopsterus@xxxxxxxxx>
Date: Mon, 4 Apr 2005 08:46:01 -0700 (PDT)
preserving spaces in html
Thanks buddy but I did just what you suggested and it
does not seem to work. Below is the code where I made
the modification.  Does this not seem correct?  Does
the order of attribute specification matter.  I would
assume not b/c the scope is propably the same.  Ideas.
 Oh if you know of any good resource to read to become
more firmilar with xsl then please let me know.


<xsl:template name="detail">
	<xsl:for-each select="/invoice/detail/row">
		<fo:block font-size="10pt"
white-space-treatment="preserve">
			<xsl:value-of select="transaction_detail"/>
		</fo:block>
	</xsl:for-each> 
</xsl:template>


--- David Carlisle <davidc@xxxxxxxxx> wrote:
> 
> 
>   <xsl:preserve-space
> elements="transaction_detail"/>
> 
> That presves white space nodes during the
> transformation stage although
> that will have no effect on your resulting FO file
> as you never have any
> select expressions that would be affected by the
> presence of white space
> text nodes.
> 
> So (presumably) the white space that you want to
> preserver _is_
> preserved by your XSLT transformation and appears in
> the resulting FO
> file.
> 
> FO in common with HTML, CSS, TeX and many other
> typesetting systems will
> by default render any run of white space just as a
> single word space.
> 
> If you don't want that you need to set the white
> space properties on the
> surrounding fo:block, there are several of them,
> giving control of line
> break and white space normalization but
> white-space-treatment="preserve"
> is probably a place to start.
>
http://www.w3.org/TR/xsl/slice7.html#white-space-treatment
> 
> David
> 
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by
> Star. The
> service is powered by MessageLabs. For more
> information on a proactive
> anti-virus service working around the clock, around
> the globe, visit:
> http://www.star.net.uk
>
________________________________________________________________________
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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.