W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2003

Re: Re-using XSD schema-for-schemas

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 26 Jun 2003 14:26:22 +0100
To: <Simon.Cox@csiro.au>
Cc: <xmlschema-dev@w3.org>, <fellah@pcigeomatics.com>
Message-ID: <f5b7k79dl6p.fsf@erasmus.inf.ed.ac.uk>

<Simon.Cox@csiro.au> writes:


> Now XSD's "redefine" does apply to model groups, so I guess we could extend 
> the group with the additional facets required, and then these would become 
> available within localSimpleType.  
> But this would involve tinkering with components in the XSD namespace.  
> That doesn't look like such a smart idea.  

For what you want, it's not completely unreasonable.

> Is there another mechanism that we could use?   
> Maybe declare a new facet and add it to a substitution-group headed 
> by one of the existing facets?

Whether or not it's a good idea, you _can't_ actually do this -- the
sForS has "blockDefault='#all'", which means after-the-fact
substitution groups won't work.

> [N.B. There is an annotation on the facets group:
>     <xs:annotation>
>       <xs:documentation>
>        We should use a substitution group for facets, but
>        that's ruled out because it would allow users to
>        add their own, which we're not ready for yet.
>     </xs:documentation>
>     </xs:annotation>
> So obviously the W3C WG have at least briefly considered this use-case.  
> What to do while waiting for them to revisit this issue?]

Sometimes we surprise ourselves :-).

I think you'd be better off extending localSimpleType to produce a
type in your own namespace with the additional facets likewise in your
own namespace.

But that would mean defining everything _else_ you had in mind to use
(xs:union, xs:restriction, etc.) to eventually allow the new type
instead of the old. . .

So you either do that, extending XML Schema types as you go, but
losing exact name correspondence (which may be no bad thing, since
your elements _don't_ have the semantics of the schema ones, or use
redefine and be guilty of tag abuse.

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Thursday, 26 June 2003 09:26:24 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:11 UTC