Error caused by empty-sequence in parameter
Failing tests:
generate-id-017, generate-id-015
Query:
import module namespace xqxq = 'http://www.zorba-xquery.com/modules/xqxq'; declare namespace resolver = 'http://www.zorba-xquery.com/modules/xqxq/url-resolver'; declare namespace op = 'http://www.zorba-xquery.com/options/features'; declare namespace f = 'http://www.zorba-xquery.com/features'; declare option op:enable 'f:hof'; declare function resolver:url-resolver($namespace as xs:string, $entity as xs:string) { switch($entity) case 'module' return switch($namespace) case 'http://www.w3.org/QT3/copy' return unparsed-text('file:///home/juanza/FOTS/2011/QT3-test-suite/fn/id/copy.xq') default return () default return () }; variable $queryID := xqxq:prepare-main-module(' xquery version "3.0"; import module namespace copy="http://www.w3.org/QT3/copy"; let $att := (//@*)[1] return generate-id(copy:copy($att)) eq generate-id($att) ' , resolver:url-resolver#2, ()); variable $contextItem := doc("file:///home/juanza/FOTS/2011/QT3-test-suite/docs/works-mod.xml"); xqxq:bind-context-item($queryID, $contextItem); xqxq:evaluate($queryID)
Error:
Expected result: . Found error XPTY0004 - The query (2d559bd2-cfe3-4338-bba8-732bf3a206f6) evaluated using xqxq:evaluate raised an error at line 12 column 1: The query (fe7536cb-df4f-4aaa-9fe7-42a85b4aa929) evaluated using xqxq:evaluate raised an error at line 6 column 13: sequence of more than one item can not be promoted to parameter type node(*, xs:anyType*)? of function generate-id()
Error caused by sequence in parameter
Failing test:
generate-id-018
Query:
import module namespace xqxq = 'http://www.zorba-xquery.com/modules/xqxq'; variable $queryID := xqxq:prepare-main-module(' xquery version "3.0"; declare namespace ma = "http://www.example.com/AuctionWatch"; declare namespace xlink = "http://www.w3.org/1999/xlink"; declare namespace anyzone = "http://www.example.com/auctioneers#anyzone"; declare namespace eachbay = "http://www.example.com/auctioneers#eachbay"; declare namespace yabadoo = "http://www.example.com/auctioneers#yabadoo"; generate-id(//*) eq generate-id(/*)' ); variable $contextItem := doc("file:///home/juanza/FOTS/2011/QT3-test-suite/docs/auction.xml"); xqxq:bind-context-item($queryID, $contextItem); xqxq:evaluate($queryID)
Error:
Expected result: . Found error XPTY0004 - The query (2d559bd2-cfe3-4338-bba8-732bf3a206f6) evaluated using xqxq:evaluate raised an error at line 12 column 1: The query (fe7536cb-df4f-4aaa-9fe7-42a85b4aa929) evaluated using xqxq:evaluate raised an error at line 6 column 13: sequence of more than one item can not be promoted to parameter type node(*, xs:anyType*)? of function generate-id()
Might be a legal answer. Can you please check ?