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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Embedded-Grammar&Components Design Approach [Was: A bunch

[ Lists Home | Date Index | Thread Index ]


Quoting "Roger L. Costello" <costello@mitre.org>:
> Consider these three components: 'John', 'Shot', 'Roger'. Clearly,
> these
> carry different meanings depending on the order.

Why put the responsibility on the syntax (order) when you can have it in
the model?



> <message>
>     <grammar id="financial-transaction">
>         <actor  idref="John"/>
>         <action idref="Purchased"/>
>         <object idref="Smith-Wesson Revolver"/>
>     </grammar>
>     <Person id="John">
>         <age>24</age>
>         <address>101 Curl Drive, Columbus, Ohio</address>
>     </Person>
>     <Action id="Purchased"/>
>     <Gun id="Smith-Wesson Revolver">
>         <serial-no>3290-4389-12</serial-no>
>         <cartridge>3mm</cartridge>
>     </Gun>
> </message>



<financial-transaction actor="John" action="Purchased"
object="Smith-Wesson Revolver" />

<Person id="John">
   <age>24</age>
   <address>101 Curl Drive, Columbus, Ohio</address>
</Person>
<Action id="Purchased"/>
<Gun id="Smith-Wesson Revolver">
   <serial-no>3290-4389-12</serial-no>
   <cartridge>3mm</cartridge>
</Gun>

of course the financial-transaction and the action is actually useless.
The first is redundant as you need the subject to be self contained and
the action is a term probably defined elsewhere:

<Person id="John" action:Purchased="Smith-Wesson Revolver">
   <age>24</age>
   <address>101 Curl Drive, Columbus, Ohio</address>
</Person>
<Gun id="Smith-Wesson Revolver">
   <serial-no>3290-4389-12</serial-no>
   <cartridge>3mm</cartridge>
</Gun>

IMHO, the more independent of syntax the better. This includes
distinctions between elements and attributes for example:

<Person id="John" 
   action:Purchased="Smith-Wesson Revolver" 
   age="24" address="101 Curl Drive, Columbus, Ohio" />


<Gun id="Smith-Wesson Revolver"
   serial-no="3290-4389-12" 
    cartridge="3mm" />


> 
> I will refer to the above  style of design as the
> Embedded-Grammar&Components approach.

If you want components, get rid of the grammar ;-)

Cheers,

Manos




 

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

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