W3C home > Mailing lists > Public > public-rif-wg@w3.org > December 2007

RIF XML Syntax and translators

From: Adrian Giurca <giurca@tu-cottbus.de>
Date: Tue, 04 Dec 2007 16:14:01 +0100
Message-ID: <47556EB9.3090605@tu-cottbus.de>
To: "'Public-Rif-Wg (E-mail)'" <public-rif-wg@w3.org>

Dear all,
The REWERSE working group I1 has some experience in implementing 
translators  
<http://oxygen.informatik.tu-cottbus.de/rewerse-i1/?q=translators> for 
interchange. We consider to start building a number of RIF translators 
but we need help to understand a number of  issues:

1. How was the proposed XML Schema ( see 
http://www.w3.org/TR/rif-bld/#Specification ) derived from the EBNF for 
the Presentation Syntax of the RIF-BLD Condition Language 
http://www.w3.org/TR/rif-bld/#head-10450be66b637feddd430658ce562ef518ca5b05  
? There is any normative specification of the mapping from EBNF to XML 
Schema? or Is the XML Schema normative?
Seems that in the Schema appears a number of elements such as <declare> 
,  <formula>  and is not clear how they are derived from EBNF

2. The second question is related with the intended meaning of xs:group 
which in my opinion is designed to handle collections:
For example we have:
CONDITION   ::= 'And' ' ( ' CONDITION* ' ) ' |
                    'Or' ' ( ' CONDITION* ' ) ' |
                    'Exists' Var+ ' ( ' CONDITION ' ) ' |
                    ATOMIC

which means that And is a CONDITION i.e. any instance of an And is an 
instance of  CONDITION.
If so it might be better to implement as

 <xs:element name="CONDITION" abstract="true">
  <xs:complexType>
   <xs:choice>
   <xs:element ref="And"/>   
   <xs:element ref="Or"/>
   <xs:element ref="Exists"/>
   <xs:element ref="ATOMIC"/>   
   </xs:choice>
  </xs:complexType>
 </xs:element>

and then

 <xs:element name="And" substitutionGroup="CONDITION">
   <xs:complexType>
    <xs:sequence>
     <xs:element ref="CONDITION" minOccurs="0" maxOccurs="unbounded"/>   
    </xs:sequence>
   </xs:complexType>
 </xs:element>

etc.

In this case roles such as <formula> are not needed.

-Adrian

-- 
Dr. Adrian Giurca
http://www.informatik.tu-cottbus.de/~agiurca/
Received on Tuesday, 4 December 2007 15:14:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 18:33:44 GMT