xsl-list
[Top] [All Lists]

Re: implementation of xsl:strip-space. RESOLUTION

2003-01-27 18:34:48
Hello Steve,

in general it's better to use

<xsl:variable name="imagefilename" select="normalize-space(.)"/>

instead of

<xsl:variable name="imagefilename"><xsl:value-of select="normalize-space(.)"/></xsl:variable>.

You won't have whitespace characters then and a node set or here a string, otherwise you have a result tree fragment, which must be converted into a string when used.

For more information:
http://www.w3.org/TR/xslt#section-Result-Tree-Fragments

Regards,

Joerg

Wright, Steve wrote:
Thanks Sherzod and Joerg for your suggestions.. It turns out that the
carraige returns were coming in through the varialbe 'imagefilename' that I
was setting (below), so by using: <xsl:variable
name="imagefilename"><xsl:value-of select="normalize-space(.)"
/></xsl:variable>, it works now.

Thanks again for your thoughts and comments.

-steve

p.s. I'm using the XT processor.


-----Original Message-----
From: Sherzod Ruzmetov [mailto:xslt(_at_)handalak(_dot_)com]
Sent: Monday, January 27, 2003 12:15 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] implementation of xsl:strip-space


    :<a>
    :<xsl:attribute name="href">
    :<xsl:text>javascript:bigFig('</xsl:text>
    :<xsl:value-of select="$imagelabel" />
    :<xsl:text>','../fig/big/</xsl:text>
    :<xsl:value-of select="$imagefilename" />
    :<xsl:text>','</xsl:text>
    :<xsl:value-of select="$imagelabel" />
    :<xsl:text>');</xsl:text>
    :</xsl:attribute>

Ok, don't use <xsl:attribute..>! Simply hard code the attributes.
It should work afterwards as expected!
http://www.handalak.com/styles/global.xsl
is the actual style sheet used by http://vs.handalak.com. Find the rules for
"deflist"
(definition lists). These are the lists that expand and collapse on mouse
click.

Let's see if it helps.

sherzod


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



<Prev in Thread] Current Thread [Next in Thread>