Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » src-resolve.4.2 error resolving component it was detected that is in namespace(I get this error when I validate my xsd in ecclipse)
src-resolve.4.2 error resolving component it was detected that is in namespace [message #1065795] Thu, 27 June 2013 09:50 Go to next message
jacques theron is currently offline jacques theron
Messages: 1
Registered: June 2013
Junior Member
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="XXXX/2001/XMLSchema" targetNamespace="YYYY/myfile" xmlns:tns="CCCCC/myfile" elementFormDefault="qualified" 
   xmlns:xs="CCCCC/XMLSchema" >

        <xs:element name="TypeOfEntity" > 
          <xs:complexType >
            <xs:sequence>
              <xs:element name="id" type="xs:long" />
              <xs:element name="description" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="contextmask" type="xs:long" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
       </xs:element>
        
        <xs:element name="Entity" >
          <xs:complexType >
            <xs:sequence>
              <xs:element name="id" type="xs:long" />
              <xs:element name="Name" >
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="EntityType" type="TypeOfEntity" />
             </xs:sequence>
          </xs:complexType>
       </xs:element> 
</schema>


Why can I not use the element type TypeOfEntity in my entity element??
Sorry, the spam controls prevented me from posting the 'link-attributes' in the schema header...
Re: src-resolve.4.2 error resolving component it was detected that is in namespace [message #1065825 is a reply to message #1065795] Thu, 27 June 2013 11:34 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26014
Registered: July 2009
Senior Member
Jacques,

It looks like you need to use tns:TypeOfEntity, i.e., when you reference
something you need to specify both the namespace (via the explicit or
implicit prefix) and the name


On 27/06/2013 4:27 PM, jacques theron wrote:
> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns="XXXX/2001/XMLSchema" targetNamespace="YYYY/myfile"
> xmlns:tns="CCCCC/myfile" elementFormDefault="qualified"
> xmlns:xs="CCCCC/XMLSchema" >
>
> <xs:element name="TypeOfEntity" > <xs:complexType >
> <xs:sequence>
> <xs:element name="id" type="xs:long" />
> <xs:element name="description" minOccurs="0">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:maxLength value="100" />
> </xs:restriction>
> </xs:simpleType>
> </xs:element>
> <xs:element name="contextmask" type="xs:long"
> minOccurs="0" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="Entity" >
> <xs:complexType >
> <xs:sequence>
> <xs:element name="id" type="xs:long" />
> <xs:element name="Name" >
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:maxLength value="100" />
> </xs:restriction>
> </xs:simpleType>
> </xs:element>
> <xs:element name="EntityType" type="TypeOfEntity" />
> </xs:sequence>
> </xs:complexType>
> </xs:element> </schema>
>
> Why can I not use the element type TypeOfEntity in my entity element??
> Sorry, the spam controls prevented me from posting the
> 'link-attributes' in the schema header...
Previous Topic:Extending xsd.edit
Next Topic:Stack overflow on XSD Resource save
Goto Forum:
  


Current Time: Tue Sep 02 15:10:38 EDT 2014

Powered by FUDForum. Page generated in 0.03483 seconds