Przykład 3a
a. Warunek
Compact URI prefixes:
bks expands into http://example.com/books#
cpt expands into http://example.com/concepts#
curr expands into http://example.com/currencies#
RIF condition
And (Exists ?Buyer ("cpt:purchase"^^rif:iri(?Buyer
?Seller
"cpt:book"^^rif:iri(?Author "bks:LeRif"^^rif:iri)
"curr:USD"^^rif:iri("49"^^xsd:integer)))
?Seller=?Author )
b. Serializacja XML
<And>
<formula>
<Exists>
<declare><Var>Buyer</Var></declare>
<formula>
<Atom>
<op><Const type="rif:iri">cpt:purchase</Const></op>
<arg><Var>Buyer</Var></arg>
<arg><Var>Seller</Var></arg>
<arg>
<Expr>
<op><Const type="rif:iri">cpt:book</Const></op>
<arg><Var>Author</Var></arg>
<arg><Const type="rif:iri">bks:LeRif</Const></arg>
</Expr>
</arg>
<arg>
<Expr>
<op><Const type="rif:iri">curr:USD</Const></op>
<arg><Const type="xsd:integer">49</Const></arg>
</Expr>
</arg>
</Atom>
</formula>
</Exists>
</formula>
<formula>
<Equal>
<side><Var>Seller</Var></side>
<side><Var>Author</Var></side>
</Equal>
</formula>
</And>
Powrót do dokumentu