Re: spec of multi-sorted Core should include the ASN productions

Hi Phillipe,

I know choice is frequently used.  Maybe group is less widely used, but
I did use the Sun "xjc" reference JAXB/2.0 compiler and it works fine
for the schema I propose.

Philippe Bonnard wrote:

> Hi Gary,
>
>  
>
> The method you describe to generate the Java meta-model of RIF is very 
> interesting and powerful.
>
> However, the way the XSD schema is generated from ASN07 is important 
> in that approach.
>
> Thus, I think that the specification of this translation (ASN07àXSD) 
> should be carefully designed in order to obtain a simple schema.
>
>  
>
> Analysing the structure you advise in the section 1.1 of 
> http://www.w3.org/2005/rules/wg/wiki/Arch/XML_Syntax, such as the 
> group and the choice instructions, I wonder if those structures are 
> widely used in standard schemas, although they are closed and similar 
> to the DTD construction.
>
>  
>
> Regards. Philippe.
>
>  
>
> ------------------------------------------------------------------------
>
> *From:* public-rif-wg-request@w3.org 
> [mailto:public-rif-wg-request@w3.org] *On Behalf Of *Gary Hallmark
> *Sent:* Thursday, May 10, 2007 12:11 AM
> *To:* W3C RIF WG
> *Subject:* spec of multi-sorted Core should include the ASN productions
>
>  
>
> I was trying to build a little RIF translator for Oracle Business 
> Rules (OBR).  OBR is "strongly typed" like Java and so I want to use 
> the multi-sorted Core.  The "design" for my translator is
>
> 1. obtain an XML Schema document for multi-sorted RIF Core
> 2. use JAXB/2.0 to generate Java classes and xml 
> marshaller/unmarshaller from (1)
> 3. write a RIF "import" utility Java program that walks a RIF document 
> expressed using (2) and creates production rules in OBR
> 4. write a RIF "export" utility Java program that creates a RIF 
> document from an OBR ruleset (or explains why translation isn't possible)
> 5. add some builtins from xquery/xpath like op:numeric-add which are 
> sorted and without which it's kind of hard to write any useful rules 
> at all
>
> It is reasonably straightforward to generate (1) from the ASN in the 
> Core spec, although the Schema isn't uniquely determinable from the 
> ASN (possibility of stripe skipping, etc), which is a big problem for 
> interoperability.
>
> Unfortunately, the ASN in the Core spec does not include support for 
> multiple sorts.  The "sorting" is kind of "added on" toward the end of 
> the spec, and the ASN is never completely revealed.  I think it's 
> pretty easy to guess about the primitive sorts from the examples, but 
> the arrow sorts and boolean sorts really need to have ASN. 
>
> -- 
>
>
> Oracle <http://www.oracle.com>
> Gary Hallmark | Architect | +1.503.525.8043
> Oracle Server Technologies
> 1211 SW 5th Avenue, Suite 800
> Portland, OR 97204
>

-- 


Oracle <http://www.oracle.com>
Gary Hallmark | Architect | +1.503.525.8043
Oracle Server Technologies
1211 SW 5th Avenue, Suite 800
Portland, OR 97204

Received on Tuesday, 29 May 2007 22:17:30 UTC