Altova Mailing List Archives

[xsl] recursive output numbering

From: "John D. West" <JWest@----------------------->
Date: 12/16/2001 12:47:00 PM
I need to include a number attribute in my XML output, and can't figure out
how to keep it from repeating.

The problem:
I'm using recursive templates nested 3 deep.  They work like this:

For each Employee,
    For each Crew that employee belongs to,
        For each Project that employee works on,
            Generate a previously-undetermined number of new XML elements,
each including a RowNumber attribute.

It's easy to define a variable that is incremented by the inner loop
recursive calls, so that each generated row for an Employee/Crew/Project
combination has a sequential RowNumber.  What I can't figure out is how to
make sure ALL of the generated RowNumbers are unique.  Sequential would be
nice, but not required.  Unique is required.



 XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.