Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] grouping list items by attribute

From: Lynn Alford <lynn.alford@---------->
To:
Date: 10/3/2005 11:42:00 PM
Given this as the input



<tx.list style="ID1c6">
          <tx.li level="0" number="1.   ">
            <tx.p style="ID1a2">List1</tx.p>
          </tx.li>
          <tx.li level="0" number="2.   ">
            <tx.p style="ID1a2">List2</tx.p>
          </tx.li>
          <tx.li level="1" number="7    ">
            <tx.p style="ID1a2">Sublist 1</tx.p>
          </tx.li>
          <tx.li level="1" number="7    ">
            <tx.p style="ID1a2">Sublist 2</tx.p>
          </tx.li>
          <tx.li level="1" number="7    ">
            <tx.p style="ID1a2">Sublist 3</tx.p>
          </tx.li>
          <tx.li level="0" number="3.   ">
            <tx.p style="ID1a2">List3</tx.p>
          </tx.li>
        </tx.list>

The preferred outcome would be



<ol>
          <li>List1</li>
          <li>List2</li>
          <ul>
                  <li>Sublist 1</li>
            <li>Sublist 2</li>
            <li>Sublist 3</li>
          </ul>
          <li>List3</li>
        </ol>

My basic problem is I can't quite figure out how you can use an increase in
level to trigger the start of a new list.  Especially when the lists may be
nested much deeper and any level may be either ordered or unordered
lists.  Siblings at the same level I can do easily enough.

Lynn



Lynn Alford                             Tel     (07) 47 81 6256
ITR                                             Email:  imla@xxxxxxxxxx
JCU QLD 4811 Australia                  ICQ: 64096907
MSN: nicarra60@xxxxxxxxxxx              Y!: nicarra60

'I think an "uncatched exception" deserves three bug reports: one for the
exception, one for not catching it, and one for abuse of the English
language.'  Michael Kay


transparent
Print
Mail
Like It
Disclaimer
.

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 www.altova.com/list/index.html. 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.

.
.

transparent

transparent