Subject: Re: xsl:text
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 25 Jan 2002 17:08:54 GMT
|
> I try to hard-code one single whitespace, but it seems
> imposiible. I tried <xsl:text> </xsl:text> as well as   or   and
> even concat (as seen below) but nothing works,
all of those should work.
<xsl:template match="adlst">
<xsl:text> -AD</xsl:text>
<xsl:for-each select="adid">
<xsl:text> </xsl:text>
<xsl:value-of select="concat(' ', .)"/>
</xsl:for-each>
</xsl:template>
that should convert XXX<adlst>1</adid><adid><adid>2</adid></adlst>XXX into
XXX -AD 1 2XXX
There are five spaces in that result, the first just befpre the -
and then for each adid you get two more spaces one from the  
and one from the ' '.
Of course if you are generating HTML then those pairs of spaces will
look in the browser like a single space, but there will be two spaces in
the html file.
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- xsl:text
- Thomas Holz - Fri, 25 Jan 2002 08:57:06 -0500 (EST)
- Bryan Rasmussen - Fri, 25 Jan 2002 09:07:41 -0500 (EST)
- David Carlisle - Fri, 25 Jan 2002 12:07:39 -0500 (EST) <=
|
|