~zorba-coders/zorba/image-module-head

« back to all changes in this revision

Viewing changes to test/rbkt/Queries/zorba/xqxq/error-in-query.xq

  • Committer: Zorba Build Bot
  • Author(s): chillery+launchpad at lambda
  • Date: 2012-10-26 15:13:54 UTC
  • mfrom: (11110.1.2 move-xqxq-core)
  • Revision ID: chillery+buildbot@lambda.nu-20121026151354-ojxq78uovjc6czno
Moved XQXQ into Zorba core. Approved: Juan Zacarias, Matthias Brantner, Chris Hillery

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import module namespace xqxq = 'http://www.zorba-xquery.com/modules/xqxq';
 
2
 
 
3
declare namespace op = 'http://www.zorba-xquery.com/options/features';
 
4
declare namespace f = 'http://www.zorba-xquery.com/features';
 
5
declare option op:enable 'f:hof';
 
6
 
 
7
declare function local:url-resolver($namespace as xs:string, $entity as xs:string) {
 
8
switch($entity)
 
9
case 'schema'
 
10
  return switch($namespace)
 
11
         case 'http://www.w3.org/XQueryTest' return doc('/tmp/atomic.xsd')
 
12
         default return ()
 
13
default return ()
 
14
};
 
15
 
 
16
variable $queryID := xqxq:prepare-main-module(
 
17
  "declare namespace foo='http://test';
 
18
   declare namespace foo='http://test';
 
19
   1",
 
20
   local:url-resolver#2, ());
 
21
xqxq:evaluate($queryID)