From: Ralf J. <ral...@gm...> - 2010-10-25 14:58:19
|
Hi, > xdb:store works above eXist-db's collection mechanism. Validation can > be enabled on a per-collection basis, you would use a catalog file to > make the locations of the dtd's available to eXist-db. > I suspect that once you split your document into smaller parts then it > is no longer valid with respect to your DTD so that makes sense. If > you are going to split up, then I would recommend modifying your DTD > to support that also. > > > If you have validation working correctly you should not need to turn > it on and off here, if you modify your dataset, i.e. by splitting > documents up into smaller fragment documents, then you will also need > to adjust your DTD or create new DTD's to support this. The extracted document is an exact subset of the existing one... like this: <list><item/><item/><item/></list> The DTD describes the "list", and I store the "item"s. So, their structure is already described in the DTD. Storing one of the items manually using the Java Client works fine. However, my problems is that I do not know how to tell the parser which DTD to use. I added the DTDs to the catalog so that I could add them with the Java Client, and when I store a file beginning with <!DOCTYPE item SYSTEM "list.dtd" > (where "list.dtd" contains the definition of the full list, which of course includes the items) that works. But of course the fragment I save sing XQuery lacks that DOCTYPE, and since it is not an actual XML node, I have no clue how to add it to the node I want to store. Or is eXist supposed to look through all DTDs specified in the catalog and choose one that fits? Kind regards, Ralf Jung |