OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

dsml message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: schema revisions


I've attached a revision of DSMLv2.xsd that uses attributes rather than elements in the leaves of the filter grammar. Note that we're not 'inventing' a new syntax, but rather adapting the RFC2251 grammar to the XML domain.

Jeff's example with these revisions is:

<filter>
  <and>
    <eql desc="objectClass" value="person"/>
    <or>
      <eql desc="sn" value="smith"/>
      <eql desc="title" value="developer"/>
    </or>
  </and>
</filter>

which is less verbose and just as usable with XML technologies such as XSLT which is the basic consideration for making the filter be an XML object, as I believe others have already discussed. Within the context of a DSMLv2 server there will be opportunities to perform transformations of filters, predications on filters, etc. For example, a DSMLv2 agent/server might find it useful to be able to add a condition to the <and> above for example, <is desc="external"/>. With an XML representation it is straightforward to use XPath to locate the conjunct and then using a DOM setter to add the test for before further processing is performed or as the overall object is reserialized for transport to another DSMLv2 agent/server.

ciao,
Christine

Jeff Parham wrote:

Re #1, your equivalent of

<filter>(&(objectClass=person)(|(sn=smith)(title=developer)))</filter>

would be

<filter>
  <and>
    <eql> <desc>objectClass</desc> <val>person</val> </eql>
    <or>
      <eql> <desc>sn</desc> <val>smith</val> </eql>
      <eql> <desc>title</desc> <val>developer</val> </eql>
    </or>
  </and>
</filter>

Is that correct?

Can someone crystallize the advantages of using an XML transformation of
the raw RFC 2251 filter structure over use of the RFC 2254 string
representation?  Someone mentioned the desire to transform the filter
using XSL, but offhand I can't think of an example where a client would
need to do this.

Do you envision DSML clients building these filters element-by-element?

Thanks,
-J

-----Original Message-----
From: Christine Tomlinson [mailto:chris.tomlinson@sun.com]
Sent: Tuesday, August 07, 2001 6:10 PM
To: DSML version 2
Subject: schema revisions

The attached is a revision of the DSMLv2.xsd and Batch.xsd with the
following items:

1) completes the Filter definition

2) incorporates Jeff's changes for:
     Adds controls to the LDAPResult element,
     Removes the dn attribute from ExtendedResponse,
     requestID is an attribute and added to envelopes in Batch.xsd,
     oc-value minOccurs='0',
   I didn't see where the typo in LDAPErrorCode enumeration was?

3) bindRequest and bindResponse are added. Intent is that bindRequest
MAY be supported and if supported "simple" BindMechanism MUST be
supported and the others (cram-MD5, digest-MD5, and kerberos) MAY be
supported. Further, an implementation of bindRequest will perform ALL
necessary exchanges prior to returning the bindResponse. There is NO
need for sequencing at the DSML level.

ciao,
Christine

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns="http://www.dsml.org/DSML/v2/base"
 targetNamespace="http://www.dsml.org/DSML/v2/base"
 elementFormDefault="qualified">

<!-- DSML Requests -->
<xsd:group name="DSMLRequest">
    <xsd:choice>
      <xsd:element name="bindRequest" type="BindRequest" />
      <xsd:element name="searchRequest" type="SearchRequest" />
      <xsd:element name="modifyRequest" type="ModifyRequest" />
      <xsd:element name="addRequest" type="AddRequest" />
      <xsd:element name="delRequest" type="DelRequest" />
      <xsd:element name="modDNRequest" type="ModifyDNRequest" />
      <xsd:element name="compareRequest" type="CompareRequest" />
      <xsd:element name="extendedReq" type="ExtendedRequest" />
    </xsd:choice>    
</xsd:group>

<!-- DSML Responses -->
<xsd:group name="DSMLResponse">
    <xsd:choice>
       <xsd:element name="bindResponse"  type="LDAPResult"/>
       <xsd:element name="searchResponse"  type="SearchResponse"/>
       <xsd:element name="modifyResponse" type="LDAPResult" />
       <xsd:element name="addResponse" type="LDAPResult" />
       <xsd:element name="delResponse" type="LDAPResult" />
       <xsd:element name="modDNResponse" type="LDAPResult" />
       <xsd:element name="compareResponse" type="LDAPResult" />
       <xsd:element name="extendedResp" type="ExtendedResponse" />
       <xsd:element name="errorResponse" type="xsd:string" />
    </xsd:choice>    
</xsd:group>



<!-- **** DSML Control **** --> 
<xsd:complexType name="Control">
  <xsd:sequence>
    <xsd:element name="controlType" minOccurs="1" maxOccurs="1" type="xsd:string" />
    <xsd:element name="criticality" minOccurs="0" default="false" type="xsd:boolean" />
    <xsd:element name="controlValue" minOccurs="0" maxOccurs="1" type="xsd:string" />
  </xsd:sequence>
</xsd:complexType>

<!-- **** DSML Filter **** --> 
<xsd:complexType name="Filter">
  <xsd:group minOccurs="0" maxOccurs="1" ref="FilterGroup"/>
</xsd:complexType>

<xsd:group name="FilterGroup">
  <xsd:sequence>
    <xsd:choice minOccurs="0" maxOccurs="unbounded" >
      <xsd:element name="and" type="FilterSet"/>
      <xsd:element name="or"  type="FilterSet"/>
      <xsd:element name="not"  type="Filter"/>
      <xsd:element name="eql" type="AttributeValueAssertion"/>
      <xsd:element name="sub" type="SubstringFilter"/>
      <xsd:element name="geq" type="AttributeValueAssertion"/>
      <xsd:element name="leq" type="AttributeValueAssertion"/>
      <xsd:element name="is" type="AttributeDescription"/>
      <xsd:element name="approx" type="AttributeValueAssertion"/>
      <xsd:element name="extended" type="MatchingRuleAssertion"/>
    </xsd:choice>    
  </xsd:sequence>
</xsd:group>

<xsd:complexType name="FilterSet">
  <xsd:sequence>
    <xsd:group minOccurs="0" maxOccurs="unbounded" ref="FilterGroup"/>
  </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="AttributeValueAssertion">
  <xsd:attribute name="desc" type="xsd:string"/>
  <xsd:attribute name="value" type="xsd:string"/>
</xsd:complexType>

<xsd:complexType name="AttributeDescription">
  <xsd:attribute name="desc" type="xsd:string"/>
</xsd:complexType>

<xsd:complexType name="SubstringFilter">
  <xsd:attribute name="type" type="xsd:string"/>
  <xsd:attribute name="initial" use="optional" type="xsd:string"/>
  <xsd:attribute name="any" use="optional" type="xsd:string"/>
  <xsd:attribute name="final" use="optional" type="xsd:string"/>
</xsd:complexType>

<xsd:complexType name="MatchingRuleAssertion">
  <xsd:sequence>
    <xsd:element name="value" type="OctetString"/>
  </xsd:sequence>
  <xsd:attribute name="dnAttributes" use="optional" type="xsd:boolean" default="false"/>
  <xsd:attribute name="matchingRule" use="optional" type="xsd:string"/>
  <xsd:attribute name="type" use="optional" type="xsd:string"/>
</xsd:complexType>

<!-- ***** Octet String as BASE64 ***** -->
<xsd:simpleType name="OctetString">
  <xsd:restriction base="xsd:string"/>
</xsd:simpleType>

<!-- ***** MAX Integer ***** -->
<xsd:simpleType name="MAXINT">
    <xsd:restriction base="xsd:unsignedInt">
       <xsd:maxInclusive value="2147483647" />
   </xsd:restriction>
</xsd:simpleType>

<!--  *************** LDAP RESULT ********************* -->

<xsd:simpleType name="LDAPErrorCode">
   <xsd:restriction base="xsd:string">
         <xsd:enumeration value="success" />
         <xsd:enumeration value="operationsError" />
         <xsd:enumeration value="protocolError" />
         <xsd:enumeration value="timeLimitExceeded" />
         <xsd:enumeration value="sizeLimitExceeded" />
         <xsd:enumeration value="compareFalse" />
         <xsd:enumeration value="compareTrue" />
         <xsd:enumeration value="authMethodNotSupported" />
         <xsd:enumeration value="strongAuthRequired" />
         <xsd:enumeration value="referral" />
         <xsd:enumeration value="adminLimitExceeded" />
         <xsd:enumeration value="unavailableCriticalExtension" />
         <xsd:enumeration value="confidentialityRequired" />
         <xsd:enumeration value="saslBindInProgress" />
         <xsd:enumeration value="noSuchAttribute" />
         <xsd:enumeration value="undefinedAttributeType" />
         <xsd:enumeration value="inappropriateMatching" />
         <xsd:enumeration value="constraintViolation" />
         <xsd:enumeration value="attributeOrValueExists" />
         <xsd:enumeration value="invalidAttributeSyntax" />
         <xsd:enumeration value="noSuchObject" />
         <xsd:enumeration value="aliasProblem" />
         <xsd:enumeration value="invalidDNSyntax" />
         <xsd:enumeration value="aliasDerefencingProblem" />
         <xsd:enumeration value="inappropriateAuthentication" />
         <xsd:enumeration value="invalidCredentials" />
         <xsd:enumeration value="insufficientAccessRights" />
         <xsd:enumeration value="busy" />
         <xsd:enumeration value="unavailable" />
         <xsd:enumeration value="unwillingToPerform" />
         <xsd:enumeration value="loopDetect" />
         <xsd:enumeration value="namingViolation" />
         <xsd:enumeration value="objectClassViolation" />
         <xsd:enumeration value="notAllowedOnNonLeaf" />
         <xsd:enumeration value="notAllowedOnRDN" />
         <xsd:enumeration value="entryAlreadyExists" />
         <xsd:enumeration value="objectClassModsProhibited" />
         <xsd:enumeration value="affectMultipleDSAs" />
         <xsd:enumeration value="other" />
         <xsd:enumeration value="notAttempted" />
         <xsd:enumeration value="couldNotConnect" />
         <xsd:enumeration value="connectionClosed" />
    </xsd:restriction>
</xsd:simpleType>

<xsd:complexType name="LDAPResult">
  <xsd:sequence>
    <xsd:element name="resultCode" minOccurs="1" maxOccurs="1"> 
         <xsd:complexType>
            <xsd:simpleContent>
               <xsd:extension base="xsd:int">
                   <xsd:attribute name="descr" use="optional" type="LDAPErrorCode" />
               </xsd:extension>
            </xsd:simpleContent>
         </xsd:complexType>  
    </xsd:element>
    <xsd:element name="matchedDN" minOccurs="0" maxOccurs="1" default="" type="xsd:string" />
    <xsd:element name="errorMessage" minOccurs="0" maxOccurs="1" default="" type="xsd:string" />
    <xsd:element name="referral"  minOccurs="0" maxOccurs="unbounded" default=""  type="xsd:string" />
    <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>
  </xsd:sequence>
  <xsd:attribute name="requestID" use="optional" type="xsd:string" />
</xsd:complexType>

<xsd:complexType name="BindRequest">
  <xsd:sequence>
    <xsd:element name="principal" type="OctetString"/>
    <xsd:element name="credentials" type="OctetString"/>
  </xsd:sequence>
  <xsd:attribute name="type" use="optional" type="BindMechansim" default="simple"/>
</xsd:complexType>

<xsd:simpleType name="BindMechansim">
   <xsd:restriction base="xsd:string">
         <xsd:enumeration value="simple"/>
         <xsd:enumeration value="CRAM-MD5"/>
         <xsd:enumeration value="Digest-MD5"/>
         <xsd:enumeration value="Kerberos"/>
  </xsd:restriction>
</xsd:simpleType>


<!-- *************** Search********************* -->



<xsd:complexType name="SearchRequest">
<xsd:sequence>
    <xsd:element name="scope" minOccurs="1" maxOccurs="1">
	<xsd:simpleType>
   	   <xsd:restriction base="xsd:string">
              <xsd:enumeration value="baseObject" />
              <xsd:enumeration value="singleLevel" />
              <xsd:enumeration value="wholeSubtree" />
           </xsd:restriction>
        </xsd:simpleType>
    </xsd:element>
    <xsd:element name="derefAliases" minOccurs="1" maxOccurs="1">
	 <xsd:simpleType>
	   <xsd:restriction base="xsd:string">
              <xsd:enumeration value="neverDerefAliases" />
              <xsd:enumeration value="derefInSearching" />
              <xsd:enumeration value="derefFindingBaseObj" />
              <xsd:enumeration value="derefAlways" />
           </xsd:restriction>
        </xsd:simpleType>
    </xsd:element>
    <xsd:element name="sizeLimit" minOccurs="0" maxOccurs="1" default="0" type="MAXINT" />
    <xsd:element name="timeLimit" minOccurs="0" maxOccurs="1" default="0" type="MAXINT" />
    <xsd:element name="typesOnly" minOccurs="0" maxOccurs="1" default="false" type="xsd:boolean" />
    <xsd:element name="filter" minOccurs="1" maxOccurs="1" type="Filter" />
    <xsd:element name="attributes" minOccurs="0" maxOccurs="1" type="xsd:string" />
    <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>
 </xsd:sequence>
 <xsd:attribute name="requestID" use="optional" type="xsd:string" />
 <xsd:attribute name="dn" use="required" type="xsd:string" />
</xsd:complexType>


<xsd:complexType name="SearchResponse">
   <xsd:sequence>
       <xsd:element name="searchResEntry" minOccurs="0" maxOccurs="unbounded" type="SearchResultEntry" />
       <xsd:element name="searchResRef"  minOccurs="0" maxOccurs="unbounded" type="SearchResultRef"/>
       <xsd:element name="searchResDone" minOccurs="1" maxOccurs="1" type="LDAPResult" />
   </xsd:sequence>
</xsd:complexType>



<xsd:complexType name="SearchResultEntry">
     <xsd:sequence>
       <xsd:element name="objectclass" minOccurs="0" maxOccurs="1" type="ObjectClass" />      
       <xsd:element name="attr" minOccurs="0" maxOccurs="unbounded" type="DsmlAttr" />
       <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>
   </xsd:sequence>
   <xsd:attribute name="dn" use="required" type="xsd:string" />
</xsd:complexType>



<xsd:complexType name="DsmlAttr">
   <xsd:sequence>       
       <xsd:element name="value" minOccurs="0" maxOccurs="unbounded">
         <xsd:complexType>
            <xsd:simpleContent>
               <xsd:extension base="xsd:string">
                     <xsd:attribute name="encoding" use="optional" >   
                         <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                <xsd:enumeration value="base64" />
                             </xsd:restriction>
                        </xsd:simpleType>
                     </xsd:attribute>
               </xsd:extension>
            </xsd:simpleContent>
         </xsd:complexType>  
       </xsd:element>
   </xsd:sequence>
   <xsd:attribute name="name" use="required" type="xsd:string" />
   <xsd:attribute name="ref" use="optional" type="xsd:anyURI" />
</xsd:complexType>


<xsd:complexType name="DsmlModifyAttr">
   <xsd:sequence>
     <xsd:element name="value" maxOccurs="unbounded">
         <xsd:complexType>
            <xsd:simpleContent>
               <xsd:extension base="xsd:string">
                     <xsd:attribute name="encoding" use="optional" >   
                         <xsd:simpleType>
                             <xsd:restriction base="xsd:string">
                                <xsd:enumeration value="base64" />
                             </xsd:restriction>
                        </xsd:simpleType>
                     </xsd:attribute>
               </xsd:extension>
            </xsd:simpleContent>
         </xsd:complexType>   
     </xsd:element>     
   </xsd:sequence>
   <xsd:attribute name="name" use="required" type="xsd:string" />
   <xsd:attribute name="operation" use="required" > 
        <xsd:simpleType>
   	   <xsd:restriction base="xsd:string">
              <xsd:enumeration value="add" />
              <xsd:enumeration value="delete" />
              <xsd:enumeration value="replace" />
           </xsd:restriction>
        </xsd:simpleType>
   </xsd:attribute>
</xsd:complexType>

<xsd:complexType name="ObjectClass">
  <xsd:sequence>
    <xsd:element name="oc-value" minOccurs="0" maxOccurs="unbounded" >
         <xsd:complexType>
            <xsd:simpleContent>
               <xsd:extension base="xsd:string">
                     <xsd:attribute name="ref" use="optional" type="xsd:anyURI" />   
                </xsd:extension>
            </xsd:simpleContent>
         </xsd:complexType>   
    </xsd:element>
  </xsd:sequence>
</xsd:complexType>



<xsd:complexType name="SearchResultRef">
  <xsd:sequence>
     <xsd:element name="ldapURL" minOccurs="1" maxOccurs="unbounded" type="xsd:string" />
     <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>
  </xsd:sequence>
</xsd:complexType>



<!-- ************* MODIFY ******************** -->
<xsd:complexType name="ModifyRequest">
  <xsd:sequence>
    <xsd:element name="attr" minOccurs="1" maxOccurs="unbounded" type="DsmlModifyAttr" />
    <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>
  </xsd:sequence>
  <xsd:attribute name="dn" use="required" type="xsd:string" />
  <xsd:attribute name="requestID" use="optional" type="xsd:string" />
</xsd:complexType>





<!--  *************** ADD ********************* -->
<xsd:complexType name="AddRequest">
  <xsd:sequence>
     <xsd:element name="objectclass" minOccurs="0" maxOccurs="1" type="ObjectClass" />           
     <xsd:element name="attr" minOccurs="0" maxOccurs="unbounded" type="DsmlAttr" />
     <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>
  </xsd:sequence>  
  <xsd:attribute name="dn" use="required" type="xsd:string"/>
  <xsd:attribute name="requestID" use="optional" type="xsd:string" />
</xsd:complexType>



<!-- *************** DELETE ********************* -->
<xsd:complexType name="DelRequest">
  <xsd:sequence>
      <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>
  </xsd:sequence>
  <xsd:attribute name="requestID" use="optional" type="xsd:string" />
  <xsd:attribute name="dn" use="required" type="xsd:string"/>  
</xsd:complexType>



<!-- *************** MODIFY DN ********************* -->
<xsd:complexType name="ModifyDNRequest">
  <xsd:sequence>
      <xsd:element name="newrdn" minOccurs="1" maxOccurs="1" type="xsd:string" />
      <xsd:element name="deleteoldrdn" minOccurs="1" maxOccurs="1" type="xsd:boolean" />
      <xsd:element name="newSuperior" minOccurs="0" maxOccurs="1" type="xsd:string" /> 
      <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>
  </xsd:sequence>
  <xsd:attribute name="requestID" use="optional" type="xsd:string" />
  <xsd:attribute name="dn" use="required" type="xsd:string"/>  
</xsd:complexType>



<!-- ************* COMPARE ******************** -->
<xsd:complexType name="CompareRequest">
  <xsd:sequence>
    <xsd:element name="attr" minOccurs="1" maxOccurs="1" type="DsmlAttr" />
    <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>  
  </xsd:sequence>
  <xsd:attribute name="requestID" use="optional" type="xsd:string" />
  <xsd:attribute name="dn" use="required" type="xsd:string"/>  
</xsd:complexType>


<!-- ************* EXTENDED OPERATION ******************** -->

<xsd:complexType name="ExtendedRequest">
  <xsd:sequence>
     <xsd:element name="requestName" minOccurs="1" maxOccurs="1" type="xsd:string" /> 
     <xsd:element name="requestValue" minOccurs="0" maxOccurs="1" type="xsd:string" /> 
     <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>
  </xsd:sequence>
  <xsd:attribute name="requestID" use="optional" type="xsd:string" />
</xsd:complexType>

<xsd:complexType name="ExtendedResponse">
  <xsd:sequence>
     <xsd:element name="resultCode" minOccurs="1" maxOccurs="1"> 
         <xsd:complexType>
            <xsd:simpleContent>
               <xsd:extension base="xsd:int">
                   <xsd:attribute name="descr" use="optional" type="LDAPErrorCode" />
               </xsd:extension>
            </xsd:simpleContent>
         </xsd:complexType>  
     </xsd:element>
     <xsd:element name="matchedDN" minOccurs="0" maxOccurs="1" default="" type="xsd:string" />
     <xsd:element name="errorMessage" minOccurs="0" maxOccurs="1" default=""  type="xsd:string" />
     <xsd:element name="referral"  minOccurs="0" maxOccurs="unbounded" default="" type="xsd:string" />
     <xsd:element name="responseName" minOccurs="0" maxOccurs="1" type="xsd:string" />       
     <xsd:element name="response" minOccurs="0" maxOccurs="1" type="xsd:string" />
     <xsd:element name="control" minOccurs="0" maxOccurs="unbounded" type="Control"/>
  </xsd:sequence>
  <xsd:attribute name="requestID" use="optional" type="xsd:string" />
</xsd:complexType>

<!-- ********************END base SCHEMA ********************* -->

</xsd:schema>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC