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

RE: xsl:function

Subject: RE: xsl:function
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Tue, 18 Jun 2002 14:49:07 +0100
xsl 32
The syntax is tripping you up again - because its a string you need to
enclose it in single quotes:

<xsl:variable name="x"
	expr="'&#32;&#32;&#32;&#32;&#32;.....'">
            ^                              ^

cheers
andrew



this works nicely as
<xsl:value-of
select="concat(TITLE,substring('&#32;&#32;&#32;&#32;etc...',
							   1, 60 -
string-length(TITLE)))"/>

but as
<xsl:variable name="x"
	expr="&#32;&#32;&#32;&#32;&#32;.....">
<xsl:value-of select="concat(TITLE,substring($x,1, 60 -
string-length(TITLE)))"/>

no extra spaces are added.
do i need to go read Mike's book again?

>
> Unless your fixed length fields are really long it's easier to do
> padding just using
> concat($theString,substring($x, 1, $fixedLength -
> string-length($theString)))
> where $x is a sufficiently long string of space characters.
>
> David
>



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





---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.350 / Virus Database: 196 - Release Date: 17/04/2002
 

 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-2011 All Rights Reserved.