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

Re: getting crlf's, but putting only lf's (i think)

Subject: Re: getting crlf's, but putting only lf's (i think)
From: Ray Tayek <rtayek@xxxxxxxxxxx>
Date: Mon, 03 Nov 2003 07:47:15 -0800
java strip crlf
At 08:57 AM 11/2/03 +0000, you wrote:
Try

<xsl:strip-space elements="list-of-element-names"/>

The <xsl:strip-space> element is used to define the elements for which white
space should be removed. * will do all i think

had some, tried *, still getting \r's.


thanks


PA Sport RnD

Andrew Curry
Software Developer

Telephone: 01430 455545
Website:        http://www.pa.press.net

PA News Limited:
Bridgegate, Howden, East Yorkshire, DN14 7AE

Registered Office:
PA News Limited, 292 Vauxhall Bridge Road, London SW1V 1AE. Registered in
England No. 3891053


----- Original Message ----- From: "Ray Tayek" <rtayek@xxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Cc: "Martin Hubert" <mhubert@xxxxxxxxxxx> Sent: Monday, November 03, 2003 6:08 AM Subject: getting crlf's, but putting only lf's (i think)


> hi, i get crlf's in my transformed output when using the following (see > below). i am trying to convert an xml file into a csv file. all is well > except that xalan-j_2_5_1 is putting crlf's into the output stream (doesn't > matter whether it's a writer or a byte output stream). is there any way to > get rid of the carriage return? > > any pointers will be appreciated. > > thanks > > input xml file: > > <?xml version="1.0" encoding="UTF-8"?> > <outputRows> > <outputRow> > <inputRecordSequenceNumber>1</inputRecordSequenceNumber> > <copy1>copy1Value1</copy1> > <renamed1>rename1Value1</renamed1> > <new1>new1ValueFromSpecial1Name</new1> > <new2>new2ValueFromSpecial1Name</new2> > <new3>special1Value1</new3> > </outputRow> > <outputRow> > <inputRecordSequenceNumber>1</inputRecordSequenceNumber> > <copy1>copy1Value1</copy1> > <renamed1>rename1Value1</renamed1> > <new1>new1ValueFromSpecial2Name</new1> > <new2>new2ValueFromSpecial2Name</new2> > <new3>special2Value1</new3> > </outputRow> > <outputRow> > <inputRecordSequenceNumber>2</inputRecordSequenceNumber> > <copy1>copy1Value2</copy1> > <renamed1>rename1Value2</renamed1> > <new1>new1ValueFromSpecial1Name</new1> > <new2>new2ValueFromSpecial1Name</new2> > <new3>special1Value2</new3> > </outputRow> > <outputRow> > <inputRecordSequenceNumber>2</inputRecordSequenceNumber> > <copy1>copy1Value2</copy1> > <renamed1>rename1Value2</renamed1> > <new1>new1ValueFromSpecial2Name</new1> > <new2>new2ValueFromSpecial2Name</new2> > <new3>special2Value2</new3> > </outputRow> > </outputRows> > > xslt file: > > <?xml version="1.0" encoding="UTF-8" ?> > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:output method="text"/> > <xsl:strip-space elements="outputRows outputRows/outputRow"/> > <xsl:template match="outputRows"> > <xsl:text>inputRecordSequenceNumber,copy1,remove1,rename1,special1,special2& #10;</xsl:text> > <xsl:apply-templates/> > </xsl:template> > <xsl:template match="outputRows/outputRow"> > <xsl:apply-templates/> > <xsl:text>&#10;</xsl:text> > </xsl:template> > <xsl:template match="outputRows/outputRow/*"> > <xsl:value-of select="."/><xsl:if test="position() != > last()">,</xsl:if> > </xsl:template> > </xsl:stylesheet> > > output file: > > inputRecordSequenceNumber,copy1,remove1,rename1,special1,special2 > 1,copy1Value1,rename1Value1,new1ValueFromSpecial1Name,new2ValueFromSpecial1N ame,special1Value1 > 1,copy1Value1,rename1Value1,new1ValueFromSpecial2Name,new2ValueFromSpecial2N ame,special2Value1 > 2,copy1Value2,rename1Value2,new1ValueFromSpecial1Name,new2ValueFromSpecial1N ame,special1Value2 > 2,copy1Value2,rename1Value2,new1ValueFromSpecial2Name,new2ValueFromSpecial2N ame,special2Value2 > ...

--- ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work vice chair orange county java users group http://www.ocjug.org/ hate spam? http://samspade.org/ssw/


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



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.