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

Re: xsl:text

Subject: Re: xsl:text
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 25 Jan 2002 17:08:54 GMT
adlst
> I try to hard-code one single whitespace, but it seems
> imposiible. I tried <xsl:text> </xsl:text> as well as &#x20 or &#32; 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>&#32;</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 &#32;
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

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.