XQuery imports using catalog
Posted: Tue Feb 09, 2010 4:37 am
We've got a backend system that can properly resolve XQuery imports and would like to use xml catalogs to do a testing resolution is there a way to properly use the XML Catalogs feature of oxygen to do this.
For example I have a file in an eclipse project at
Project1/my/xquery/file.xql
and a module at
Project2/my/xqm/my.xqm
I want to put a catalog at
Project2/catalog.xml
that can reference the xqm when doing operations in file.xql
file.xql looks like
I would like to use a catalog like
however neither the system or public is matching and yes this catalog is added as a catalog in the oxygen preferences.
Thank you for your help Paul Ryan
For example I have a file in an eclipse project at
Project1/my/xquery/file.xql
and a module at
Project2/my/xqm/my.xqm
I want to put a catalog at
Project2/catalog.xml
that can reference the xqm when doing operations in file.xql
file.xql looks like
Code: Select all
xquery version "1.0";
import module namespace my="urn:my-functions" at "customprotocol:///files/*/xqm/my.xqm";
Code: Select all
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<public publicId="urn:my-functions"
uri="my/xqm/my.xqm"/>
<system systemId="customprotocol:///files/*/xqm/my.xqm"
uri="my/xqm/my.xqm"/>
</catalog>
Thank you for your help Paul Ryan