From: Leonard S. <sit...@uc...> - 2005-04-29 21:36:06
|
Hi, I've just started using eXist. It's looking pretty nice. Thanks for the wonderful open software! I have a question about the unique IDs that are assigned to resources. I stored a document in eXist. I can get the resource from the collection using the filename that I used when I uploaded it through the admin page. String filename = collection.getResource("filename").getId() When I do a query on the collection, for an element in the document, I can get an ID of the format of filename_#. I suppose those numbers are the unique numbers that are described in Wolfgang Meier. eXist: An Open Source Native XML Database. I was hoping that I could directly access an element of the document using the unique ID, as in collection.getResource("filename_9") That doesn't work. Are the IDs assigned only when an XQuery is done? Are the IDs unique within a collection? Is there a way to retrieve the element directly via the ID? The reason why I'm asking is that I want to store the ID somewhere else, and retrieve the element directly later on, or perhaps from a different application. For example, I want to store information about the hierarchy of the organization I work in, as an XML document. A web application will do stuff and get the ID from eXist, and store that in MySQL. Later, if someone wants to search for all the stuff in MySQL associated with part of this organization, they lookup the ID from eXist, and then query MySQL for all the stuff. Thanks for your help! ==Leonard E. Sitongia Web Engineering Group National Center for Atmospheric Research P.O. Box 3000 Boulder CO 80307 USA sit...@uc... voice: (303)497-2454 fax: (303)497-1804 |