![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - problem with dynamic sort and quotes in parameter value [Thread Next] Re: problem with dynamic sort and quotes in parameter valueTo: 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 " and ' 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 | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
