W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2002

Re: Attribute groups

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 20 Mar 2002 00:37:53 +0000
Message-ID: <28221621514.20020320003753@jenitennison.com>
To: "Snow, Corey" <CSNOW@ddpwa.com>
CC: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Hi Corey,

> So if I have a type called "supertype", and two types derived from
> it- "typeone" and "typetwo" (great imagination, eh?) Could I have
> something like this in an instance document?
>
> <supertype name="CoolBeans">This is a typeone element.</supertype>
> <supertype flag="true" style="neato">This is a type two element.</supertype>

Not quite, but you could if you were OK with having xsi:type
attributes in your instance:

<supertype xsi:type="typeone" name="CoolBeans">This is a typeone element.</supertype>
<supertype xsi:type="typetwo" flag="true" style="neato">This is a type two element.</supertype>

If you don't want xsi:type attributes in your instance document, then
using Schematron, as you are doing, is the best solution, I think.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Tuesday, 19 March 2002 19:37:55 GMT

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