Graphical design component

r1 - 09 Jan 2007 - 00:00:00 - MoinMoin?You are here: TWiki >  TAPIR Web > CustomSearchProposalTwo

CustomSearchProposalTwo

Another proposal to fit the CustomSearch requirements.

The ResponseStructure (starting with ) is defined here using a subset of XML Schema with annotated mappings.

Since the XML Schema schema accepts attribute extensions in most elements using:

Then custom requests would not produce invalid XML due to the attribute annotations.

For counting matches and returned records as well as the paging mechanism we need to give a RecordDefinition, in this case also using the annotation technique.

Request
<request>
   <header>
      ...
   </header>
   <search start="0" limit="2" count="true" xmlns:dwc="http://tdwg.org/dwc/1.0">
   <filter>
      <like concept="dwc:ScientificName">Rubus*</like>
   </filter>
   <structure xmlns:myns="http://example.net/mysn/1.0">
     <xsd:element name="myns:DataSet">
       <xsd:complexType>
         <xsd:sequence>
           <xsd:element name="myns:Specimen" maxOccurs="unbounded" record="dwc:record">
             <xsd:complexType>
               <xsd:sequence>
                 <xsd:element name="myns:CatalogNum" type="xsd:string" concept="dwc:CatalogNumber" CustomSearchProposalTwo>
                 <xsd:element name="myns:Identification" maxOccurs="unbounded" >
                   <xsd:complexType>
                     <xsd:sequence>
                       <xsd:element name="myns:FullName" type="xsd:string" concept="dwc:ScientificName" CustomSearchProposalTwo>
                     </xsd:sequence>
                   </xsd:complexType>
                 </xsd:element>
               </xsd:sequence>
             </xsd:complexType>
           </xsd:element>
         </xsd:sequence>
       </xsd:complexType>
     </xsd:element>
   </structure>
   </search>
</request>

Response
<response>
   <header>
      ...
   </header>
   <content xmlns:myns="http://example.net/mysn/1.0">
      <myns:DataSet>
         <myns:Specimen>
            <myns:CatalogNum>234</myns:CatalogNum>
            <myns:Identification>
               <myns:FullName>Rubus rosaefolius</myns:FullName>
            </myns:Identification>
         </myns:Specimen>
         <myns:Specimen>
            <myns:CatalogNum>239</myns:CatalogNum>
            <myns:Identification>
               <myns:FullName>Rubus brasiliensis</myns:FullName>
            </myns:Identification>
         </myns:Specimen>
      </myns:DataSet>
   </content>
</response>

Edit | Attach | Printable | Backlinks: Web, All Webs | History: r1 | More topic actions
 
Back to TDWG Homepage TDWG Wiki > TAPIR
This site is powered by the TWiki collaboration platform

Valid XHTML 1.0 Transitional
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback