This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re:
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: Kathryn dot Grant at freight dot fedex dot com
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 19 Aug 2002 18:40:25 +0100
- Subject: [xsl] Re:
- Organization: Jeni Tennison Consulting Ltd
- References: <113A7A0D1F47D511B92E00D0B7E03DAB0235BA07@pmail02.vikingfreight.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Kathryn,
> I really appreciate your answer. Unfortunately, I tried it and it
> didn't work. The browser doesn't give me any kind of error message.
> The HTML in the stylesheet shows up fine, but none of the XML data
> shows up. When I take out the parameter and just type in the
> attribute, e.g.,
>
> <xsl:for-each select="//brpfields/record[@S3G >'0']">
> <xsl:sort data-type="number" select="@S3G"/>
>
> The transformation works correctly.
Looking through the code you sent before, I think that the problem
might be that you're setting the parameter with:
>> <xsl:param name="param1" select="S3G"/>
which sets the parameter to the value of the S3G element child of the
root node, whereas you want:
<xsl:param name="param1" select="'S3G'" />
^ ^
which sets the parameter to the *string* "S3G". Then you can use what
Dimitre suggested:
> <xsl:for-each select="//brpfields/record[@*[name()=$param1] >'0']">
> <xsl:sort data-type="number" select="@*[name()=$param1]"/>
> ..........
> </xsl:for-each>
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list