- From: Antoli, Leo <Leo.Antoli@Misys.com>
- Date: Fri, 27 Oct 2006 17:36:39 +0100
- To: George Cristian Bina <george@oxygenxml.com>
- Cc: xmlschema-dev@w3.org
- Message-ID: <8ADC468FAD0DD811ABE500065BFE3CDA0568F35C@pat.slough.midas-kapiti.com>
Files attached. When I try to validate A.xml I get: In XML Spy: 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@oxygenxml.com] Sent: 27 October 2006 16:30 To: Antoli, Leo Cc: xmlschema-dev@w3.org 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 http://www.oxygenxml.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 XML Spy 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. >
Attachments
Received on Friday, 27 October 2006 16:39:23 UTC