This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Get rid of lines break.


Auguste Oumar wrote:
> Hi all,
> i wrote a xslt to transform a xml-file to an
> ascii-file.The problem ist: i don't like the lines
> break in the output-file.Ist it an easy way to get rid
> of them or should i have to write an application for
> that? I used the xalan xslt-processor from apache.
> The input :
>  <?xml...?>
>   <doc>
>     <s1>abc</s1>
>     <s2>def</s2>
>   </doc>
> 
> The output should be like:
>   abcdef
> 
> cheers

Add <xsl:strip-space elements="*"/> to your stylesheet.

This will cause the whitespace-only text nodes (like the linefeed
and spaces between <doc> and <s1>) to be removed before processing.

   - Mike
____________________________________________________________________________
  mike j. brown, fourthought.com  |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]