|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] current()
Hello all,
Is the current() function allowed in this syntax?
XML:
<person>
<account>12345</account>
<date>December</date>
<date>March</date>
<date>March</date>
<date>July</date>
<date>March</date>
<date>June</date>
<date>April</date>
</person>
XSL:
<m:month name="Jan" value="0"/>
<m:month name="Feb" value="1"/>
<m:month name="Mar" value="2"/>
<m:month name="Apr" value="3"/>
<m:month name="May" value="4"/>
<m:month name="Jun" value="5"/>
<m:month name="Jul" value="6"/>
<m:month name="Aug" value="7"/>
<m:month name="Sep" value="8"/>
<m:month name="Oct" value="9"/>
<m:month name="Nov" value="10"/>
<m:month name="Dec" value="11"/>
<xsl:variable name="months" select="document('')//m:month"/>
<xsl:for-each
select="person/date[generate-id(.)=generate-id(key('myKey', concat( account, '::', .))[1])]">
<xsl:sort select="$months[ starts-with( current(), @name ) ]/@value"
data-type="number" order="descending"/>
</xsl:for-each>
As you can see, I'm trying to sort Month names in correct
(sequential) order, but Xalan 1.2.2 (newest) tells me
"The current() function is not allowed in a match pattern!".
I assume this is simply a bug in Xalan as versions prior to 1.2.1
sort correctly, any ideas? Any work-around suggestions?
-matt
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
|

Cart








