Schema location during development

This should cover W3C XML Schema, Relax NG and DTD related problems.
Posts: 2

Schema location during development

Fri May 04, 2012 12:23 pm


I have to do some work on schema's and documents developed by someone else at another location. From my location, the schemalocations are not accessible (they're on an internal network).

What is the best way to work on these documents, being able to validate them, without network access to the schemalocation?

I can think of a few workarounds:
- redirect requests to the schemalocation to a local server and host the xsd from there;
- temporarily replace the schemalocations with local locations and change them back when delivering the results;

Neither is very satisfying though and I was wondering if oXygen offered some way to deal with this problem internally? Or am I missing some obvious way to deal with this problem that is not particular to oXygen?

Any hints or suggestions appreciated,
Posts: 275

Re: Schema location during development

Fri May 04, 2012 2:54 pm


When having remote DTDs/schemas, it is good practice to create a local copy of them and use an XML catalog to redirect the remote URIs/systemIDs to the local copy.

Documentation regarding the use of XML catalogs can be found in the Oxygen user manual:
Working with XML Catalogs

e.g. XML Catalog file with different types of mappings inside it:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
   <system systemId=""
   <uri name=""
   <uri name="" uri="xml.xsd"/>
   <systemSuffix systemIdSuffix="docbookx.dtd"
   <uriSuffix uriSuffix="docbook.xsl"

You could also redirect whole sets of URIs/systemIDs by using a rewriting entry in your catalog file. More detailed information about rewriting the entries is available in the OASIS specification, at the following link: ... #s.rewrite

For your convenience, here is an example of rewrites - based on the above:

Code: Select all

   <rewriteSystem systemIdStartString="="" rewritePrefix="frameworks/docbook/4.4/dtd/"/>
   <rewriteURI uriStartString="" rewritePrefix="frameworks/docbook/5.0/rng/" />

In Oxygen you can add XML catalogs in Options > Preferences, XML > XML Catalog.

Let us know if you need additional assistance.

Costin Sandoi
oXygen XML Editor and Author Support
Posts: 2

Re: Schema location during development

Fri May 04, 2012 4:32 pm

I will read the relevant manual entry, thank you for that. From the first cursory glance, this does appear to be what I was looking for.


Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 1 guest