Changeset 3458


Ignore:
Timestamp:
19/02/08 12:02:16 (12 years ago)
Author:
spascoe
Message:

Capabilities builder test works

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/branches/ows_framework-refactor/ows_common/ows_common/pylons/templates/wms_capabilities_1_1_1.xml

    r3452 r3458  
    99?> 
    1010 
    11 <WMT_MS_Capabilities xmlns:py="genshi.edgewall.org/" 
     11<WMT_MS_Capabilities xmlns:py="http://genshi.edgewall.org/" 
    1212                     xmlns:xlink="http://www.w3.org/1999/xlink" 
    1313                     version="1.1.1"> 
     
    3838    <Title py:content="ds.titles[0]"/> 
    3939    <Abstract py:if="len(ds.abstracts)>0" py:content="ds.abstracts[0]"/> 
    40     <BoundingBox py:for="bb in ds.boundingBoxes" 
    41                  SRS="${bb.crs}" 
    42                  minx="${bb.lowerCorner[0]}" 
    43                  miny="${bb.lowerCorner[1]}" 
    44                  maxx="${bb.upperCorner[0]}" 
    45                  maxy="${bb.upperCorner[1]}"/> 
     40    <py:for each="bb in ds.boundingBoxes"> 
     41      <BoundingBox SRS="${bb.crs}" 
     42                   minx="${bb.lowerCorner[0]}" 
     43                   miny="${bb.lowerCorner[1]}" 
     44                   maxx="${bb.upperCorner[0]}" 
     45                   maxy="${bb.upperCorner[1]}"/> 
     46    </py:for> 
     47 
    4648    <!-- TODO Attribution from metadata --> 
    4749    <!-- TODO AuthorityURL from metadata --> 
     
    5254    <!-- TODO Style --> 
    5355    <!-- TODO ScaleHint --> 
    54      
    5556    <py:for each="d_n, d in ds.dimensions.iteritems()"> 
    5657      <Dimension name="${d_n}" units="${d.valuesUnit.uoms[0]}" 
     
    6061    </py:for> 
    6162  </Layer> 
    62  
    6363 
    6464  <!--! ====================================================================== --> 
     
    7474    </KeywordList> 
    7575    <!--! <OnlineResource xlink:type="simple" xlink:href="${h.url_for()}"/> --> 
     76     
    7677    <ContactInformation py:if="sm.serviceProvider is not None" 
    7778                        py:with="rp=sm.serviceProvider.serviceContact"> 
     
    8182      </ContactPersonPrimary> 
    8283      <ContactPosition py:content="rp.positionName"/> 
    83        
     84 
    8485      <py:with vars="cn=rp.contactInfo" py:if="cn is not None"> 
    8586        <ContactAddress py:if="cn.address is not None"> 
    8687          <AddressType>postal</AddressType> 
    87           <Address> 
    88             <py:for each="d in cn.address.deliveryPoints" py:content="d"/> 
    89           </Address> 
     88          <Address py:for="d in cn.address.deliveryPoints" py:content="d"/> 
    9089          <City py:content="cn.address.city"/> 
    9190          <StateOrProvince py:content="cn.address.administrativeArea"/> 
     
    101100      </py:with> 
    102101    </ContactInformation> 
     102     
    103103    <Fees py:content="si.fees"/> 
    104104    <AccessConstraints py:content="si.accessConstraints"/> 
    105105  </Service> 
     106   
    106107  <!--! These fields are represented in ows_common as service constraints --> 
    107   <Capability py:with="om=sm.operationsMetadata"> 
    108     <Request> 
    109       <py:for each="opName, op in om.operationDict.items()" 
    110               py:content="markupOperation(opName, op)"/> 
    111     </Request> 
    112     <?python exceptions = op.parameters.get('ExceptionFormat') ?> 
    113     <Exception py:if="exceptions is not None"> 
    114       <Format py:for="e in exceptions.possibleValues.allowedValues" 
    115               py:content="e"/> 
    116     </Exception> 
     108  <Capability py:with="sm=c.service_metadata; om=sm.operationsMetadata"> 
     109    <py:if test="om is not None"> 
     110      <py:for each="opName, op in om.operationDict.items()"> 
     111        <Request py:content="markupOperation(opName, op)"/> 
     112        <?python exceptions = op.parameters.get('ExceptionFormat') ?> 
     113        <Exception py:if="exceptions is not None"> 
     114          <Format py:for="e in exceptions.possibleValues.allowedValues" 
     115                  py:content="e"/> 
     116        </Exception> 
     117      </py:for> 
     118    </py:if> 
    117119     
    118     <Layer py:replace="layer(sm.contents.datasetSummaries[0])"/> 
     120    <Layer py:if="sm.contents is not None" 
     121           py:replace="layer(sm.contents.datasetSummaries[0])"/> 
    119122  </Capability> 
    120123</WMT_MS_Capabilities> 
Note: See TracChangeset for help on using the changeset viewer.