xsl-list
[Top] [All Lists]

Re: [xsl] Preserving Spaces and Tabs

2007-07-09 00:11:26
Andy Carr1 wrote:

  Hi

In my source XML have text that incorporates spaces, tabs and
line-feeds and need to preserve this formatting in the output
PDF.

  To preserve spaces, liinefeeds and not collapse white
spaces, you should set white-space-treatment to preserve,
linefeed-treatment to preserve and white-space-collapse to
false.  I think there is no way to say that a tab has to
be treated as if there were N spaces, but you can translate
tabs in XSLT instead:

    <fo:block white-space-treatment="preserve"
              linefeed-treatment="preserve"
              white-space-collapse="false">
      <xsl:value-of select="replace(., '&#x09;', '    ')"/>
    </fo:block>

  Regards,

--drkm





















      
_____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>