Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 13:50 Go to next message
jacques theron is currently offline jacques theronFriend
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 15:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
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...


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Extending xsd.edit
Next Topic:Stack overflow on XSD Resource save
Goto Forum:
  


Current Time: Tue Apr 16 20:58:55 GMT 2024

Powered by FUDForum. Page generated in 0.96849 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top