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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, August 08, 2008 1:00 PM
To: [email protected]
Subject: oXygen-user Digest, Vol 59, Issue 3

Send oXygen-user mailing list submissions to
        [email protected]

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
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

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" <[EMAIL PROTECTED]>
Subject: [oXygen-user] Failed to read schema document
To: "[email protected]" <[email protected]>
Message-ID:
        <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]>
Subject: Re: [oXygen-user] Failed to read schema document
To: "[email protected]" <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
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
[email protected]
http://www.oxygenxml.com/mailman/listinfo/oxygen-user


End of oXygen-user Digest, Vol 59, Issue 3
******************************************
_______________________________________________
oXygen-user mailing list
[email protected]
http://www.oxygenxml.com/mailman/listinfo/oxygen-user

Reply via email to