<xapi:resourceSet xmlns:xapi="http://www.xmldb.org/xapi/ResourceSet" collectionURI="driver:/path/to/collection">
<somenode xapi:documentId="1" />
<somenode xapi:documentId="2" />
<somenode xapi:documentId="12" xapi:collectionURI="driver:/path/to/another/collection"/>
...
</xapi:resourceSet>
On Saturday, August 4, 2001, at 08:30 AM, Jeremias Maerki wrote:
What are your thoughts on adding a getResultsAsResource() method to ResourceSet? This is something we've been asked for in the dbXML project as a way to return all results as a textual XML document. Returning it as a Resource enables you to get the results in whatever form you want. This is especially handy if you just want to hand the results of the query to XSL-T. The Resource content value could look something like.
<xapi:results xmlns:xapi="http://www.xmldb.org/xapi/ResultNS" count="10" > <somenode/> <somenode/> ... </xapi:results>
Or possibly with more metadata.
<xapi:results xmlns:xapi="http://www.xmldb.org/xapi/ResultNS" count="10" > <xapi:result documentKey="1" collectionURI="driver:/path/to/collection"> <somenode/> </xapi:result> <xapi:result documentKey="2" collectionURI="driver:/path/to/collection"> <somenode/> </xapi:result> ... </xapi:results>
That's a good idea. I prefer the second variant.
Two comments: 1. To stay in line with the rest of the API "documentKey" should probably be "documentID" (because of "getID()" etc.). 2. I'd drop the "count" attribute or make it optional/informational. It may prevent the on-the-fly creation of this results XML (ideal for getContentAsSAX). "count" can always be calculated using XPath.
Jeremias Märki
mailto:[EMAIL PROTECTED]
OUTLINE AG Postfach 3954 - Rhynauerstr. 15 - 6002 Luzern Fon +41 (0)41 317 2020 - Fax +41 (0)41 317 2029 Internet http://www.outline.ch
---------------------------------------------------------------------- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ ----------------------------------------------------------------------
Kimbro Staken The dbXML Project htttp://www.dbxml.org ---------------------------------------------------------------------- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Contact administrator: mailto:[EMAIL PROTECTED] Read archived messages: http://archive.xmldb.org/ ----------------------------------------------------------------------