bug in syntax of rif:List

I just noticed a problem with the <List> syntax in XML.  Unlike all the
other class elements (the capitalized ones), it doesn't allow <id> or
<meta> child elements.  I notice this mostly because it's the biggest
special case in my generalized RIF parser, but imagine any RIF system
making use of ids or in-line metadata would stumble on this.

I propose we fix this by moving the list items down into a child
element, and then adding the obvious id and meta children.  This would
regularize the syntax enough that I wouldn't need to treat List as a
special case at all (and I like that idea a lot).

So instead of:

     <List>
        <Const ...
	<Const ...
	<Var ...
	<Const ...
	<rest>         <!-- optional -->
           <Var ...
        </rest>
     <List>

it would be:

     <List>
        <id ...>       <!-- optional -->
	<meta ...>     <!-- optional -->
        <items ordered="yes">
           <Const ...
           <Const ...
           <Var ...
           <Const ...
        </items>
	<rest>         <!-- optional -->
           <Var ...
        </rest>
     <List>


Is this okay?

      -- Sandro

Received on Friday, 29 January 2010 15:12:47 UTC