My application supports several different forms, each representative of a different XML Schema. A user can add any one of these forms to the same collection in an exist db. Therefore, without being able to depend on location to indicate what XML Schema applies to a particular file, I need a mechanism to store additional metadata separate from the XML file itself.
I need to store some additional information about each file created, but it does not belong as part of the XML itself. Just as an image supports storing metadata about its size, etc. I need to store metadata about a file's author, type, title, etc. Please point me in the right direction on how to achieve this. |
Hi, On Jun 10, 2009, at 11:06 AM, stacyladnier wrote: > > My application supports several different forms, each > representative of a > different XML Schema. A user can add any one of these forms to the > same > collection in an exist db. Therefore, without being able to depend on > location to indicate what XML Schema applies to a particular file, > I need a > mechanism to store additional metadata separate from the XML file > itself. > > I need to store some additional information about each file > created, but it > does not belong as part of the XML itself. Just as an image > supports storing > metadata about its size, etc. I need to store metadata about a file's > author, type, title, etc. > > Please point me in the right direction on how to achieve this. standards for this like JSR 170 (content repositories, the first version which uses XPath). Since you have the eXist db, you could put a metadata document alongside the actual document. It must have a different schema -- or the same elements would be returned in queries that use collection(). my-doc.xml my-doc-meta.xml and the "my-doc-meta.xml" had the metadata. If the ...meta.xml documents all looked something like: <doc-meta> <editor>me</editor> <last-update>2009-01-01</last-update> </doc-meta> but if the two had the same elements, and you made queries like for $x in collection('/docs')//editor You would get data from both the actual and metadata docs. So, you might have to put them in two different collections. In your XForms, you can group multiple actions together in the trigger element so you can make submissions for both the doc and the meta doc. Anyway, from here I can't say what the right direction is. The eXist list also may be reluctant to advise you on architectural matters. But I am sure there are ways to do this effectively. Good luck, Hank Hank Ratzesberger NEES@UCSB Institute for Crustal Studies, University of California, Santa Barbara 805-893-8042 -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by stacyladnier
Like Hank said, you can store the metadata in another document, and link the document to the metadata based on the document name. If possible, I would just put the metadata in the same document, as this will make your code simpler for most operations. Alex |
Free forum by Nabble | Edit this page |