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

whitespace problem

Subject: whitespace problem
From: "Devon Y." <vehementpetal@xxxxxxxxxxx>
Date: Tue, 08 Jul 2003 10:21:07 -0400
xsl whitespace
I've got these nodes that looks like:

<artist>
  <name>Commandos</name>
  <photo>commandos.jpg</photo>
  <song_title>Everybody's Way</song_title>
  <hash>dbs8ud9bq3ddffdf</hash>
  <bio>blah blah blah</bio>
  <buy_link>commandos.htm</buy_link>
  <sponser_name>Some Company</sponser_name>
  <sponser_url>http://www.some-company.com/</sponser_url>
  <date>2003-07-03</date>
</artist>

...and I need to turn these into text file of tab separated values, each artist element must have a line break after it. Basically I'm turning it into a .sql file. I'm having strange strange troubles though. I've done lots of transformations, but never into method='text' before, so I've never dealt with whitespace.

I've plowed through some articles at xml.com on whitespace, but nothing's working right. The examples work, but when I alter them to fit what I need, it leaves out the tab. I think the problem's in this, but I don't understand why the tabs & newline are being stripped, when they weren't stripped when I tried the example files -

<xsl:template match="artists">
 <xsl:apply-templates select="name"/>
 <xsl:text>&#9;</xsl:text>
 <xsl:apply-templates select="photo"/>
 <xsl:text>&#9;</xsl:text>
 <xsl:apply-templates select="song_title"/>
 <xsl:text>&#9;</xsl:text>
 <xsl:apply-templates select="date"/><xsl:text>
</xsl:text>
</xsl:template>

...I tried changing the xsl:apply-templates to xsl:value-of, and it didn't change the output. I'm really confused.


Dev


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus



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.