RE: bug in syntax of rif:List

While we had long disucssions leading to the current CR XML syntax
for lists, your proposal would make the XML syntax more consistent
across <Atom>, <Expr>, and <List>, although more deeply nested and
further 'attributed'.

But regarding the 'ordered' attribute in the current

<args ordered="yes">,

the XSD understands that args are always ordered (fixed):

<xs:attribute name="ordered" type="xs:string" fixed="yes"/>

I'm fine with the proposal if we allow the same for

<items ordered="yes">.

Harold
 

-----Original Message-----
From: public-rif-wg-request@w3.org [mailto:public-rif-wg-request@w3.org] On Behalf Of Sandro Hawke
Sent: January 29, 2010 11:13 AM
To: public-rif-wg@w3.org
Subject: 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:26:42 UTC