incubator-empire-db-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Fink <>
Subject Re: XPath-Persistence
Date Tue, 07 Jun 2011 13:27:40 GMT
Now i get it!
For a first try, writing a new module for querydsl ( ) might
be a good idea...


On Jun 7, 2011, at 3:19 PM, Christian Albrecht wrote:
> 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
>> 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 ;-).
>> 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!


View raw message