[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Sorting RTF
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|