Existing schema won't validate
Posted: Sun Aug 19, 2012 9:41 pm
Hello,
I need to work with an XML schema written by a company that has gone out of business. The schema was generated by the company's collection management system, a database to which I need to add records exported from Excel. The schema does not validate in Oxygen. I'm new to schemas and still get confused by namespace declarations, locations, attribute groups, etc. All I want to do is use the schema to help in converting Excel data so it can be imported into the collection management system database. The Xerces error messages I'm getting have to do with references to attributes based on Xlink. Here's the first of two:
Description: src-resolve.4.2: Error resolving component 'xl:href'. It was detected that 'xl:href' is in namespace 'http://www.w3.org/TR/xlink', but components from this namespace are not referenceable from schema document 'file:/C:/Users/.../mavis_schema.xsd'. If this is the incorrect namespace, perhaps the prefix of 'xl:href' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added...
But there is an import element in the mavis schema for Xlink:
The second error concerns the attributeGroup above. "The content of 'xlink_attributes' must match (annotation?, ((attribute | attributeGroup)*, anyAttribute?)). A problem was found starting at: attribute."
What might be wrong here? Thank you very much, indeed.
I need to work with an XML schema written by a company that has gone out of business. The schema was generated by the company's collection management system, a database to which I need to add records exported from Excel. The schema does not validate in Oxygen. I'm new to schemas and still get confused by namespace declarations, locations, attribute groups, etc. All I want to do is use the schema to help in converting Excel data so it can be imported into the collection management system database. The Xerces error messages I'm getting have to do with references to attributes based on Xlink. Here's the first of two:
Description: src-resolve.4.2: Error resolving component 'xl:href'. It was detected that 'xl:href' is in namespace 'http://www.w3.org/TR/xlink', but components from this namespace are not referenceable from schema document 'file:/C:/Users/.../mavis_schema.xsd'. If this is the incorrect namespace, perhaps the prefix of 'xl:href' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added...
But there is an import element in the mavis schema for Xlink:
Code: Select all
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.wizardis.com.au/2005/12/MAVIS"
xmlns="http://www.wizardis.com.au/2005/12/MAVIS" xmlns:xl="http://www.w3.org/TR/xlink"
elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"></xs:import>
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"></xs:import>
...
<xs:complexType name="mavis_reference">
<xs:annotation>
<xs:documentation>The xl:href attribute of elements of this type should reference
another MAVIS object.</xs:documentation>
<xs:documentation>The element itself may contain CDATA (if the referenced object
supports CDATA matching on import), but no sub-elements</xs:documentation>
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attributeGroup ref="xlink_attributes"></xs:attributeGroup>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:attributeGroup name="xlink_attributes">
<xs:attribute ref="xl:href" use="optional"></xs:attribute>
<xs:attribute ref="xl:title" use="optional"></xs:attribute>
</xs:attributeGroup>
What might be wrong here? Thank you very much, indeed.