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

groupi-by statements?

Subject: groupi-by statements?
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Wed, 18 Aug 2004 11:39:02 -0400
groupi
Here's another problem:

      <xsl:for-each-group select="current-group()"
	        group-by="substring(mods:originInfo/mods:dateIssued,1,4)">

One of the good things about the data in question is it's recursive. It's also a problem in this context. The year that is critical to this processing can be represented like:

mods:originInfo/mods:dateIssued (as above)
mods:relatedItem/mods:originInfo/mods:dateIssued (the date issued for a book, where the main record is a chapter)
mods:relatedItem/mods:part/mods:date (the sort of date you may have with a journal article; associated with the issue)


If I have more than one of these expressions in my group-by statement, I get a "A sequence of more than one item is not allowed as the first argument of substring()" error.

So how should I handle this? Should I define a function -- called, say, bib:year -- that I can call like so?

      <xsl:for-each-group select="current-group()"
	        group-by="bib:year()">

Bruce

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.