W3C home > Mailing lists > Public > www-webdav-dasl@w3.org > January to March 2002

DASL Where statement.

From: Sung Kim <hunkim@cse.ucsc.edu>
Date: Wed, 30 Jan 2002 14:20:36 -0800 (PST)
To: www-webdav-dasl-request@w3.org
Message-ID: <Pine.GSO.4.44.0201301419020.25388-100000@sundance.cse.ucsc.edu>
 Hello,

 The new DASL draft is out.

 I thought about <where> syntax in DASL.
 If we want to express '( a=b and c=d ) or (e=f and g<h)' ----(*)

 We should use <WHERE> statement like this:

 <d:where>
   <d:or>
     <d:and>
       <d:eq>
         <d:a/>
         <d:b/>
       </d:eq>
       <d:eq>
         <d:c/>
         <d:d/>
       </d:/eq>
      </d:and>
      <d:and>
       <d:eq>
         <d:e/>
         <d:f/>
       </d:eq>
       <d:gt>
         <d:g/>
         <d:h/>
       </d:/eq>
      </d:and>
    </d:or>
  <d:/where>

 But if we can use the operation '<d:or/>' in between two element,
 it might be simple
 and might be closer to the normal expression.

 This is the example :

 <d:where>
   <d:a/><d:eq/><d:b/><d:and><d:b/><d:eq/><d:c/>
   <d:or/>
   <d:d/><d:eq/><d:e/><d:and><d:f/><d:gt/><d:g/>
 </d:where>

 It is easier to make a SQL statement from the XML statement.

 Also we need some operation elements to express priority such as
 parentheses.
 Let's suppose it is "<d:paren>".

 The (*) expression will be translated in DASL XML like this:

 <d:where>
   <d:paren>
     <d:a/><d:eq/><d:b/><d:and><d:b/><d:eq/><d:c/>
   </d:paren>
   <d:or/>
   <d:paren>
     <d:d/><d:eq/><d:e/><d:and><d:f/><d:gt/><d:g/>
   </d:paren>
 </d:where>

--
 Sung Kim <hunkim@cse.ucsc.edu>
 http://www.cse.ucsc.edu/~hunkim

  "Dreams become reality!"
Received on Wednesday, 30 January 2002 17:21:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 22 March 2009 03:38:08 GMT