xsl-list
[Top] [All Lists]

[xsl] keys and collections

2012-06-21 10:37:57
Dear XSLT List,

Is it possible to use a key with a collection, along the lines of:

<xsl:variable name="allInput" 
select="collection('file:///path/?select=*.xml')/text/*"/>
<xsl:key name="linebyfolio" match="line" use="@folio"/>

And then, later:

key('linebyfolio',$folio,$allInput)

Using <oXygen/> 13.2 (configured to use Saxon-PE 9.3.0.5), this generates an 
error to the effect that: "A sequence of more than one item is not allowed as 
the third argument of key() (<title/>, <line/>, ...)." The children of the 
<text> elements in the collection are, indeed, <title> and <line> elements. 
Removing the "/text/*" from the path doesn't help; the error is then: "A 
sequence of more than one item is not allowed as the third argument of key() 
(document-node(), document-node(), ...)." I think I understand why this might 
be an error, but I seem to have a blind spot in figuring out how to work around 
it.

Thanks,

David
djbpitt(_at_)gmail(_dot_)com


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>