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

 


Help: OASIS Mailing Lists Help | MarkMail Help

obix-xml message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [obix-xml] Children options


The only real substantive difference is that option C can be enforced in the
schema since.  There can be a choice between the "more" element and the list
of children.  This means that a server can get it wrong (omit the "more"
when it should be there, for example) but there is no potential ambiguity as
with options A and B.  In those options, both "more='false'" or
"hasChildren=false" and children objects could provided.  The schema cannot
enforce correctness in those cases.

Other than that, there's not a lot of difference.  The resulting code
implementations are very similar.  Option B has the small difference that
"hasChildren" would not be part of the ReadChildType type.  Rather it would
be an independent value.  In the other two options, the ReadChildType type
would have a property called "more" to indicate whether an empty child list
means "No children" or "Children present but not listed".

So things are very clear, wouldn't you say?


Dave Richards


> -----Original Message-----
> From: Aaron Hansen [mailto:ahansen@tridium.com] 
> Sent: Wednesday, January 19, 2005 12:03 PM
> To: obix-xml@lists.oasis-open.org
> Subject: [obix-xml] Children options
> 
> 
> I said I'd start a poll for the children options.  I take 
> that back.  I 
> think it's important to know how code generators will deal with the 
> various options.  Therefore I'm hoping Dave Richards (sorry 
> to put you 
> on the spot) can briefly discuss how the code generation tool he uses 
> would treat each option.
> 
> Here are the options Brian and I thought most important, if you have 
> others, feel free to post them...
> 
> For all options, an object with children included looks like: <object>
>   <id>foo</id>
>   <children>
>     ...
>   </children>
> </object>
> 
> 
> A.  Using an attribute:
> 
> <!-- An object with no children -->
> <object>
>   <id>foo</id>
>   <children more="false"/> <!-- this can be omitted --> </object>
> 
> <!-- An object with children, but not included -->
> <object>
>   <id>foo</id>
>   <children more="true"/>
> </object>
> 
> 
> 
> B.  Using a peer element:
> 
> <!-- An object with no children -->
> <object>
>   <id>foo</id>
>   <hasChildren>false</hasChildren> <!-- this can be omitted 
> --> </object>
> 
> <!-- An object with children, but not included -->
> <object>
>   <id>foo</id>
>   <hasChildren>true</hasChildren>
> </object>
> 
> 
> C.  Using a sub element:
> 
> <!-- An object with no children -->
> <object>
>   <id>foo</id>
>   <children/>  <!-- this can be omitted -->
> </object>
> 
> <!-- An object with children, but not included -->
> <object>
>   <id>foo</id>
>   <children>
>     <more/>
>   </children>
> </object>
> 
> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]