xsl-list
[Top] [All Lists]

[xsl] counting the preceding cousins of an element

2006-06-15 00:54:52
Hi,
I am trying to get the number of preceding cousin of an element but I can't seem to work on it. I tried using the axes but I guess it could not reference the same ancestor. For example,
<chapter>
   <para>
      some text here
      <footnote>
          some text here
      <footnote>
   </para>
   <para>
       some text here
      <footnote>
          some text here
      <footnote>
      some text here
      <footnote>
          some text here
      <footnote>
   </para>
   <para>
      some text here
      <footnote>
          some text here
      <footnote>
   </para>
</chapter>
<chapter>
   ...
</chapter>
<chapter>
   ...
</chapter>

In this example, the footnote is the element and the ancestor is the chapter. How can I find the preceding::footnote[ancestor::chapter[descendant::"is the current node"]]?

Thanks,
Carlo


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>