[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Accessing Variables while sorting
Hi > In the code below, how do i assign the value of SortField to > $Variable ? > <xsl:for-each select="PatientList/Patient"> > <xsl:sort select="$Variable" order="ascending"></xsl:sort> > <tr> > <td width="17%" height="30"><xsl:value-of > select="LastName"/></td> You don't--use <xsl:for-each select="PatientList/Patient"> <xsl:sort select="*[name() = ../../SortDetails/SortField]" order="ascending"></xsl:sort> <tr> <td width="17%" height="30"><xsl:value-of select="LastName"/></td> or <xsl:variable name="Variable" select="PatientList/SortDetails/SortField" /> <xsl:for-each select="PatientList/Patient"> <xsl:sort select="*[name() = $Variable]" order="ascending"></xsl:sort> <tr> <td width="17%" height="30"><xsl:value-of select="LastName"/></td> Santtu XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|