W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2006

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

From: C. M. Sperberg-McQueen <cmsmcq@acm.org>
Date: Fri, 15 Sep 2006 20:32:43 -0600
Message-Id: <4561533D-AEBD-4C5C-89D2-C43C670FC256@acm.org>
Cc: "C. M. Sperberg-McQueen" <cmsmcq@acm.org>, xmlschema-dev@w3.org
To: Mark Goodhand <mrg@decisionsoft.com>


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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:55 GMT