atom feed4 messages in net.sourceforge.lists.saxon-help[saxon] URI Resolver with XQuery coll...
FromSent OnAttachments
Richard SimmsOct 9, 2007 2:01 pm 
Michael KayOct 10, 2007 9:50 am 
Florent GeorgesOct 10, 2007 10:03 am 
Richard SimmsOct 10, 2007 10:52 am 
Subject:[saxon] URI Resolver with XQuery collection file
From:Richard Simms (
Date:Oct 9, 2007 2:01:09 pm

Is there a way to use the Apache catalog resolver in an XQuery that uses a collection file?

I have found that the URIResover works correctly when I use the collection function against a folder but have not been able to get the XQuery to work with a collection file.

For example, the following query works fine (all the DTDs are resolved correctly against the Apache catalog):"

for $x in collection(iri-to-uri("file:///C:/XMLFile/source?;select=*.(xml|dita);validation=strip;recurse=yes;on-error=warning;"))//title order by $x return {data($x)}

but a query like the following that points to a collection file rather than a folder returns a DTD not found error for the first xml file listed in the collection file:

for $x in collection("file:///C:/XMLFile/source/xqueryCollectionTmp.xml")//title order by $x return {data($x)}

Where the collection file looks like this:

<collection> <doc href="file:///C:/XMLFile/source/c_Welcome.xml"/> </collection>

Is this possible or do I need to do some other configuration/customization to use the Apache resolver with a collection file? I did specify the -r option on the command line (i.e., -r ) and the classpath correctly inlcudes the resolver jar and properties file.