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

pl/miw/miw08_xtt_rif/przyklad3.txt · ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0