SVG Validation Busted

This should cover W3C XML Schema, Relax NG and DTD related problems.
cefn
Posts: 15
Joined: Thu Jul 12, 2007 6:20 pm
Location: Ipswich, UK

SVG Validation Busted

Post by cefn »

We are often using Mixed namespaces inside documents, and need to use SVG 1.1, so can't use the straightforward SVG template in Oxygen.

When we import SVG into a RelaxNG file

<myfile xmlns="http://cefn.com/mynamespace/"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema"
xsi:schemaLocation="http://www.w3.org/2000/svg http://www.w3.org/TR/2002/WD-SVG11-20020108/SVG.xsd"
xmlns:svg="http://www.w3.org/2000/svg">
</myfile>

...the document fails to validate, reporting the following error. However, the SVG XSD file is perfectly formed and perfectly available. Very easy to replicate anyway - just copy paste the above code into a file and try to validate it.

Without validation, we cannot get any of the benefits of using Oxygen, and may as well use a text editor.

THE ERROR...

SystemID: http://www.w3.org/TR/2002/WD-SVG11-2002 ... Schema.dtd
Location: 107:15
Description: schema_reference.4: Failed to read schema document 'http://www.w3.org/TR/2002/WD-SVG11-20020108/SVG.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
URL: http://www.w3.org/TR/xmlschema-1/#schema_reference
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

For the XML file that you posted the validation error is caused by a missing file: http://www.w3.org/TR/2002/WD-SVG11-2002 ... atypes.dtd which is needed by http://www.w3.org/TR/2002/WD-SVG11-2002 ... Schema.dtd which is used in http://www.w3.org/TR/2002/WD-SVG11-20020108/SVG.xsd. The file datatypes.dtd does not exist in that location so it cannot be opened and validation fails.

If you can find the datatypes.dtd file you can copy all these files from the http://www.w3.org/TR/2002/WD-SVG11-20020108/ folder to your computer and resolve all the references to these files to the local files using an entry in an XML catalog file set in oXygen in Options -> Preferences -> XML -> XML Catalog.


Regards,
Sorin
Post Reply