Project

Profile

Help

treat as issue?

Added by Anonymous over 19 years ago

Legacy ID: #3279534 Legacy Poster: marcvc (marcvc)

Michael, Using Saxon 8.5, we notice some unexpected behaviour with "treat as". The following query (for demonstration purpose only) reproduces the issue (use the BIDS.xml from the XQuery use cases): for $b in doc("BIDS.xml")//BIDS let $b := $b/BID return if($b instance of element()) then ($b treat as element()) else () Results in the following error: XTTE0570: A sequence of more than one item is not allowed as the value in 'treat as' expression Thanks, Marc


Replies (1)

RE: treat as issue? - Added by Anonymous over 19 years ago

Legacy ID: #3279890 Legacy Poster: Michael Kay (mhkay)

Thanks for reporting this. I think you're using a different version of the data table: to reproduce this I had to change the query to for $b in doc("../qr/bids.xml")//bid_tuple let $b := $b/bid return if($b instance of element()) then ($b treat as element()) else () I have logged the bug and a source fix at https://sourceforge.net/tracker/index.php?func=detail&aid=1251869&group_id=29872&atid=397617 This one was a very simple coding error. Michael Kay

    (1-1/1)

    Please register to reply