Problem matching SystemIds in catalog files

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Ormek
Posts: 10
Joined: Mon Sep 05, 2005 12:50 pm

Problem matching SystemIds in catalog files

Post by Ormek »

Hi everyone,

I'm a bit confused about catalog file handling. I cannot find my problem in the forum yet.

The oxygen eclipse plugin cannot find schema files, although I give the correct location in a catalog file.

I use the catalog file shown below to direct the systemId MobiDigGen75.xsd to the correct location in my filesystem. My xml file reads:

<?xml version="1.0" encoding="UTF-8"?>
<MobiDig xmlns="http:/my-mobidig.com/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/my-mobidig.com/namespace MobiDigGen75.xsd">
<EnumListDef>


So this should trigger a resolution of the system identifier. Still oxygen claims: "Failed to read schema document 'MobiDigGen75.xsd' ..."

In the console I get:

Public: null System: file:/C:/Work/Source/XML-Editing/src/XML/MobiDigGen75.xsd = null

Is that correct output? Looks like the result should be different from null. It would be nice too have some documentation on the verbose output of catalog file handling.

Thanks for any help,
Oliver

Catalog.xml
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC
"-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/en ... atalog.dtd">

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">

<system systemId="MobiDigGen75.xsd"
uri="file://C:/Work/Source/XML-Editing/src/scheme/MobiDigGen75.xsd"/>
<system systemId="catalog.xsd"
uri="file://C:/Work/Source/XML-Editing/src/scheme/catalog.xsd"/>

</catalog>
Ormek
Posts: 10
Joined: Mon Sep 05, 2005 12:50 pm

Post by Ormek »

OK, with a bit more testing I found out that the system id, used to query the catalog seems not to be MobiDigGen75.xsd as found in the XML file, but an expanded version: file:/C:/Work/Source/XML-Editing/src/XML/MobiDigGen75.xsd
Now I need to find out how to redirect that or switch to public identifiers which, hopefully, no one hassles with.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Problem matching SystemIds in catalog files

Post by sorin_ristache »

Hello,
Ormek wrote:It would be nice too have some documentation on the verbose output of catalog file handling.
Check the User Manual, the following link. The verbose output of catalog resolution is enabled from Preferences - XML - XML Catalog - Verbosity and is a log of what catalog files are parsed and what public ID and system ID are resolved with one of the catalogs added to the list of XML catalogs:

http://www.oxygenxml.com/doc/ug-oxygen/ ... ml-catalog
Ormek wrote:Now I need to find out how to redirect that or switch to public identifiers which, hopefully, no one hassles with.
Usually you redirect a system ID pointing to a Web location not a local file but if you want to redirect a local URI to another local URI you have to use a catalog entry like:

Code: Select all

<system systemId="file:/C:/Work/Source/XML-Editing/src/XML/MobiDigGen75.xsd" uri="file:/C:/path-to-schema/MobiDigGen75.xsd"/>
For public ID:

Code: Select all

<public publicId="schema-public-ID-here" uri="file:/C:/path-to-schema/MobiDigGen75.xsd"/>
where path-to-schema is a full path or a path relative to the location of the catalog. See the article about creating and setting up XML catalog files in <oXygen/> available on the Documentation page:

http://www.oxygenxml.com/doc/HowToCreat ... gFiles.pdf


Best regards,
Sorin
Ormek
Posts: 10
Joined: Mon Sep 05, 2005 12:50 pm

Post by Ormek »

Thanks for the help,

using the tag insight default pane was a better solution for me. As I wanted to match namespaces with schema locations in the first place.

The system id used in my xml file is just a file name without the path and file:// prefix. I'd think it would be better if Oxygen did not extented it to a complete URL but rather query the catalog files with that system id.

Thanks for the help and the many pointers anyway,
Oliver
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Ormek wrote:The system id used in my xml file is just a file name without the path and file:// prefix. I'd think it would be better if Oxygen did not extented it to a complete URL but rather query the catalog files with that system id.
The XML parser does the extension and it cannot be changed because the XML catalog redirects URIs not relative paths.

Regards,
Sorin
Post Reply