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

Trying to Understand Complex Abstract Types: How To Define?

From: Eliot Kimber <ekimber@innodata-isogen.com>
Date: Mon, 21 Mar 2005 10:53:16 -0600
Message-ID: <423EFBFC.7060102@innodata-isogen.com>
To: xml-schema-dev <xmlschema-dev@w3.org>

What I'm trying to do is define an abstract type with a specific content 
model that should act as the model for specialized types such that 
specialized types must declare sub element types of the same type as in 
my model.

For example, my abstract complex type is as follows, with an indication 
of the desired specialization rules:

InformationModule [specialization required] goes to:
   <ObjectName> [specialization required]
   <ShortDesc> [specialization optional]
   <InformationModuleItem>+ [specialization required]


With the intent that InformationModule must be used as the type for 
specialized elements and those elements must specialize <ObjectName> and
<InformationModuleItem>, e.g.,

<ElementType> [xsi:type="InformationModule"]
   <ElementTypeName> [xsi:type="ObjectName"]
   <ShortDesc>
   <Purpose>         [xsi:type="InformationModuleItem"]
   <ContentModel>    [xsi:type="InformationModuleItem"]
</Element>

What I want to be able to do, but I realize I can't, is define an 
abstract type that defines its content model in terms of types, not in 
terms of element types. But lacking that, I'm not sure how to do what I 
want.

I think that substitution groups is the mechanism to use but it's not 
immediagely clear now to do it and I fear that I'm not thinking about 
this task in the right way, that I'm trying to be too object oriented 
and that that is throwing me off.

Can anyone point me in the right direction or help me understand the 
Schema way to think about this sort of problem?

What I'm trying to do is essentially what the old HyTime SGML 
architecture mechanism let you do and what the DITA specialization 
mechanism lets you do. There doesn't seem to be a direct correlation to 
either of those mechanisms in XSD but I want to make sure I haven't 
missed something.

Thanks,

Eliot
-- 
W. Eliot Kimber
Professional Services
Innodata Isogen
9390 Research Blvd, #410
Austin, TX 78759
(512) 372-8155

ekimber@innodata-isogen.com
www.innodata-isogen.com
Received on Monday, 21 March 2005 17:18:48 GMT

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