Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Sorting XSLT output items

From: Jure Sah <dustwolfy@-----.--->
To: NULL
Date: 3/1/2009 8:18:00 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Honnen pravi:
>>>   <xsl:apply-templates select="document('file1.xml')/foo/bar |
>>> document('file2.xml')/foo/bar">
>>>     <xsl:sort select="dateElement"/>
>>>   </xsl:apply-templates/>
>>
>> I can't use that, my files are defined in the XML file I am processing.
>>
>> Any additional ideas?
> 
> Nevertheless you should be able to process the union of nodes in those
> documents and sort them. But you keep us guessing, show us your XML
> input(s) and the result you want to produce, then we can suggest a way
> how to solve that.

My code is available here:
http://dustwolf.ctrl-alt-del.si/downloads/XSLTaggregator_src.zip

As the name says, the code is a RSS Aggregator. Picks the URLs of the
RSS feeds to combine from an XML file and outputs the resulting feed.
Everything works fine, except the results are not sorted by date.

The code goes a little like this:
 <xsl:for-each select="feed:rss2">
  <xsl:variable name="myURL" select="." />
  <xsl:for-each select="document($myURL)/rss/channel/item">

..that is the two nested "for-each"es.

Any ideas?

Thanks.. really. :)

LP,
Jure
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJqt9jB6mNZXe93qgRApx7AJ9ZV5a82giJvMzw/857+KlOaFjO6QCgomZ7
4yAoOfSa7GSdnfIQH2YbtT8=
=HeXO
-----END PGP SIGNATURE-----


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