[oXygen-user] puzzling multi-schema behavior

Radu Coravu
Fri Sep 3 04:48:26 CDT 2010


  Hi Gary,

Tough one. Indeed the errors given by Xerces do not help much in 
identifying the root problem.

After digging some time through the XML Schemas:

The XSD 
"http://docs.oasis-open.org/ciq/v3.0/prd03/xsd/default/xsd/xNL.xsd" 
imports the xlink schema like:
<xs:import namespace="http://www.w3.org/1999/xlink" 
schemaLocation="xlink-2003-12-31.xsd"/>

but the xlink schema has already been imported by another schema, the 
one in "http://schemas.opengis.net/gml/3.2.1/gmlBase.xsd"
<import namespace="http://www.w3.org/1999/xlink" 
schemaLocation="http://schemas.opengis.net/xlink/1.0.0/xlinks.xsd"/>

The namespaces of the imported xlink schema are identical but the file 
contents are different.
What Xerces (and many other validators) does is to check if the same 
namespace is set on the import and use the content already parsed.
So the import in 
"http://docs.oasis-open.org/ciq/v3.0/prd03/xsd/default/xsd/xNL.xsd" will 
actually be resolved to the file content of:
"http://schemas.opengis.net/xlink/1.0.0/xlinks.xsd"
which indeed does not contain the referenced types. The namespace is 
thus considered like a key which uniquely identifies the schema content.

Other encountered problems (although not such severe) were that the 
following XML Schemas:
http://scap.nist.gov/schema/asset-reporting-format/1.0/asset-reporting-format_1.0.0-ea1.xsd
http://scap.nist.gov/schema/lightweight-asset-summary-results/1.0/lightweight-asset-summary-results_1.0.0-ea1.xsd
have imports like:
<xs:import 
namespace="http://scap.nist.gov/schema/asset-identification/1.0" 
schemaLocation="asset-identification_1.0.0-ea1.xsd"/>
but the relative schema location of the imports does not correctly point 
to the remote file.

Unfortunately I do not have an easy solution for you, the GML schemas 
are probably not modifiable by you and I do not know if you can modify 
the schemas at "http://scap.nist.gov/" either.
If you can modify the schemas at "http://scap.nist.gov/" you could 
probably make the import:
<xs:import namespace="http://www.w3.org/1999/xlink" 
schemaLocation="xlink-2003-12-31.xsd"/>
very early in the main XSD and thus make Xerces use the newer xlink file 
content also for the GML schemas.

Regards,
Radu

Radu Coravu
<oXygen/>   XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


On 9/2/2010 4:31 PM, Gary Gapinski wrote:
> Using<oXygen/>  XML Editor 11.2, build 2010080212.
>
> Load
> http://scap.nist.gov/use-case/cyberscope/cyberscope-auto-feed-example-20100723.xml.
>
> An explicit validation results in several Xerces errors in xAL.xsd and
> xNL.xsd.
>
> Is this due to actual errors in the schemata, or due to<oXygen/>
> validation settings?
>
> Regards,
>
> Gary
>
>
> _______________________________________________
> oXygen-user mailing list
> 
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user





More information about the oXygen-user mailing list