Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xml chema namespace problem

Status
Not open for further replies.

sedj

Programmer
Aug 6, 2002
5,610
Hi,

I have a problem with one of our schemas.
It validates fine in XMLSpy, and also with the various Java parsers we use, but our DBA's are attempting to validate the schema using the db's internal parsers - which are erroring.

The error is :

Oracle Error :: LSX-00340
improper namespace value for the imported element

Cause :

If the namespace attribute is present, then its actual value must not match the actual value of the enclosing schema's targetNamespace attribute. If the namespace attribute is not present, then the enclosing schema must have a targetNamespace attribute.

The bit of schema in question is :

Code:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] xmlns:gml="[URL unfurl="true"]http://www.opengis.net/gml"[/URL] elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:import namespace="[URL unfurl="true"]http://www.opengis.net/gml"[/URL] schemaLocation="[URL unfurl="true"]http://bla.com/feature.xsd"/>[/URL]

... rest of schema

where feature.xsd is :

Code:
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="[URL unfurl="true"]http://www.opengis.net/gml"[/URL] xmlns="[URL unfurl="true"]http://www.w3.org/2001/XMLSchema"[/URL] xmlns:gml="[URL unfurl="true"]http://www.opengis.net/gml"[/URL] xmlns:xlink="[URL unfurl="true"]http://www.w3.org/1999/xlink"[/URL] elementFormDefault="qualified" version="2.1.2">

.. rest of schema

Now the error apparently is caused because the "targetNamespace" of feature.xsd is the same as the "namespace" declaration on the original schema's xs:import .

Does anyone know of anyway around this ? Or of another way of including/importing a schema apart form the way it is now ?

Thanks for any help !

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top