W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2005

RE: Namespace error

From: Michael Kay <mike@saxonica.com>
Date: Tue, 5 Apr 2005 15:12:17 +0100
To: <Farid.Mahini@L-3com.com>, <xmlschema-dev@w3.org>
Message-ID: <E1DIon7-00026U-KT@frink.w3.org>

Saxon reckons this schema document is OK.

Perhaps you've confused the processor by using an invalid URI (c:\vistaTec)
as your namespace.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of 
> Farid.Mahini@L-3com.com
> Sent: 05 April 2005 14:28
> To: xmlschema-dev@w3.org
> Subject: Namespace error
> 
> 
> 
> Hi,
> 
> I am getting the following error when I attempt to set the 
> schema of an
> instance of schemaFactory (J2SE 1.5.0).  I created the schema 
> using XMLSpy
> and it did validate my XML source file.   
> 
> org.xml.sax.SAXParseException: src-resolve.4.2: Error 
> resolving component
> 'trueFalse'. It was detected that 'trueFalse' is in namespace 
> 'c:\vistaTec',
> but components from this namespace are not referenceable from schema
> document
> 'file:///C:/Development/eclipse/workspace/TecParser/TecMeasure
> ments_revC.xsd
> '. 
> 
> Since the simpleType ' trueFalse' is defined in the same 
> schema file where
> it gets used, I am assuming there are in the same namespace since
> 'c:\vistaTec' is also the default namespace.  I am getting 
> the same error
> for every element/simpleType/complexType referenced in the 
> root element of
> this schema.   For illustration purpose, I removed all but 
> the following
> from the schema file (TecMeasurements_revC.xsd) and still get the same
> error.
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- edited with XMLSpy v2005 sp2 U (http://www.altova.com) 
> by farid mahini
> (L3 Communications - TE) -->
> <xs:schema xmlns="c:\vistaTec" 
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:fmTec="c:\vistaTec" targetNamespace="c:\vistaTec"
> elementFormDefault="qualified">
>    <xs:simpleType name="trueFalse">
>       <xs:restriction base="xs:string">
>          <xs:enumeration value="true"/>
>          <xs:enumeration value="false"/>
>       </xs:restriction>
>    </xs:simpleType>
>    <xs:element name="tec">
>       <xs:complexType>
>          <xs:sequence>
>             <xs:element name="test" type="trueFalse"/>
>          </xs:sequence>
>          <xs:attribute name="name" type="xs:string" use="required"/>
>          <xs:attribute name="version" type="xs:string" 
> use="required"/>
>       </xs:complexType>
>    </xs:element>
> </xs:schema>
> 
> 
> Thank you,
> -Farid
> 
> 
> >From E-mail Administrator
> ATTENTION PLEASE: Do you have our new e-mail addresses?
> The current L-3 standard is First.Last @ L-3com.com
> E-mail addressed to First.Last @ te.L-3com.com will no longer 
> be delivered.
> Please update your address book using the "From" address on 
> this email.
> 
> 
> 
> 
Received on Tuesday, 5 April 2005 14:12:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:49 GMT