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/