On Thursday, July 12, 2001, at 11:48 PM, Jeremias Maerki wrote:


Hi all

Yesterday, I posted a bug report for dbXML stating that Resources
returned by XPathQueryService return no ID to the source document. Tom
Bradford explained to me, that this behaviour is by design.

I hope you, Tom, don't mind my quoting you here:

I looked through the XML:DB documentation again, to make sure I haven't
overlooked anything. This behaviour isn't documented, yet, which is a
bad thing (Please correct me if that's not the case). For XML:DB to be
widely accepted a good documentation is crucial to ensure that all
implementations work alike and users know what to expect.


A couple points here. First the API is still evolving and in fact is really due for another revision so the docs are definitely not complete. Second the functionality you are referring to is unfortunately specific to dbXML not the XML:DB API.


Maybe the functionality of the API should be that the key for the resource is always that of the originating document instead of being empty. I'm not sure about this, it might confuse people. Clearly being able to connect back to the original document is important which is why the src:key attribute was added in dbXML but how this is handled in a general case is unclear. Any suggestions on what the proper way to handle this would be?

What Tom explained to me is a fact I can accept and live with, but I'm
not fully confortable with it. When a developer writes XPath queries
he/she knows what is expected: whole documents or just subnodes. The
developer can determine if a returned ID can be used to perform an
operation such as a deletion or a store-away for later use. A big caveat
in the documentation should make the use of these IDs secure. Or was it
done this way because maybe not all XML:DB implementations are able to
return an ID on the source document as dbXML can? Or do we have to
account for the possibility of the end user to be able to enter XPath
queries? Then we would probably have to be able to analyze the XPath
statement to determine the effects.

I can see that XUpdate can be used to update (insert, update, delete
nodes) a document. But I don't see how exactly I can delete whole
documents using XUpdate. You can probably delete the root node, but does
the source document get deleted from the collection this way? Can
someone please enlighten me?


XUpdate as it stands right now isn't designed for document management. It is simply for updating the content of the documents. Document management is done using the Collection interface in the API.


Here is my use case, I'm not sure how to perform in a generic way, i.e.
without relying on dbXML and its "src:key" attribute:


Clearly we need to find a general solution for this.


"Delete all documents created in a given date range."

Where the XML instances have the following sample structure:
<doc created="2001-07-02">
    <data>...</data>
</doc>

Thanks a lot for your help.

Jeremias M�rki

mailto:[EMAIL PROTECTED]

OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch


---------------------------------------------------------------------- Post a message: mailto:[EMAIL PROTECTED] Unsubscribe: mailto:[EMAIL PROTECTED] Contact adminstrator: 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 adminstrator:   mailto:[EMAIL PROTECTED]
Read archived messages: http://archive.xmldb.org/
----------------------------------------------------------------------

Reply via email to