How can I force Author Oxygen to use an integrated schema ?

This should cover W3C XML Schema, Relax NG and DTD related problems.
sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

How can I force Author Oxygen to use an integrated schema ?

Post by sebastienlavandier »

Hello,

How can I force Author Oxygen to use an integrated schema (descript.xsd declared in .framework) and don't use that which are declared in the xml document.

The schema is declared like this in the xml document :

<dmodule xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:noNamespaceSchemaLocation="http://www.s1000d.org/S1000D_4-1/xml_sc ... script.xsd">

Do you have an idea ?
Thanks in advance for your answer.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: How can I force Author Oxygen to use an integrated schema ?

Post by Radu »

Hi Sebastien,

Here are a couple of ways (I would prefer alternative (1) for your case):

1) Create an XML catalog file in your framework directory which maps "http://www.s1000d.org/S1000D_4-1/xml_sc ... script.xsd" to a local resource located in your framework directory like:

Code: Select all

<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<system systemId="http://www.s1000d.org/S1000D_4-1/xml_schema_flat/descript.xsd" uri="descript.xsd"/>
<uri name="http://www.s1000d.org/S1000D_4-1/xml_schema_flat/descript.xsd" uri="descript.xsd"/>
</catalog>
So the catalog.xml would have the content above and be located in the same folder as the local "descript.xsd".

Then edit the document type in Oxygen and in the "Catalogs" tab add the reference to the newly created catalog.

When validating (or providing content completion) Oxygen will pass through the catalog and use the local XSD.
You can check this by disabling the network adapter.

2) Edit the document type and in the "Validation" tab add a new validation scenario which validates the current URL with a particular schema.
Make that validation scenario be the default one.
In this way all XML files which match your document type will be validated with that validation scenario and not with the schema present in the document.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sebastienlavandier
Posts: 124
Joined: Tue May 29, 2012 5:42 pm

Re: How can I force Author Oxygen to use an integrated schema ?

Post by sebastienlavandier »

Thank you very much, works here !
Post Reply