[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

What's wrong with this key?

Subject: What's wrong with this key?
From: Ferdinand Soethe <xsl-list@xxxxxxxxxx>
Date: Wed, 24 May 2006 14:12:36 +0200
soethe
I'm currently using keys with Xalan to group course-data by week of the year.

<xsl:key name="WosNachWoche" match="//KURS[VERANART='Wochenendseminar' and not(AUSFALL)]"
        use="datetime:weekInYear(BEGINNDAT))" />

Now I need to enhance grouping to work with courses from different
years, so I figured I'd just need to extend the use-term like this:

<xsl:key name="WosNachWoche" match="//KURS[VERANART='Wochenendseminar' and not(AUSFALL)]"
        use="concat(datetime:weekInYear(BEGINNDAT),':',datetime:formatDate(BEGINNDAT,'y'))" />

Unfortunately this isn't working for some reason I don't understand.
For quick testing I use this template


<xsl:template match="/">
    <xsl:for-each select="key('WosNachWoche',//*)">
        <xsl:message>
            <xsl:value-of select="TITELKURZ"/>
        </xsl:message>
    </xsl:for-each>
</xsl:template>

and found that the second use-term gives me NO results. Exploring
further it seems like as soon as I use concat in the use-expression I
stop getting any results.

Any ideas? What is the problem and how can I assemble a key with
weeknumber and year?

Thanks for any help,

Ferdinand Soethe

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.