|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Filtering sequences of atomic types
Dear all,
I'm trying to filter a sequence using a predicate that involves a node set.
What I actually want to do is something like
$string-sequence[. = //@xml:id]
i.e. get all items of a sequence that occur as an xml:id attribute somewhere
in the document.
As that gives me the error message "XPTY0020: Cannot select a node here: the
context item is an atomic value" (with Saxon 9.1), I tried
$string-sequence[. = (for $n in (//@xml:id) return xs:string($n))]
or even
('foo', 'bar')[. = (for $n in (//@name) return 'foo')]
where the latter should actually return something like ('foo', 'foo', ...),
and ('foo', 'bar')[. = ('foo', 'foo')] works, of course.
My current workaround is translating the string sequence to a sequence of text
nodes, but why doesn't it work with a sequence of atomic types?
Thanks for any help,
Christoph
--
Christoph Lange, Jacobs Univ. Bremen, http://kwarc.info/clange, Skype duke4701
|
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
|

Cart








