Page 1 of 1

Cannot add an XML resource to Exist DB

Posted: Sun Dec 10, 2006 9:13 am
by mphare
I can save a DTD to the eXist DB, but not an XML file..
I get:
Cannot save the file. 500 Internal Server Error for: http://mphhome5:8080/exist/webdav/db/te ... Events.xml
Any ideas for this?

Posted: Sun Dec 10, 2006 9:18 am
by mphare
It seems to have something to do with the

Code: Select all

<!DOCTYPE Section SYSTEM "file:///c:/mphare/Development/structured-fm/NMIE-Structured-Environment/NMIS/NMIS.dtd" [

<!-- Begin Document Specific Declarations -->

<?Fm Validation Off?>


<!-- End Document Specific Declarations -->

]>
If I remove this, it saves ok.

I've tried the explicit path to the disk, a relative path in the eXist database structure and a webdav URL. None seem to work. How should this DOCTYPE be declared?

Posted: Mon Dec 11, 2006 7:03 pm
by sorin_ristache
Hello,

I get this error only when I try to save an XML file that declares a DTD with a relative path to an eXist database through WebDAV using the File -> Save to URL action in oXygen. Without the DTD declaration I can execute the save without getting an error. It is an eXist server problem. You can see a clear error message instead of Internal Server Error if you try to save the same XML file in the same location (the same eXist collection) using the Add resource action of the popup menu of the Database Explorer view on that collection. The error message is:

Code: Select all

Cannot save the file: FileNotFoundException: /home-dir/of/eXist-server/yourFile.dtd
That means the server resolves yourFile.dtd that you refer in the XML file relative to the eXist server home directory. It does not resolve it relative to the current eXist collection. That happens because you did not register your DTD on the server using a catalog file as specified in the eXist documentation.


Regards,
Sorin

Posted: Tue Dec 12, 2006 1:22 am
by mphare
Thanks!