[oXygen-user] Re: Failed to read schema document

Sorin Ristache
Mon Aug 11 04:52:29 CDT 2008


Hello Jenny,

You can get different validation results when saving the XML file in the 
eXist database and when validating the same XML file in an Oxygen editor 
panel if the two validations are executed against different schemas.

When you save the XML file the eXist server validates the file against 
\eXist\webapp\WEB-INF\entities\works.xsd through the eXist XML catalog 
that maps the namespace 
"http://localhost:8080/exist/db/Test/common/schemas/work" to the schema 
\eXist\webapp\WEB-INF\entities\works.xsd. When you validate the same XML 
file opened in an XML editor panel in Oxygen with the toolbar action 
Validate Document other XML Schema file may be used. Oxygen uses the 
same schema file as the eXist server only if you associate the same 
schema file with the XML file with one of the following:

- the xsi:schemaLocation attribute in the XML file,

- a document type created in Preferences -> Document Type Association,

- an XML catalog set in Preferences -> XML -> XML Catalog.

You can find the schema used in Oxygen with the action Open External 
Schema available on the toolbar Document and on the menu Document -> XML 
Document.


Regards,
Sorin


Jing, Jenny wrote:
> 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



More information about the oXygen-user mailing list