OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Questions on DCD

[ Lists Home | Date Index | Thread Index ]
  • From: Charles Frankston <cfranks@microsoft.com>
  • To: 'Maneesha Jain' <Maneesha.Jain@Ebay.Sun.COM>
  • Date: Tue, 19 Jan 1999 17:34:03 -0800

> -----Original Message-----
> From: Maneesha Jain [mailto:Maneesha.Jain@Ebay.Sun.COM]
> Sent: Tuesday, January 19, 1999 4:34 PM
> To: petsa@us.ibm.com; xml-dev@ic.ac.uk; tbray@textuality.com; Charles
> Frankston
> Cc: Maneesha.Jain@Ebay.Sun.COM
> Subject: Questions on DCD
> 
> 
> Hi,
> 
> I have following questions on DCD. Any help would be a great help.
> 
> 1) 
> If I define an ElementDef type "A", and then a ElementDef type "B"
> which could contain two elements/members of type A. How do I 
> define that ?

By inheritance (defined in Appendix B of DCD).  But even there you don't get
to pick arbitrary members of type A.  If B inherits from A, it inherits the
entire content model.  B may extend A's content model, but not remove things
from it.

> 
> Can I do the following:
> 
> <ElementDef Type="A">
> 	<Element>foo</Element>
> </ElementDef>
> 
> <ElementDef Type="B">
> 	<Element> Ist</Element>   (first member of type A)
> 	<Element> Second</Element>	(second member of type A)
> </ElementDef>
> 
> <ElementDef Type="Ist" Model="Data" Datatype="A"/>
> <ElementDef Type="2nd" Model="Data" Datatype="A"/>
> 
> Or is the value of attribute "Datatype" reserved to what is 
> defined in the spec 
> ?

The meaning of Datatype is as defined in the spec.  Although there are
sensible ways to think about extending this concept to user defined
datatypes, DCD does not do so.

There are three distinct concepts in DCD: use or reference, inheritance (in
the appendix at least), and datatypes.  You are mushing them all together.

An ElementDef is not a means for defining a "datatype", it is the means for
defining the content model of an XML tag.  The value of the Element property
must match the value of the "Type" property of some ElementDef.  So:

  <ElementDef Type="A" Model="Data"/>

  <ElementDef Type="B" Model="Elements" Content="Closed">
      <Element>A</Element>
  </ElementDef>

means that <B><A>some text</A></B> is legal.  <B>some text</B> is not.  By
contrast inheritance gives us:

  <ElementDef Type="A" Model="Data"/>

  <ElementDef Type="B" Model="Mixed" Content="Closed">
     <Extends Type="A"/>
  <ElementDef>

which means that <B>some text</B> is legal.  <B><A>some text</A></B> is not
because <B> doesn't identify any elements that it may contain.

> 
> 2) Wish <Element> could allow <Description> just like 
> <ElementDef>. Is it 
> possible ?

Lacking a precise DTD, it is hard to say whether DCD allows this or not.

There is no question 3.

> 
> 4) What is the syntax for defining multiple inheritance ?

  <ElementDef Type="B" Model="Mixed" Content="Closed">
     <Extends Type="A"/>
     <Extends Type="C"/>
  <ElementDef>

The content model of "B" is simply the concatenation of the content models
of "A" and "C".

> 
> 5) Where is the DTD for DCD ?

No DTD was written for DCD.  It would be messy to do so because per RDF
rules, properties may be either attributes or element values.

> 
> 6) Is there any site containing couple of examples for defining DCDs ?

None that I know of aside from what's in the paper, perhaps one of the other
authors knows of some.

> 
> Regards,
> Maneesha
> 

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS