XQXQ feature request: custom schema uri resolver

Bug #903797 reported by Dennis Knochenwefel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Critical
Juan Zacarias

Bug Description

It should be possible to validate xdm instances against schemas which are stored in collections or dynamically created. Therefore, a mechanism is needed to tell the resolver before compiling and XQXQ module how to find these schemas.

This could be implemented using HOFs.

Example:

declare function schema-uri-resolver($namespace as xs:string, $at-hints as xs:string*) as element(xs:schema)? {
    (: create/fetch xml schema :)
    xqddf:collection(...)//xs:schema[@targetNamespace=$namespace]
};

let $module := xqxq:prepare-main-module("import schema namespace test = 'http://test'; validate { <test:test /> }", schema-uri-resolver#2 )
return
   xqxq:evaluate($module)

Tags: xqxq

Related branches

Changed in zorba:
milestone: 2.2 → 2.5
Changed in zorba:
importance: Undecided → Medium
importance: Medium → High
Changed in zorba:
milestone: 2.5 → 2.7
Changed in zorba:
milestone: 2.7 → 2.8
importance: High → Critical
Chris Hillery (ceejatec)
Changed in zorba:
status: New → Fix Committed
Changed in zorba:
milestone: 2.8 → 2.9
Chris Hillery (ceejatec)
tags: removed: schema-uri-resolver
tags: removed: validation
Chris Hillery (ceejatec)
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.