This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: sorting related issue


>
>      <xsl:variable name="sortedErrorMessage">
>           <xsl:for-each select="/ErrorMessages/ErrorMessage">
>                <xsl:sort select="Name" order="ascending" />
>                <xsl:sort select="Type" order="ascending" />
>                     <xsl:value-of select="Name" />
>                     <xsl:value-of select="Type" />
>                     <xsl:value-of select="Details" />
>           </xsl:for-each>
>      </xsl:variable>
>
> I can view the value of variable and that is correctly set
>      <xsl:template match="/">
>           <xsl:value-of select="$sortedErrorMessage"/>
>      </xsl:template>
>
> and then if I add
>      <xsl:for-each select="msxsl:node-set($sortedErrorMessage)/Name">
>           <xsl:value-of select="."/>
>      </xsl:for-each>
>
Your temporary tree doesn't contain any Name elements. In fact it doesn't
contain any elements at all - it's all text. Perhaps by <xsl:value-of> you
meant <xsl:copy-of>?

A good way of debugging these things is to put in a

<xsl:copy-of select="$sortedErrorMessage"/>

to see what the tree looks like.

Mike Kay


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]