Re: Datamodel Strawman (ACTION-298)

Christian de Sainte Marie <csma@ilog.fr> wrote:
> 
> > As I understand it, there are basically two places where we may need 
> > the reference to an external, or application data model:
> >
> > 1. when specifying the type of a variable beyond the builtin types 
> > (and of a slot if we decide that RIF should allow type checking);

Typed variables is a step that requires either sorts or a RIF data model
(at least the classification terms introduced in the current document).

> > As regards case 1, I suppose that a QName is all we need (in addition 
> > to  the metadata that will tell us what this ruleset requires, e.g. a 
> > data model represented by an XML schema, the URI of that schema etc).

I do not understand that.

> > E.g., suppose that the data model is specified by the XML Schema in 
> > [1], and that there is a rule that says (informally) (taken from the 
> > MISMO POC [2]:

I do not understand in your example, below, why do you need typed variables.
(I understand why they might be needed, but I do not see it in your example.)


	--michael  

> > Forall ?R: Root()
> > If ?R.division="wholesale" and ?R.occupancy="Investors"
> > Then r.occupancyAdjustment = 0.95d
> >
> > The RIF XML could be (probably not compliant with Sandro's proposed 
> > rules, but that is not the purpose):
> >
> > <Ruleset xmlns:mismo="(the URL in [1]">
> > ...
> >   <Rule>
> >      <Forall>
> >         <declare>
> >            <Var>
> >               <name>?R</name>
> >               <type>mismo:root</type>
> >            </Var>
> >         </declare>
> >      <if>
> >         <And>
> >            <Equal>
> >               <side>
> >                  (*) Here we would like something like an XPath expr 
> > selecting the "division" element where the value of ?R is the context
> >               </side>
> >               <side>"wholesale"</side>
> >  ...
> >
> > (*) E.g. <Uniterm><op>mismo:division</op><arg>?R</arg></Uniterm>, 
> > where the arg could itself be another uniterm if we needed to navigate 
> > deeper; or a single 'op' could be a complete XPath expression; etc. 
> > The slotted syntax may be more appropriate for that case, btw.
> >
> > The question is: if there is a standard way, associated to the data 
> > model, to navigate the source - e.g. XPath if the data model is an DTD 
> > or XML Schema,etc -, should that be the syntax for accessors (and thus 
> > the syntax for accessor 'op's or slots may vary depending on the data 
> > model? Or does RIF need to define a RIF "data source navigation 
> > language" that works for, e.g., XML-S, RDF-S OWL, etc?
> >
> > Christian
> >
> > [1] 
> > http://anonsvn.labs.jboss.com/labs/jbossrules/contrib/apocrif/jrules/src/test/resources/xsd/mismo.xsd 
> >
> > [2] 
> > http://anonsvn.labs.jboss.com/labs/jbossrules/contrib/apocrif/jrules/src/test/resources/irl/mismo2.irl 
> >
> >
> 
> 

Received on Monday, 23 July 2007 09:49:28 UTC