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 ''
return switch($namespace)
case 'http://www.w3.org/fots/unparsed-text/text-plain-utf-16be-bom-lines.txt'
return fn:unparsed-text('/home/spungi/work/zorba/w3c_repo/2011/QT3-test-suite/fn/unparsed-text/text-plain-utf-16be-bom-lines.txt','utf-8')
default return ()
default return ()
};
variable $queryID := xqxq:prepare-main-module('
xquery version ''3.0'';
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'';
fn:unparsed-text-lines("http://www.w3.org/fots/unparsed-text/text-plain-utf-16be-bom-lines.txt") ! string-length(.)'
, resolver:url-resolver#2, ());
xqxq:evaluate($queryID)
Additional info about the problem: as you can see from the name of the file it contains UTF-16 characters,
yet the encoding is said to be utf-8.
According to the spec, in this case err:FOUT1190 should be raised.