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

RE: Newline problems

Subject: RE: Newline problems
From: "Vishwajit Pantvaidya" <pantvaidya@xxxxxxxxxxx>
Date: Thu, 01 May 2003 14:50:46 -0700
java strip newline
Yes, I did, but that did not work. The reason I feel is that, from my understanding of xsl:strip-space, it eliminates the standalone white space from the document tree. But here the whitespace is actually embedded in the value of an element, which is why I believe it did not work in my case.

Thanks,

- Vishwajit.




From: "Singh, Anoop" <anoop.singh@xxxxxx>
To: "Vishwajit Pantvaidya" <pantvaidya@xxxxxxxxxxx>
Subject: RE: Newline problems
Date: Thu, 1 May 2003 12:54:27 -0700


Have u used this one...


<xsl:strip-space elements="*"/>

-----Original Message-----
From: Vishwajit Pantvaidya [mailto:pantvaidya@xxxxxxxxxxx]
Sent: Thursday, May 01, 2003 11:04 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx; xalan-j-users@xxxxxxxxxxxxxx
Subject: Newline problems


I am using xalan for xml to xml transformation. Input xml string has some DOS carriage return and/or line feeds introduced by the source application. The source xml string that I was trying to transform is like (exactly as is, including newlines)

<!DOCTYPE ABC [
...
]><ABC>
...
<attr>
value</attr>
...
</ABC>

i.e. the newline was probably getting included in the value of the
element
"attr". Would such newlines yield the empty output xml I was getting?
Xsl-strip space did not help. Finally, I had to write java code to strip
the
newlines from the source xml and then I started getting output xml
correctly.

Our xsl is like

<?xml version = "1.0" encoding = "UTF-8"?>
<xsl:transform xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
version = "1.0">
<xsl:template match = "ABC">
<xsl:text disable-output-escaping="yes">&lt;!DOCTYPE
OrderProcessing&gt;</xsl:text>
...
<xsl:template mode = "Attribs" match = "ctrInfo">
	      <xsl:element name="ADDR">
		<xsl:value-of
select="attribute/atomicValue[../name='ADDR']"/>
	      </xsl:element>


Please help...



- Vishwajit.






_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail



_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail



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.