schema does nog validate when stored in .xml file

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Johan
Posts: 2
Joined: Fri Aug 05, 2005 5:20 pm
Location: Netherlands

schema does nog validate when stored in .xml file

Post by Johan »

I downloaded the GPX schema file from

http://www.topografix.com/gpx.asp

... using Internet Explorer's "Save Target As..."

This gave me file gpx.xml which starts as follows...
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.topografix.com/GPX/1/1"
targetNamespace="http://www.topografix.com/GPX/1/1"
elementFormDefault="qualified">
When I open this file in Oxygen and click the 'Validate Document' button, I get error
Description: E cvc-elt.1: Cannot find the declaration of element 'xsd:schema'.
The strange thing is that when I create a new file in Oxygen and declare it to be an XML Schema file, then copy/paste the complete content of gpx.xml into the new file and press 'Validate', it validates without any complaint. The two files are byte-for-byte the same.

Is it the .xml file extension?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Johan,

When you open an XML file oXygen opens that in the XML editor. If you open an XSD file oXygen opens that in the XML Schema editor. You can see also that there are different actions for these editors (although there are also common actions). The validate action in these two editors is different.

Best Regards,
George
Johan
Posts: 2
Joined: Fri Aug 05, 2005 5:20 pm
Location: Netherlands

Post by Johan »

Thanks for this clarification George.

Is there a way to make the choice for a specific editor, schema-editor or xml-editor, explicit?

Or is it the rule that schema files are required to have the .xsd extenstion?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Johan,

In oXygen 6.2 there will be an entry in the project contextual menu called "Open As..." that will allow manually selecting the editor to be used for opening the selected file.

Best Regards,
George
Post Reply