Re: Visibility modifiers for named Schema components -- Schema 1.1 feature?

On 7 Sep 2006, at 08:48 , Mark Goodhand wrote:

>
> I've long found it frustrating that in order to reuse schema  
> components, you have to make them global.
>
> I find myself wanting visibility modifiers on named (global) schema  
> components, e.g.
>
> private - only visible within the current schema document;
> protected - visible to any schema document with the same  
> targetNamespace;
> public - visible to all other schemas (and in the case of  
> declarations, available for the assessment of instance documents).
>
> I'm sure this suggestion has come up before.

It sure did.  Something similar to it (an explicit list of  
identifiers exported
from the current schema document, which corresponds I think to your
'public' class) was in an early draft of XSD 1.0.  It received a  
withering
storm of criticism as being complicated and unnecessary.  So even though
some members of the WG were and remain convinced that explicit
export (and possibly also import) declarations are useful, and a much
better way to support modularity in schema design, we took the feature
out of the spec.

> Does anyone know if such a feature will be provided in Schema 1.1?

Well, you can see for yourself that nothing like it has appeared in
any draft so far, and that there are no open issues or requirements
that mention it.  So the likelihood is small, unless you or others  
persuade
the WG (a) that it's a requirement, (b) that it's soluble, and (c) that
it's really important to solve it in this next version of XSD.

> Is there an obvious reason why this feature would be a bad idea?

None that I see.  As Noah has pointed out, there is considerable  
friction
involved in adding any new feature to a spec as complicated as XSD;
getting something like this right would be very hard.  (It doesn't  
seem that
it *ought* to be hard, but the WG has tripped up over far simpler  
things.)

On the other hand, I agree with you that a perfect schema language would
have such visibility control.  Whether that perfect language will be
called XSD version N.M, or something entirely different, remains to be
seen.

--Michael Sperberg-McQueen

Received on Saturday, 16 September 2006 02:51:54 UTC