[Home] [By Thread] [By Date] [Recent Entries]



Quoting "Roger L. Costello" <costello@m...>:
> 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

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member