Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: problem with dynamic sort and quotes in parameter value

From: "Yan Leshinsky" <yanl@------.---------.--->
To: NULL
Date: 5/6/2004 5:32:00 PM
I think you are trying to pass an expression, not a value as a parameter. If 
I'm correct,  this is impossible - XSLT doesn't support second order 
fuctions.
Yan

"Kai Cohrt" <kuewchen@g...> wrote in message 
news:59e96733.0405061552.454a3421@p......
> Hi there,
>
> I tried to find a solution on the newsgroup but even though lots of
> threads look at similar problems I could not find a solution.
>
> I have a xsl sheet that works fine this way:
>
> ...
> <xsl:variable name="rtf-sorted-nodeset">
> <xsl:for-each select="/Objects/SingleObject">
>  <xsl:sort 
> select="Attributes/Attr[DisplayName='Description']/DisplayValue"/>
>  <xsl:copy-of select="."/>
> </xsl:for-each>
> </xsl:variable>
>
> <!-- convert RTF to node-set -->
> <xsl:variable name="sorted-nodeset"
> select="msxsl:node-set($rtf-sorted-nodeset)/*"/>
> <xsl:template match="/">
> ...
>
> But if I want to pass in that sort value as parameter value I get into
> trouble with the 'Description' part of the XPath expression. I tried:
>
> <xsl:param name="paramSortAttr1"
> select='"Attributes/Attr[DisplayName='Description']/DisplayValue"'>
>
> and
>
> <xsl:param name="paramSortAttr1"
> select="'Attributes/Attr[DisplayName='Description']/DisplayValue'">
> and all kind of &quot; and &apos; combination.
>
> In the sort section I try to get the param value with
> <xsl:sort select="*[name() = $paramSortAttr1]"/>
>
> But like I said, the second approach does not work.
>
> Can anybody give me an idea what is wrong?
>
> Thank you very much,
> Kai 




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent