Project

Profile

Help

How to construct item of type node() from AtomicValue

Added by Michael Staal-Olsen almost 4 years ago

I have constructed a list of distinct integers and then converted this into a Sequences object which wraps a SequenceIterator containing the strings. However, when I return this as a Sequence object and try to let the Saxon processor parse it, I get this error: Type error evaluating ($bygningerEt) in xsl:variable/@select on line 68 column 127 of ByggeskadeforsikringBSFSResponse.xslt: XPTY0004: The required item type of the document-order sorter is node(); the supplied value "1" is an atomic value

So it would seem that I should somehow convert the Sequence into something that mimics a node() in the XSLT 1.0 model. Is this possible in some generic way (in Java)?


Replies (1)

RE: How to construct item of type node() from AtomicValue - Added by Michael Kay almost 4 years ago

We need to see why Saxon thinks the extension function is expected to return nodes. Perhaps you declare this as the return type but the actual return value is different?

Rather than changing the extension function to return nodes, you should be changing the stylesheet to expect atomic values; to help you with that, we need to see the stylesheet.

    (1-1/1)

    Please register to reply