Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - using types from an included file in a different namespace >Thread Next - Re: using types from an included file in a different namespace RE: using types from an included file in a different namespaceTo: 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. > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
