Re: Type checking in DASL

At 05:39 PM 4/17/98 PDT, Babich, Alan wrote:
>This memo describes one approach to introduce syntactic type checking into
DASL without relying on XML extensions.

Alan this is a cool idea but I don't think it can work.

1) Extensibility:  adding a new operator requires extending the DTD.

2) Sufficiency:  We can only know the datatypes of live properties, in
particular of DAV-defined properties.  So the paradigm example you use
"cow > 3" can't be caught by a syntax check alone.

3) If we need typing at all, we'll need a way to convey typing in the query
schema discovery, too; and I don't think it should convey this by sending a
DTD (although in some sense that's part what XML-Data is trying to do:
provide an XML encoding of a DTD.)

4) It makes the syntax of a query unbearably clumsy.  In fact, the examples
you provide don't even follow the syntax you define, it should be
<where>
  <boolean_op>
    <or>
     <BOOLEAN_EXPR>
       <BOOLEAN_OP>
         <and>
           <BOOLEAN_EXPR>
             <boolean_op>
               <eq_string>
                 <STRING_EXPR>
                   <string_prop> 
                       loan_processor 
                   </string_prop>

etc, where I use upper case to show the tags you omitted.  See, already
it's a pain.

5) Clarity: I think that getting a 'syntax' error is a poor way to show a
user that they've made a mistake.

Also, minor nit, the property above should have been
<prop><loan_processor></prop> (and, of course, we're not even bothering
with namespaces here, okay.)

If we need type checking (I am unconvinced we do) then a better way is needed.

Best regards

Jim

Received on Sunday, 19 April 1998 22:18:29 UTC