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

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

Tue Jul 31, 2012 12:34 pm

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_schema_flat/descript.xsd">

Do you have an idea ?
Thanks in advance for your answer.
Radu
Posts: 5757

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

Tue Jul 31, 2012 12:46 pm

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_schema_flat/descript.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

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

Tue Jul 31, 2012 2:59 pm

Thank you very much, works here !

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests