Hello,
We are evaluating moving from an RDBMS (Oracle), to BaseX as much of our source data originate in XML files and converting to tables in a relational schema is painful. In general BaseX looks great!
However, one thing that we lose is referential integrity, and the ability to validate data in one XML file that is referring to data in another. Are there any possibilities within BaseX or an additional module that can do this?
For example:
* Can we validate using a schema that applies across a collection of documents, rather than just one?
* Can we use Schematron (which looks cool) to apply its inteRnal XPaths to the entire collection of documents?
* Or both?
* Something else?
We could try using XLinks, but that would involve changing our XML data/structure, and my understanding is that BaseX doesn't support (let alone validate) them, anyway.
A situation I have in mind is something like (very, very simplified):
A.xml
<object id="1" name="One">
</object>
B.xml
<object id="2" name="Two">
</object>
X.xml
<mapping object_from_id="1" object_to_id="2" />
Is there any way to ensure that when X.xml is added to the database that the object IDs that it is referring to actually exist in the database too?
I would also like to be able to ensure that all of the <object>s in the database have unique id attributes. A schema can do this within a file, but how can I ensure that when a new object xml file is added that it is not using an ID that already exists?
Thanks for any answers,
Luke