RE: [xsl] whitespace problem

Subject: RE: [xsl] whitespace problem
From: "Allistair Crossley" <Allistair.Crossley@xxxxxxx>
Date: Tue, 8 Jul 2003 16:01:32 +0100
yep this is precisely the problem I had and I am glad in a perverse way that you have had it with all processors.

i ended up with 2 solutions. Oh .. don't use tabs to separate your columns, use commas. Then if you are using some language around this like ASP for your new lines use

<xsl:text>#BR#</xsl:text> or something and then use regular expressions to replace the #BR# with \r\n.

-----Original Message-----
From: Jeni Tennison [mailto:jeni@xxxxxxxxxxxxxxxx]
Sent: 08 July 2003 15:43
To: Devon Y.
Cc: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] whitespace problem


Hi Devon,

> ...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.
[snip]
> <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 assume that this template is actually matching 'artist' elements
rather than 'artists' elements.)

I tried this with Saxon, MSXML3 and MSXML4 and it gave me the output
that I expected, namely:

Commandos       commandos.jpg   Everybody's Way 2003-07-03

You haven't told us much but the problem that you're having sounds
suspiciously similar to the problem that Allistair Crossley reported
recently (and that we weren't able to track down).

Can you fill us in on some more details: what processor you're using,
how you're invoking it, what the rest of your stylesheet looks like,
and what output you actually get.

Thanks,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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



<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Developers of QuickAddress Software
<a href="http://www.qas.com";>www.qas.com</a>
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


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


Current Thread