Comment 6 for bug 1173638

Revision history for this message
Juan Zacarias (juan457) wrote :

Also the way how FOTs driver is currently done it doesn't return the 2 resources it just return one sicne the url resolver is described

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/TestModules/test1' return unparsed-text('file:///D%3A/ZORBA/FOTS/2011/QT3-test-suite/prod/ModuleImport/test1-lib.xq')
    case 'http://www.w3.org/TestModules/test1' return unparsed-text('file:///D%3A/ZORBA/FOTS/2011/QT3-test-suite/prod/ModuleImport/test1collide2-lib.xq')
    default return ()
default return ()
};

So it will end the function in the first case ignoring the second case.

If we changed it to

  case 'http://www.w3.org/TestModules/test1' return ( unparsed-text('file:///D%3A/ZORBA/FOTS/2011/QT3-test-suite/prod/ModuleImport/test1-lib.xq') , unparsed-text('file:///D%3A/ZORBA/FOTS/2011/QT3-test-suite/prod/ModuleImport/test1collide2-lib.xq') )

this way it will match the expected query.

As for the current implementation since there is no way of returning 2 resources what the module does is serialize the returning sequence and return it as 1 resource. This will cause the test to pass with a wrong error message. Even though this won't be correct since the error will be caused since 1 module is paste after another making zorba break.