diff --git a/html/edoal.html b/html/edoal.html index b113f3a0919a57cee931915bdec32102757a9866..a073007c16dbe261841d2da127c27d8746b1c559 100644 --- a/html/edoal.html +++ b/html/edoal.html @@ -189,12 +189,6 @@ still <tt>http://knowledgeweb.semanticweb.org/heterogeneity/alignment#</tt> EDOAL's own namespace is <tt>http://ns.inria.org/edoal/1.0/</tt> (usual prefix: edoal). </p> -<p> -<b>NOTE: THIS IS TO BE FIXED</b> -Comparators are taken from the W3C XPath functions -recommendation: <tt>http://www.w3.org/2005/xpath-functions</tt> [<a href="http://www.w3.org/TR/xpath-functions">1</a>] -(usual prefix: functions), which are also XML schema comparators. -</p> <h3 id="ssec:alignment">Alignment format</h3> @@ -367,7 +361,7 @@ Restrictions are defined by giving an <i>path expression</i> (relation or proper <div class="grammar"> <u>classexpr</u> ::= <Class rdf:about=" <u>URI</u> "/> | <Class> <u>classconst</u> </Class> - | <AttributeOccurenceRestriction> <u>onatt</u> <u>comp</u> <value><Literal edoal:type="&xsd;Integer" edoal:string="INTEGER" /></value> </AttributeOccurenceRestriction> + | <AttributeOccurenceRestriction> <u>onatt</u> <u>comp</u> <value><Literal edoal:type="&xsd;integer" edoal:string="INTEGER" /></value> </AttributeOccurenceRestriction> | <AttributeDomainRestriction> <u>onatt</u> <u>classrest</u> </AttributeDomainRestriction> | <AttributeTypeRestriction> <u>onatt</u> <u>typerest</u> </AttributeTypeRestriction> | <AttributeValueRestriction> <u>onatt</u> <u>comp</u> (<value><u>instexpr</u></value>|<u>val</u>) </AttributeValueRestriction> @@ -387,11 +381,20 @@ Restrictions are defined by giving an <i>path expression</i> (relation or proper <u>type</u> ::= <Datatype rdf:about=" <u>URI</u> " /> -<u>classrest</u> ::= <all> <u>classexpr</u> </all> | <exists> <u>classexpr</u> </exists> | <class> <u>classexpre</u> </class> +<u>classrest</u> ::= <!--<all> <u>classexpr</u> </all> | <exists> <u>classexpr</u> </exists> |--> <class> <u>classexpr</u> </class> <u>comp</u> ::= <comparator rdf:resource=" <u>URI</u> "/> </div> +<p> +Comparators have to be defined as specific URI, usually in the edoal +namespace. They are currently described by: edoal:equals, +edoal:lower-than, edoal:greater-than, the latter morally corresponding to the +op:numeric-less-than and op:numeric-greater-than from +the <a href="http://www.w3.org/TR/xquery-operators/">XQuery 1.0 and + XPath 2.0 Functions and Operators</a> recommendation. +</p> + <div class="rdfxmlDiv"> Hence, a class expression may be an identified class: <div class="rdfxml">RDF/XML Syntax</div> @@ -426,7 +429,7 @@ Thanks to paths and restrictions, it is possible to restrict a correspondence to </compose> </Property> </onAttribute> - <comparator rdf:resource="&xsd;equals"/> + <comparator rdf:resource="&edoal;equals"/> <value edoal:type="&xsd;string">Acquitaine</value> </AttributeValueRestriction> </and> @@ -455,7 +458,7 @@ We can with this restriction build the correspondence between </compose> </Relation> </onAttribute> - <comparator rdf:resource="&xsd;equals"/> + <comparator rdf:resource="&edoal;equals"/> <value edoal:type="&xsd;string">Acquitaine</value> </Restriction> </attributeValueCondition> @@ -543,7 +546,7 @@ ending by a property: <div class="rdfxml"> <PropertyTypeRestriction> <datatype> - <Datatype rdf:about="&xsd;Integer" /> + <Datatype rdf:about="&xsd;integer" /> </datatype> </PropertyTypeRestriction> </div></div> @@ -620,21 +623,24 @@ An example of occurrence restriction would be the wines produced in a region wit <div class="rdfxml"> <align:Cell> <align:entity1> - <Class rdf:about="&wine;Wine"> - <attributeOccurrenceCondition> - <Restriction> - <onAttribute> - <Relation> - <compose rdf:parseType="Collection"> - <Relation rdf:about="&vin;hasTerroir"/> - <Relation rdf:about="&wine;adjacentRegion"/> - </compose> - </Relation> - </onAttribute> - <comparator rdf:resource="&xsd;greater-than"/> - <value edoal:type="&xsd;int">0</value> - </Restriction> - </attributeOccurrenceCondition> + <Class> + <and rdf:parseType="Collection"> + <Class rdf:about="&wine;Wine"> + <attributeOccurrenceCondition> + <Restriction> + <onAttribute> + <Relation> + <compose rdf:parseType="Collection"> + <Relation rdf:about="&vin;hasTerroir"/> + <Relation rdf:about="&wine;adjacentRegion"/> + </compose> + </Relation> + </onAttribute> + <comparator rdf:resource="&edoal;greater-than"/> + <value edoal:type="&xsd;integer">0</value> + </Restriction> + </attributeOccurrenceCondition> + </and> </Class> </align:entity1> <align:entity2> @@ -655,16 +661,17 @@ uses a path to state that a locally grown wine is a wine whose owner (propri&eac <Class rdf:about="&wine;LocallyGrownWine"/> </align:entity1> <align:entity2> - <Class rdf:about="&vin;Vin"> - <attributeValueCondition> - <Restriction> + <Class> + <and rdf:parseType="Collection"> + <Class rdf:about="&vin;Vin"> + <AttributeValueRestriction> <onAttribute> <Relation rdf:about="&vin;propriétaire"/></first> </onAttribute> - <comparator rdf:resource="&xsd;equals"/> + <comparator rdf:resource="&edoal;equals"/> <value><Relation rdf:about="&vin;négotiant"/></value> - </Restriction> - </attributeValueCondition> + </AttributeValueRestriction> + </and> </Class> </align:entity2> <align:measure rdf:datatype="&xsd;float">1.0</align:measure> @@ -702,10 +709,15 @@ They obey the following grammar: <u>val</u> ::= <value> <u>value</u> </value> <u>value</u> ::= <Literal {edoal:type=" <u>URI</u> "} edoal:string=" <u>STRING</u> " /> + | <Literal {edoal:type=" <u>URI</u> "}> <u>STRING</u> </Literal> | <u>instexpr</u> | <u>attrexpr</u> - | <Apply operator=" <u>URI</u> "> <arguments rdf:parseType="Collection"><u>value</u>*</arguments> </Apply> + | <Apply edoal:operator=" <u>URI</u> "> <arguments rdf:parseType="Collection"><u>value</u>*</arguments> </Apply> +<!-- JE: this is unfortunately ugly, otherwise, this is perfect REST--><!-- + | <Service edoal:operator=" <u>URI</u> "> <arguments rdf:parseType="Collection"><u>param</u>*</arguments> </Service> +<u>param</u> ::= <Parameter edoal:name=" <u>STRING</u> "> <u>val</u> </Parameter> +--> <u>instexpr</u> ::= <Instance rdf:about=" <u>URI</u> "/> </div> </p> @@ -716,8 +728,8 @@ They obey the following grammar: Literal values: <div class="rdfxml">RDF/XML Syntax</div> <div class="rdfxml"> - <Literal edoal:type="&xsd;Integer" edoal:string="123" /> - <Literal edoal:type="&xsd;Integer">123</Literal> + <Literal edoal:type="&xsd;integer" edoal:string="123" /> + <Literal edoal:type="&xsd;integer">123</Literal> </div></div> <p> @@ -735,13 +747,13 @@ Application of an operator is not operational but may be expressed in the following way: <div class="rdfxml">RDF/XML Syntax</div> <div class="rdfxml"> - <Apply operator="http://example.com/Whatever"> + <Apply edoal:operator="http://example.com/Whatever"> <arguments rdf:parseType="Collection"> - <Literal rdf:about="&xsd;Integer">123</Literal> + <Literal rdf:about="&xsd;integer">123</Literal> <Property> <compose rdf:parseType="Collection"> - <edoal:Relation rdf:about="&vin;hasTerroir" /> - <edoal:Property rdf:about="&proton;localedIn" /> + <Relation rdf:about="&vin;hasTerroir" /> + <Property rdf:about="&proton;localedIn" /> </compose> </Property> <Instance rdf:about="&vin;Bordelais" /> @@ -749,6 +761,15 @@ the following way: </Apply> </div></div> </p> + +<p> +URIs to use as the operator attribute of Apply are not specified. It +is however advised, when possible, to use operators from +the <a href="http://www.w3.org/TR/xquery-operators/">XQuery 1.0 and + XPath 2.0 Functions and Operators</a> recommendation. +(<tt>fn:</tt> prefix used for <tt>http://www.w3.org/2005/xpath-functions</tt>). +</p> + <h2 id="ssec:transf">Transformations</h2> <p> @@ -759,10 +780,17 @@ not express constraints on the classes or properties, but constraints on instances that should match. </p> -<div class="grammar"> -<u>transformation</u> ::= <Transformation operator=" <u>URI</u> " direction=" <u>STRING</u> "> +<!-- JE: old stuff? --> +<!--div class="grammar"> +<u>transformation</u> ::= <Transformation edoal:operator=" <u>URI</u> " edoal:direction=" <u>STRING</u> "> <arguments rdf:parseType="Collection"> <u>value</u>* </arguments> </Transformation> +</div--> +<div class="grammar"> +<u>transformation</u> ::= <Transformation edoal:direction=" <u>STRING</u> "> + <entity1> <u>entity</u> </entity1> + <entity2> <u>entity</u> </entity2> + </Transformation> </div> <p> @@ -772,25 +800,25 @@ Transformations <!--are of two kinds, either XPath transformation functions can The following correspondence shows an example of the use of data transformation: <div class="rdfxml">RDF/XML Syntax</div> <div class="rdfxml"> - <edoal:transformation> - <edoal:Transformation edoal:direction="o-"> - <edoal:entity1> - <edoal:Property><edoal:compose rdf:parseType="Collection"/></edoal:Property> - </edoal:entity1> - <edoal:entity2> - <edoal:Apply edoal:operator="concat"> - <edoal:arguments rdf:parseType="Collection"> - <edoal:Property rdf:about="vcard:firstname"/> - <edoal:Literal edoal:type="&xsd;string" edoal:string=" "/> + <transformation> + <Transformation edoal:direction="o-"> + <entity1> + <Property><compose rdf:parseType="Collection"/></Property> + </entity1> + <entity2> + <Apply edoal:operator="concat"> + <arguments rdf:parseType="Collection"> + <Property rdf:about="vcard:firstname"/> + <Literal edoal:type="&xsd;string" edoal:string=" "/> <!-- or even compute middle initial from middlename --> - <edoal:Property rdf:about="vcard:middleinitial"/> - <edoal:Literal edoal:string=". "/> - <edoal:Property rdf:about="vcard:lastname"/> - </edoal:arguments> - </edoal:Apply> - </edoal:entity2> - </edoal:Transformation> - </edoal:transformation> + <Property rdf:about="vcard:middleinitial"/> + <Literal edoal:string=". "/> + <Property rdf:about="vcard:lastname"/> + </arguments> + </Apply> + </entity2> + </Transformation> + </transformation> </div></div> @@ -809,58 +837,58 @@ The following correspondence shows an example of the use of data transformation: <div class="rdfxml"> <align:Cell rdf:about="#cell1"> <align:entity1> - <edoal:Class> - <edoal:and rdf:parseType="Collection"> - <edoal:Class rdf:about="&O1;LED" /> - <edoal:AttributeValueRestriction> - <edoal:onAttribute> - <edoal:Relation rdf:about="&O1;hasColor" /> - </edoal:onAttribute> - <edoal:comparator rdf:resource="&xsd;equals" /> - <edoal:value><edoal:Instance rdf:about="&O1;Blue"/></edoal:value> - </edoal:AttributeValueRestriction> - </edoal:and> - </edoal:Class> + <Class> + <and rdf:parseType="Collection"> + <Class rdf:about="&O1;LED" /> + <AttributeValueRestriction> + <onAttribute> + <Relation rdf:about="&O1;hasColor" /> + </onAttribute> + <comparator rdf:resource="&edoal;equals" /> + <value><Instance rdf:about="&O1;Blue"/></value> + </AttributeValueRestriction> + </and> + </Class> </align:entity1> - <align:entity2><edoal:Class rdf:about="&O2;BlueLED" /></align:entity2> + <align:entity2><Class rdf:about="&O2;BlueLED" /></align:entity2> <align:relation>=</align:relation> </align:Cell> <align:Cell rdf:about="#cell2"> <align:entity1> - <edoal:Class> - <edoal:and rdf:parseType="Collection"> - <edoal:Class rdf:about="&O1;LED" /> - <edoal:AttributeValueRestriction> - <edoal:onAttribute> - <edoal:Relation rdf:about="&O1;hasColor" /> - </edoal:onAttribute> - <edoal:comparator rdf:resource="&xsd;equals" /> - <edoal:value><edoal:Instance rdf:about="&O1;Red"/></edoal:value> - </edoal:AttributeValueRestriction> - </edoal:and> - </edoal:Class> + <Class> + <and rdf:parseType="Collection"> + <Class rdf:about="&O1;LED" /> + <AttributeValueRestriction> + <onAttribute> + <Relation rdf:about="&O1;hasColor" /> + </onAttribute> + <comparator rdf:resource="&edoal;equals" /> + <value><Instance rdf:about="&O1;Red"/></value> + </AttributeValueRestriction> + </and> + </Class> </align:entity1> - <align:entity2><edoal:Class rdf:about="&O2;RedLED" /></align:entity2> + <align:entity2><Class rdf:about="&O2;RedLED" /></align:entity2> <align:relation>=</align:relation> </align:Cell> <align:Cell rdf:about="#cell3"> <align:entity1> - <edoal:Class> - <edoal:and rdf:parseType="Collection"> - <edoal:Class rdf:about="&O1;LED" /> - <edoal:AttributeValueRestriction> - <edoal:onAttribute> - <edoal:Relation rdf:about="&O1;hasColor" /> - </edoal:onAttribute> - <edoal:comparator rdf:resource="&xsd;equals" /> - <edoal:value><edoal:Instance rdf:about="&O1;Green"/></edoal:value> - </edoal:AttributeValueRestriction> - </edoal:and> - </edoal:Class> + <Class> + <and rdf:parseType="Collection"> + <Class rdf:about="&O1;LED" /> + <AttributeValueRestriction> + <onAttribute> + <Relation rdf:about="&O1;hasColor" /> + </onAttribute> + <comparator rdf:resource="&edoal;equals" /> + <value><Instance rdf:about="&O1;Green"/></value> + </AttributeValueRestriction> + </and> + </Class> </align:entity1> - <align:entity2><edoal:Class rdf:about="&O2;GreenLED" /></align:entity2> + <align:entity2><Class rdf:about="&O2;GreenLED" /></align:entity2> <align:relation>=</align:relation> </align:Cell> </div> @@ -923,46 +951,46 @@ O2:GreenLED a edoal:Class. <div class="rdfxml">RDF/XML Syntax</div> <div class="rdfxml"> <align:Cell rdf:about="#cell"> - <align:entity1><edoal:Property rdf:about="&O1;hasWeight" /></align:entity1> - <align:entity2><edoal:Property rdf:about="&O2;weight" /></align:entity2> + <align:entity1><Property rdf:about="&O1;hasWeight" /></align:entity1> + <align:entity2><Property rdf:about="&O2;weight" /></align:entity2> <align:relation>=</align:relation> - <edoal:transformation> - <edoal:Transformation edoal:direction="o-"> - <edoal:entity1> - <edoal:Property><edoal:compose rdf:parseType="Collection"/></edoal:Property> - </edoal:entity1> - <edoal:entity2> - <edoal:Apply edoal:operator="&fn;safe-divide"> - <edoal:arguments rdf:parseType="Collection"> - <edoal:Property><edoal:compose rdf:parseType="Collection"/></edoal:Property> - <edoal:Literal edoal:type="&xsd;float" edoal:string="2.679229" /> - </edoal:arguments> - </edoal:Apply> - </edoal:entity2> - </edoal:Transformation> - </edoal:transformation> + <transformation> + <Transformation edoal:direction="o-"> + <entity1> + <Property><compose rdf:parseType="Collection"/></Property> + </entity1> + <entity2> + <Apply edoal:operator="&fn;safe-divide"> + <arguments rdf:parseType="Collection"> + <Property><compose rdf:parseType="Collection"/></Property> + <Literal edoal:type="&xsd;float" edoal:string="2.679229" /> + </arguments> + </Apply> + </entity2> + </Transformation> + </transformation> </align:Cell> </div> <p /> <div class="rdfxml">RDF/XML Syntax</div> <div class="rdfxml"> <align:Cell rdf:about="#cell"> - <align:entity1><edoal:Class rdf:about="&O1;Person" /></align:entity1> - <align:entity2><edoal:Class rdf:about="&O2;Patient" /></align:entity2> + <align:entity1><Class rdf:about="&O1;Person" /></align:entity1> + <align:entity2><Class rdf:about="&O2;Patient" /></align:entity2> <align:relation>=</align:relation> - <edoal:transformation> - <edoal:Transformation edoal:direction="o-"> - <edoal:entity1><edoal:Property rdf:about="&O1;hasWeight" /></edoal:entity1> - <edoal:entity2> - <edoal:Apply edoal:operator="&fn;safe-divide"> - <edoal:arguments rdf:parseType="Collection"> - <edoal:Property rdf:about="&O2;weight" /> - <edoal:Literal edoal:type="&xsd;float" edoal:string="2.679229" /> - </edoal:arguments> - </edoal:Apply> - </edoal:entity2> - </edoal:Transformation> - </edoal:transformation> + <transformation> + <Transformation edoal:direction="o-"> + <entity1><Property rdf:about="&O1;hasWeight" /></entity1> + <entity2> + <Apply edoal:operator="&fn;safe-divide"> + <arguments rdf:parseType="Collection"> + <Property rdf:about="&O2;weight" /> + <Literal edoal:type="&xsd;float" edoal:string="2.679229" /> + </arguments> + </Apply> + </entity2> + </Transformation> + </transformation> </align:Cell> </div> </div> @@ -997,25 +1025,25 @@ O2:weight a edoal:Property. <div class="rdfxmlDiv"><div class="rdfxml">RDF/XML Syntax</div> <div class="rdfxml"> <align:Cell> - <align:entity1><edoal:Property rdf:about="&O1;price" /></align:entity1> - <align:entity2><edoal:Property rdf:about="&O2;hasPrice" /></align:entity2> + <align:entity1><Property rdf:about="&O1;price" /></align:entity1> + <align:entity2><Property rdf:about="&O2;hasPrice" /></align:entity2> <align:relation>=</align:relation> - <edoal:transformation> - <edoal:Transformation edoal:direction="o-"> - <edoal:entity1> - <edoal:Property><edoal:compose rdf:parseType="Collection"/></edoal:Property> - </edoal:entity1> - <edoal:entity2> - <edoal:Apply edoal:operator="http://www.google.com/finance/converter"> - <edoal:arguments rdf:parseType="Collection"> - <edoal:Property><edoal:compose rdf:parseType="Collection"/></edoal:Property> - <edoal:Literal edoal:value="EUR" /> - <edoal:Literal edoal:value="CNY" /> - </edoal:arguments> - </edoal:Apply> - </edoal:entity2> - </edoal:Transformation> - </edoal:transformation> + <transformation> + <Transformation edoal:direction="o-"> + <entity1> + <Property><compose rdf:parseType="Collection"/></Property> + </entity1> + <entity2> + <Apply edoal:operator="http://www.google.com/finance/converter"> + <arguments rdf:parseType="Collection"> + <Property><compose rdf:parseType="Collection"/></Property> + <Literal edoal:value="EUR" /> + <Literal edoal:value="CNY" /> + </arguments> + </Apply> + </entity2> + </Transformation> + </transformation> </align:Cell> </div> </div> @@ -1057,24 +1085,24 @@ This pattern thus captures all correspondences between two classes, the scope of <div class="rdfxml"> <align:Cell rdf:about="#Cell1"> <align:entity1> - <edoal:Class> - <edoal:and rdf:parseType="Collection"> - <edoal:Class edoal:var="#var1" /> - <edoal:AttributeTypeRestriction> - <edoal:onAttribute> - <edoal:PropertyDomainRestriction edoal:var="#var3"> - <edoal:class> - <edoal:Class edoal:var="#var1" /> - </edoal:class> - </edoal:PropertyDomainRestriction> - </edoal:onAttribute> - <edoal:datatype><edoal:Datatype rdf:about="&xsd;integer" /></edoal:datatype> - </edoal:AttributeTypeRestriction> - </edoal:and> - </edoal:Class> + <Class> + <and rdf:parseType="Collection"> + <Class edoal:var="#var1" /> + <AttributeTypeRestriction> + <onAttribute> + <PropertyDomainRestriction edoal:var="#var3"> + <class> + <Class edoal:var="#var1" /> + </class> + </PropertyDomainRestriction> + </onAttribute> + <datatype><Datatype rdf:about="&xsd;integer" /></datatype> + </AttributeTypeRestriction> + </and> + </Class> </align:entity1> <align:entity2> - <edoal:Class edoal:var="#var2" /> + <Class edoal:var="#var2" /> </align:entity2> <align:relation>=</align:relation> </align:Cell>