xsl-list
[Top] [All Lists]

[xsl] new increment question

2006-10-02 19:32:41

Michael's previous answer helped a lot.  Thanks.

The functionality I would like to achieve now is
similar to the first.  The updated XML structure is
the following:

<a>
  <b>
    <c>
      <d>
         <e/>
         <f/>
         <g/>
      </d>
    </c>
    <c>
      <d>
         <e/>
         <f/>
         <g/>
      </d>
    </c>
  </b>
  <b>
    <c>
      <d>
         <e/>
         <f/>
         <g/>
      </d>
    </c>
    <c>
      <d>
         <e/>
         <f/>
         <g/>
      </d>
    </c>
  </b>
</a>
   
Here, I would like to output an incremental value for
each e,f, or g.

In the case above,

first e: 1
first f: 2
first g: 3
second e: 4
second f: 5
second g; 6

There will be situations where not all three elements
(e,f,g) are within d.

So if there is only e in the first d and e,g in the
second d, the desired output will be:

first e: 1
second e: 2
g: 3

The output value should reset to 1 for every new a
encountered.

Thank you.

Jonathan Marenus

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--~------------------------------------------------------------------
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>