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

Re: grouping and context (?)

Subject: Re: grouping and context (?)
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sat, 28 Aug 2004 09:25:31 +0100
Re:  grouping and context (?)
Hi Bruce,

> Template as it exists now (the top-level element for the bib record
> would be <mods ID="doe99a">):

If I understand correctly, I think that you want to put a variable in
the top level of the <xsl:template> (before you start doing any
<xsl:for-each-group> stuff) that holds the <db:citation> element
itself. Then you can get to the <db:biblioref> element that you
started from immediately. Something like:

<xsl:template match="db:citation[$citation-class='author-year']">
  <!-- store citation for future use -->
  <xsl:variable name="citation" select="." />
  ...
  <!-- group and sort by authors-string -->
  <xsl:for-each-group select="$bibref" group-by="bib:grouping-key(.)">
    <xsl:sort select="current-grouping-key()"/>
    <!-- within an authors group, sort by year -->
    <xsl:for-each-group select="current-group()"	group-by="mods:year">
      <xsl:sort select="current-grouping-key()"/>
      <xsl:for-each select="current-group()">
      
        ... use $citation here to get back to the original citation ...

   	  </xsl:for-each>
    </xsl:for-each-group>
  </xsl:for-each-group>
</xsl:template>

Does that help?

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

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.