Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: using types from an included file in a different namespace

From: "Antoli, Leo" <Leo.Antoli@-----.--->
To: George Cristian Bina <george@---------.--->
Date: 10/27/2006 6:37:00 PM
Files attached.

When I try to validate A.xml I get:

In XMLSpy">XMLSpy: It's valid.

In Saxon:
Error at xs:element on line 4 of file:/A.xsd:
  Cannot reference schema components in namespace http://mynamespace2 as it
has not been imported Warning: One error was found while processing the
schema Warning: Validation will continue without the schema at A.xsd
Validation error on line 1 column 137 of file:.../A.xml:
  Cannot validate <hello>: no element declaration available Validation of
source document failed

In Stylus Studio (I think it uses Xerces-C):
file:.../A.xsd:4,46: Schema Representation Constraint: Namespace
'http://mynamespace2' is referenced without <import> declaration
The XML document A.xml is NOT valid (1 errors)



Regards,
Leo. 





-----Original Message-----
From: George Cristian Bina [mailto:george@o...] 
Sent: 27 October 2006 16:30
To: Antoli, Leo
Cc: xmlschema-dev@w...
Subject: Re: using types from an included file in a different namespace

Hi Leo,

You should be able to make references to components defined in F.xsd 
from A.xsd as you describe but the best way to tell is to provide a cut 
down sample schemas to show what you mean exactly.

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com


Antoli, Leo wrote:
> Hi all,
> Maybe the subject is not very clear but I'll try to explain my question.
> I have a schema file A.xsd including another file B.xsd (so in the same ns
> as A.xsd), and B.xsd importing F.xsd (so in a differente ns). Can I use
> types/elements defined in F.xsd from A.xsd?
> 
> It looks like XMLSpy">XMLSpy allows this, but Saxon produces this error:
> "Cannot reference schema components in namespace http://myns as it has not
> been imported".
> 
> What behaviour is correct?
> 
> Thanks you.
> 
> Regards,
> Leo. 
> 



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