[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Sorting RTF

Subject: Sorting RTF
From: Paul Hebble <maceo@xxxxxxxx>
Date: Thu, 18 Nov 2004 08:29:23 -0600
paul hebble
Hi all,

Apologies in advance if this is an FAQ (and I don't see how it couldn't
be), but several days of searching the web, usenet, and mailing lists
have not turned up a solution.

I'm using Saxon 7.8 with these namespaces:
	xmlns:exsl="http://exslt.org/common"
	xmlns:saxon="http://icl.com/saxon"
	extension-element-prefixes="saxon exsl"

Here's what I want to do:

<xsl:variable name="items">
	<xsl:apply-templates select="*"/>
</xsl:variable>
<xsl:for-each select="exsl:node-set($items)/*">
	<xsl:sort select="xs:dateTime(@dc:date)" order="descending"/>
	<xsl:copy-of select="."/>
</xsl:for-each>

Saxon responds to this with this error on the for-each line:
"An empty sequence is not allowed as the value in 'cast as' expression".

I know $items isn't empty because if I replace the for-each with a
copy-of, I get the expected nodes.  I have tried setting my stylesheet's
version to 1.0, 1.1, and 2.0, and I have also tried these:
	select="$items"
	select="$items/*"
	select="exsl:node-set($items)"
	select="saxon:node-set($items)"
	select="saxon:node-set($items)/*"

The last two give me this error:
"No function found matching saxon:node-set with one argument"
Which makes me think that maybe xmlns:saxon is wrong, but I haven't seen
any others in my searching.

Any help would be appreciated.

-- 
	Paul

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.