[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 15:52:44 -0700 (PDT)
white space treatment preserve
ok... just thought I would post this incase someone
else wanted to know.  To make the text appear just as
it is in the xml file do the following.

<fo:block white-space-treatment="preserve"
          linefeed-treatment="preserve"
          whitespace-collapse="false"
          font-family="monospace">

   <!-- YOUR CODE HERE -->

<fo:block>


Thanks again for everyone that helped!! (David
Carlisle )


--- josh higgins <doopsterus@xxxxxxxxx> wrote:

> Ok so I lied.  You are still amazing.  But I think I
> am missing something.  I set the
> white-space-treatment="preserve" and
> linefeed-treatment="preserve" but some of the
> spacing
> is not getting preserved.  Is there something else I
> forgot to set?   I just want to output everything in
> the xml file.  I am assuming they are all spaces in
> the xml file but I am not for sure.
> 
> I am making progress thank to you all.  Just a lil
> bit
> more to go.
> 
> 
> --- josh higgins <doopsterus@xxxxxxxxx> wrote:
> 
> > You are a amazing!  Thanks for the document!  I
> > figured that I have to set the
> white-space-collapse
> > varable to false b/c it is initially set to true. 
> > Thanks for all your help!!!
> > 
> > 
> > 
> > --- josh higgins <doopsterus@xxxxxxxxx> wrote:
> > > I am sorry.  I am new to xsl (as you can
> propably
> > > tell) so I am sorry if I am being a pain.  I am
> > not
> > > sure how I can tell if the white spaces are
> still
> > > around before I get to my fo block.  All that I
> > know
> > > is that they are present in my xml file. And the
> > > only
> > > time they are touched is in my detail template. 
> > How
> > > can I tell if they are present before I get to
> my
> > fo
> > > block?  I added the
> linefeed-treatment="preserve"
> > > and
> > > it did not change anything.  So I guess they are
> > not
> > > being preserved.  What could be going on?
> > > 
> > > Thanks 
> > > 
> > > 
> > > --- David Carlisle <davidc@xxxxxxxxx> wrote:
> > > > 
> > > > > Oh if you know of any good resource to read
> to
> > > > become
> > > > > more firmilar with xsl then please let me
> > know.
> > > > 
> > > > 
> > > > The spec isn't too bad a read, or the faq for
> > this
> > > > list at
> > > > www.dpawson.co.uk has some FO entries, and I
> > think
> > > > DaveP's book text is
> > > > online there as well.
> > > > 
> > > > The section of the spec that I linked to in my
> > > last
> > > > reply does say
> > > > 
> > > > 
> > > >       The "white-space-treatment" property
> > > specifies
> > > > the treatment
> > > >       during the refinement process of
> character
> > > > flow objects, except
> > > >       for linefeeds, that are classified as
> > white
> > > > space in XML. This
> > > >       includes U+0020 (space) and other white
> > > space
> > > > characters but
> > > >       excludes U+000A (linefeed). Linefeed
> > > treatment
> > > > is determined by
> > > >       the "linefeed-treatment" property.
> > > > 
> > > > so if it's linebreaks you are after you need
> to
> > > set
> > > > linefeed-treatment
> > > > as well.
> > > > 
> > > > But first you need to verify that your FO file
> > has
> > > > the white space that
> > > > you expect. If the spaces have already gone by
> > > then,
> > > > setting properties
> > > > in the FO won't make them come back.
> > > > 
> > > > 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!? 
> > > Yahoo! Personals - Better first dates. More
> second
> > > dates. 
> > > http://personals.yahoo.com
> > > 
> > > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > http://mail.yahoo.com 
> > 
> > 
> 
> 
> 
> 		
> __________________________________ 
> Yahoo! Messenger 
> Show us what our next emoticon should look like.
> Join the fun. 
> http://www.advision.webevents.yahoo.com/emoticontest

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-2011 All Rights Reserved.