Re: [xsl] "grouping" footnote numbers

Subject: Re: [xsl] "grouping" footnote numbers
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 17 Oct 2011 15:41:51 -0400
Hi,

Being away for a week I missed the fun thread about footnote reference numbering.

(I don't want to think about the fact that I think this is fun, assuming only that on this list I'm in good company.)

In any case, I have only one small thing to add:

On 10/11/2011 9:33 AM, was written:
xref[count(.|key('fn',@href)[1])=1]

In XSLT 2.0:


xref[. is key('fn',@href)[1]]

Cheers,
Wendell

So that's what I've got now:

<xsl:key name="fn" match="xref" use="@href"/>
...
<xsl:template match="xref">
   <a href="{@href}">
     <sup>
       <xsl:for-each-group select="key('fn', @href)" group-by="@href">
         <xsl:number level="any" count="xref[count(.|key('fn',@href)[1])=1]"/>
       </xsl:for-each-group>
     </sup>
   </a>
</xsl:template>

I hope my users will be impressed (but since they view most of what we do as magic anyway, they probably won't be). Thank you all for your help.

-- ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

Current Thread