From: <jim...@ru...> - 2006-12-14 18:17:31
|
Andrzej Jan Taramina wrote .. > Quoting Adam Retter <ada...@de...>: > > > We use implicit (id numbers) and implied relationships (collection and > > document paths) in our application. Perhaps if you could describe a scenario > > for us, we could suggest the best way to express this in eXist... > > The application we're considering already has an existing data model that > is > more or less object-oriented. Each object already has a well defined and > standardized XML representation (and XSD schemas that describe this representation). > > Rather than redoing the data model (not an appealing thought for many reasons), > I was thinking that we could just store each object's XML representation > as an > eXist document. > > But that then raises the question of how best to implement the inter-object > relationships that exist in the original OO-based data model. I'm not > sure yet, > but it might be convenient to embed these relationships inside the actual > instance documents in some cases....or to transform internal id's into > XLink > attributes that address the target document (object) in eXist at the time > of > storage, rather than building the relationship URL's at runtime when they > are > being dereferenced. I would suggest installing and firing up exist-db (use standalone version with jetty, more performant in my opinion) and just load up what XML u have now.....I avoid xlink like the plague and persist such relationships using XPATH ala schematron style....once u have your XML uploaded, check out the built in XQUERY ajax interface to understand what XPATH and XQUERY will get you for free (also easy enough to apply via _query= ala a simple http query param appended to url). you may also find that the plain Xinclude support in exist-db (provided by xml parser) provides a consistent transclusion mechanism making it easy to refactor relationships in XML. BTW, its easy to mimic this xinclude behavior off exist-db by instructing xerces to perform xinclude processing. just create xerces.properties file in your JRE /lib setting the following java system property; org.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration this will make Xinclude processing global to anything using xerces xml parser. note: also dont forget that exist-db Ant tasks make it easy to integrate 'continuous build' processes > Was basically just looking for some insight into what other implementations > have > done with respect to this. As always, the right answer for any particular > implementation is "it depends". ;-) for what it's worth, I have used svn with exist-db to great effect..solves the Document versioning and metadata issue (versioning an attribute of source control and svn properties as metadata). Though if u are just starting out with exist-db I would avoid this route, took me a year to get to somewhere reasonabley integrated. as you said...depends on dependencies and volatility no doubt. good luck, and say hi to Rick S. if he remembers me from SAIC. cheers, Jim Fuller |