Re: import in import and namespace

> > I have the following schema :
> > 
> > s1.xsd : targetNameSpace ns1
> >     importing s2.xsd with NameSpace ns2    
> >         importing s3.xsd with NameSpace ns1 (the "main" targetNameSpace).
> > 
> > Is this modularization strategy allowed ? 
> 
> Yes.

It was my opinion too. 

> > It seems that Xerces does not support this kind of schema.
> 
> In what sense, not support?  If it gives an error for the nested
> import, that's a bug.  If it declines to take the s3.xsd hint, that's
> not a bug.  XSV wouldn't either.

s3.xsd is not read by the TraverseSchema class when processing 
import element. (note : the version of xerces used is xerces_j 1.4.3).
It seems to be a bug. 

> 
> > Indeed, in the GrammarResolverImpl class, a schema is referenced by
> > its NameSpace (and not its location), then s3.xsd is not imported
> > because xerces considered that ns1 is previously processed (by
> > s1.xsd).
> 
> That's allowed by the REC:  schemaLocation on import is a hint.
> 
> Why not include s3.xsd from s1.xsd?

Because s2.xsd is used "single" (directly for some documents). 

Thanks !

-- bruno -- 
Bruno Chatel
Tel : (+33)[0] 4 96 11 14 57
Email : bcha@chadocs.com
----------------------------------------

Received on Sunday, 13 January 2002 07:56:15 UTC