incubator-empire-db-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele <>
Subject re: XPath-Persistence
Date Tue, 07 Jun 2011 20:01:51 GMT
Hi Christian,

I have no real experience with XML databases, but I can imagine that you may face similar
problems when you have to map XML-Data to Java objects. As long as you work with full entities
JAXB might be a solution, but for arbitrary XPath and XQuery results it probably won't help.

Also I like the idea of an API based approach to assemble XPath and XQuery expressions similar
to our DBCommand object.
I'd be curious to see how that can work.

So if you need any assistance don't hesitate to ask.

Finally I would like to know what XML Database are you working with?
Can you give us a short example of what problem (and possibly how) you want to solve?

Looking forward to hearing from you.


Christian Albrecht wrote:
> from: Christian Albrecht []
> to:
> re: Re: XPath-Persistence
> Hi,
> what I wanted to do was to create string-free XPath expressions.
> Therefore I need at least the information about possible element or
> attribute names in the database, the XPath grammar in Java objects and
> if possible an information about return types. Shure I can just write
> plain-text XPath queries, but that defeats the whole purpose of
> compile-time safety, as it is enforced with empire-db.
> -----Urspr√ľngliche Nachricht-----
> Von: "Andreas Fink" <>
> Gesendet: Jun 7, 2011 3:07:41 PM
> An:
> Betreff: Re: XPath-Persistence
> >Hi Christian.
> >
> >If you want to query a xml-db with xpath or xquery why would you need
> a layer like empire-db at all?
> >All xml-db's i know (xindice, exist, ...) have at least support for
> xpath built in.
> >The only useful functionality would be an abstraction over the vendor
> specific code like building connections to the db and firing queries in
> case you need to switch implementations frequently (This requirement is
> a myth IMO ;-).
> >
> >Cheers,
> >Andi.
> >
> >On Jun 7, 2011, at 2:38 PM, Christian Albrecht wrote:
> >
> >> I used empire-db for several projects now and I think it's a great
> tool. For a recent project however, I had to talk to an XML-database. I
> was wondering if I could take the principles and ideas of empire-db and
> adapt them for that purpose. One could use a dtd or xml-schema instance
> to create the database class and write the queries with XPath or XQuery
> (which would probably be a Goliath project, since it's quite complex).
> However XPath is a W3C-recommendation with a fixed simple grammar, so
> it should be quite simple to map this grammar to the Java object model
> and with this beeing able to create string free XPath expressions.
> Metadata about elements and attributes can also be represented in a
> similar fashion as empire-db already does it.
> >> Let me know your opinions!
> >
> >--
> >web:
> >mail:
> >
View raw message