← Prev in month ← Prev in thread

Children options

From
Aaron Hansen <>
Date
2005-01-19T18:02:54+00:00
ID
Thread
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>
← Prev in month ← Prev in thread