Re: Extending an enumerated list

Danny Vint <dvint@mindspring.com> writes:

> I'm trying to come up with a reasonable way to define an enumerated
> list for content in an element or attribute and also be able to
> extending that list without editing the original schema that my
> organization publishes. We would love a method that works with
> xsd:redefine but there doesn't seem to be a way to do it there - we
> can restrict the list, but we cannot extend it.
> 
> 
> Any ideas? The closest we have come is to set the main schema up to
> use substitution groups, but this has the draw back of creating a new
> element instead of extending the original list.
> 
> 
> I got to thinking that I should be able to combine an XML/SGML trick
> of using general entities as I will describe below. This isn't using
> xsd:redefine and if it works it would have the advantage of keeping my
> extensions in a separate file.

Absolutely.  As you say, it's all just XML, and XML processors should
support general entities.  Perhaps wrt Xerces at least there's a
switch to turn on DTD processing.  In XSV it happens automatically,
and your sample works fine.

ht
-- 
  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 Monday, 30 June 2003 07:34:59 UTC