Splitting xqueries into modules

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Splitting xqueries into modules

Jonas Lundberg
I have a basic question...
I have made a very large xquery file that I wish to split into smaller modules.
I try to import them like this:
import module namespace
attachments="http://shapecms.sourceforge.net/xquery/attachments" at
"attachments.xqm";

However, my system looks in the wrong place for it. Where do I specify
the location of the modules? I get the following error message:
org.apache.cocoon.ProcessingException: XMLDBException occurred: error
found while loading module attachments: source for module
http://shapecms.sourceforge.net/xquery/attachments not found: cannot
read module source from file at C:\WINDOWS\system32\attachments.xqm:
org.xmldb.api.base.XMLDBException: error found while loading module
attachments: source for module
http://shapecms.sourceforge.net/xquery/attachments not found: cannot
read module source from file at C:\WINDOWS\system32\attachments.xqm

Hans


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: Splitting xqueries into modules

Pierrick Brihaye
Hi,

Jonas Lundberg wrote:
> I have a basic question...
> I have made a very large xquery file that I wish to split into smaller modules.
> I try to import them like this:
> import module namespace
> attachments="http://shapecms.sourceforge.net/xquery/attachments" at
> "attachments.xqm";

Use canonical URIs like this :

if the module is in your DB : xmldb:exist:///db/path/module.xqm
if the module is in your file system : file:///C:/path/module.xqm
if the module is available through http : http://server/path/module.xqm.

Right now, I wouldn't count on relative URIs...

Cheers,

p.b.



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open