Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Smartest way to sort data with XSLT and display it

From: "Omega375" <safaridonna@-----.--->
To: NULL
Date: 8/2/2005 2:18:00 AM
Hello.

I'll first start off by showing the structure of my xml-file.

<root>
  <node path="X">
         More nodes containing data
  </node>
</root>


Let's see this like books;

<books>
  <book author="X">
         More nodes containing data
  </book>
</books>

What I now want to do (with XSLT) is to display all the books by the
author, eg;

JK Rowling
  * Harry Potter 1
  * Harry Potter 2

Tolkien
  * LOTHR 1
  * LOTHR 2

...


This can easly be done by using xpath "books/book[@author='JK
Rowling']".
This is where my problem is;
I don't knwo which authors that do exist in the xml-file. So somehow I
have to find all the names of the authors and then pass the names, one
by one, to the xpath.

I don't think adding

<authors>
  <author>Name</author>
  ...
</authors>

to the xml-file is an option.

I sure hope someone knows how to solve this problem.

Thank you in advance!



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