Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: One element isn't referenceable, the other is!

From: "Pete Cordell" <petexmldev@---------.--->
To: "Marco Faustinelli" <marco_faustinelli@-----.--->, "XSD Discussion Group W3C" <xmlschema-dev@--.--->
Date: 5/29/2008 8:43:00 PM
Hi Marco,

The problem here is that the schema defines the types to be in the namespace 
http://runtime.onetwo.com/schemas/xinfo (the schema's targetNamespace). 
However, when you use the defined types, no mention of the namespace that 
the desired type is in is made.  i.e.  without a namespace prefix and 
without the default namespace being defined, referring to 
xEnvelopesRequestType asks the schema processor to look for 
xEnvelopesRequestType in 'no' namespace instead of in the 
http://runtime.onetwo.com/schemas/xinfo namespace where they are defined.

I think the easiest way to fix this is to define the following namespace 
prefix in your xs:schema start tag:

xmlns="http://runtime.onetwo.com/schemas/xinfo"

HTH,

Pete Cordell
Codalogic
For XML C++ data binding visit http://www.codalogic.com/lmx/

----- Original Message ----- 
From: "Marco Faustinelli" <>
To: "XSD Discussion Group W3C" <xmlschema-dev@w...>
Sent: Thursday, May 29, 2008 7:12 PM
Subject: One element isn't referenceable, the other is!


> Good morning to everybody,
>
> Validating in Eclipse the schema attached to this email I get an error 
> "components with no target namespace are not referenceable", enclosed as a 
> whole at the end of this message.
>
> I have found plenty of examples of this error thanks to Google, but my 
> schema looks fine to me to that extent.
>
> What I don't understand is why the error is thrown only for the first 
> element in my XSD (xEnvelopesRequestType) and not for the second 
> (xEnvelopesResponseType). If I switch the position of the elements, always 
> the first gets the blame while the second is judged ok.
>
> Anyway they both look fine to me, but there is something hidden that I 
> don't see. Can anyone help me spot it?
>
> Thanks in advance
> Marco Faustinelli - Italy
>
> - - - - - - - - - COMPLETE ERROR MESSAGE FROM ECLIPSE XSD 
> EDITOR - - - - - - - - -
> Could not create Schema: src-resolve.4.1: Error resolving component 
> 'xEnvelopesRequestType'. It was detected that 'xEnvelopesRequestType' has 
> no namespace, but components with no target namespace are not 
> referenceable from schema document 
> 'file:C:/Programmi/bea/user_projects/domains/mydomain/applications/otr/WEB-INF/classes/com/onetwo/runtime/service/xinfo/ws/xinfo_no_xmlns_xin.xsd'. 
> If 'xEnvelopesRequestType' is intended to have a namespace, perhaps a 
> prefix needs to be provided. If it is intended that 
> 'xEnvelopesRequestType' has no namespace, then an 'import' without a 
> "namespace" attribute should be added to 
> 'file:C:/Programmi/bea/user_projects/domains/mydomain/applications/otr/WEB-INF/classes/com/onetwo/runtime/service/xinfo/ws/xinfo_no_xmlns_xin.xsd'. 





transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent