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

RE: Sorting RTF

Subject: RE: Sorting RTF
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 19 Nov 2004 15:11:40 -0000
xmlns saxon
If you're using Saxon 7.8 then

(a) you should be using Saxon 8.1.1

(b) you are using XSLT 2.0 and therefore don't need the xx:node-set()
function

(c) the Saxon namespace should be http://saxon.sf.net/

The most likely explanation for the "casting empty sequence" error is that
there is no @dc:date attribute - certainly, you haven't given us any
information about it, nor did you mention the dc namespace.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Paul Hebble [mailto:maceo@xxxxxxxx] 
> Sent: 18 November 2004 14:29
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Sorting RTF
> 
> 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.