
Hi, Sorin: We use eXist 1.2.3. I set up the config.xml validation=yes. I also copied our schema files into this folder: \eXist\webapp\WEB-INF\entities Then I add the name and uri in the catalog.xml: ( I just added the three lines of our own schemas in the <uri name= > in the default catalog.xml.) Catalog.xml <!-- $Id: catalog.xml 6282 2007-07-23 18:49:56Z dizzzz $ --> <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> <uri name="http://www.w3.org/XML/1998/namespace" uri="entities/xml.xsd"/> <uri name="http://www.w3.org/2001/XMLSchema" uri="entities/XMLSchema.xsd"/> <uri name="http://localhost:8080/exist/db/Test/common/schemas/work" uri="entities/works.xsd"/> <uri name="http://localhost:8080/exist/db/Test/common/schemas/about" uri="entities/about.xsd"/> <uri name="http://localhost:8080/exist/db/Test/common/schemas/common" uri="entities/common.xsd"/> <uri name="urn:oasis:names:tc:entity:xmlns:xml:catalog" uri="entities/catalog.xsd" /> </catalog> This is how I define in our xml record: <work xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://localhost:8080/exist/db/Test/common/schemas/work"> </work> But the setting doesn't seem work because the records are not validated by the schema at all. For example, if we delete a required field, the record is still validated. But if I tried to save a record, the error message appears. I don't know whether it's caused by eXist setting or by Oxygen, or the connection between them. Any suggestion is welcome! Thanks. Jenny -----Original Message----- From: oxygen-user-bounces@oxygenxml.com [mailto:oxygen-user-bounces@oxygenxml.com] On Behalf Of oxygen-user-request@oxygenxml.com Sent: Friday, August 08, 2008 1:00 PM To: oxygen-user@oxygenxml.com Subject: oXygen-user Digest, Vol 59, Issue 3 Send oXygen-user mailing list submissions to oxygen-user@oxygenxml.com To subscribe or unsubscribe via the World Wide Web, visit http://www.oxygenxml.com/mailman/listinfo/oxygen-user or, via email, send a message with subject or body 'help' to oxygen-user-request@oxygenxml.com You can reach the person managing the list at oxygen-user-owner@oxygenxml.com When replying, please edit your Subject line so it is more specific than "Re: Contents of oXygen-user digest..." Today's Topics: 1. Failed to read schema document (Jing, Jenny) 2. Re: Failed to read schema document (Sorin Ristache) ---------------------------------------------------------------------- Message: 1 Date: Thu, 7 Aug 2008 23:21:07 -0400 From: "Jing, Jenny" <jjing@hbs.edu> Subject: [oXygen-user] Failed to read schema document To: "oxygen-user@oxygenxml.com" <oxygen-user@oxygenxml.com> Message-ID: <18EA3ABA6E54124EB3CE222C13F68A460127FCFE8F58@WINHBSMAIL01.hbs.edu> Content-Type: text/plain; charset="us-ascii" Hi, I'm trying to set up eXist to validate records with schema. But I keep getting error message when I tried to save a record in eXist. Cannot save the file. org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'file:/export/home/library/eXist/webapp//WEB-INF/entities/works.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. Does anyone know what might cause this error message? The schema's root is <xsd:schema> I am sure about that. Thanks. Jenny ------------------------------ Message: 2 Date: Fri, 08 Aug 2008 15:13:03 +0300 From: Sorin Ristache <sorin@oxygenxml.com> Subject: Re: [oXygen-user] Failed to read schema document To: "oxygen-user@oxygenxml.com" <oxygen-user@oxygenxml.com> Message-ID: <489C384F.2020402@oxygenxml.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hello, I get this error when the schema used for validation cannot be found at the location specified in the XML document. In your case if there is a works.xsd file on the hard disk and the root element of the works.xsd file is xsd:schema the location is not specified correctly in the XML document. Does works.xsd exist in the directory specified in the XML document that you try to add to eXist? /export/home/library/eXist/webapp/WEB-INF/entities/works.xsd If it exists what is the version of your eXist server? Regards, Sorin Jing, Jenny wrote:
Hi,
I'm trying to set up eXist to validate records with schema. But I keep getting error message when I tried to save a record in eXist.
Cannot save the file. org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'file:/export/home/library/eXist/webapp//WEB-INF/entities/works.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
Does anyone know what might cause this error message? The schema's root is <xsd:schema> I am sure about that.
Thanks.
Jenny
------------------------------ _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user End of oXygen-user Digest, Vol 59, Issue 3 ******************************************