RE: [xsl] Sort of footnote nodes, processing and counting

Subject: RE: [xsl] Sort of footnote nodes, processing and counting
From: "Trevor Nicholls" <trevor@xxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Feb 2006 00:33:45 +1300
Thank you Dr Kay. Somewhat abashed, I must confess that I am testing this
project in two environments: XMLSpy 2006 on my laptop and Saxon on the
repository/build server.

Saxon does *not* stack overflow on
----
<xsl:template match="footnote" mode="footnote">
<p><xsl:apply-templates select="." />  <!-- LINE 2 -->
<xsl:apply-templates />
</p>
</xsl:template>
----
but XMLSpy does.

When I first saw your expression I thought "great, I can do this in one
template after all", but of course I can't, the 'format' has to be different
for each count/from. But it now appears to be working as required - at least
when using Saxon :-)

Cheers
Trevor
 
-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx] 
Sent: Monday, 27 February 2006 10:48 p.m.
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Sort of footnote nodes, processing and counting

Firstly, I would have thought you can achieve the numbering with something
like

<xsl:number level="any" count="footnote[@level=current()/@level]"
  from="section|document|table"/>

But this seems to be very similar to what you've tried. It would be useful
if you showed us what numbering this gives and how it differs from the
numbering you want.

Secondly, the infinite recursion. I can't immediately see the reason for
this but running with -T tracing should pin it down.

Michael Kay
http://www.saxonica.com/

Current Thread