SVG Validation Busted

This should cover W3C XML Schema, Relax NG and DTD related problems.
cefn
Posts: 15
Location: Ipswich, UK

SVG Validation Busted

Fri Aug 31, 2007 7:02 pm

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: 4144

Mon Sep 03, 2007 5:09 pm

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

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 0 guests