Changeset 6129 for cows


Ignore:
Timestamp:
15/12/09 10:19:44 (10 years ago)
Author:
domlowe
Message:

Modified GetPropertyValue? WFS method so that xpaths are resolved against CSML features with all xlink references fully resolved and replaced with inline content.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/pylons/wfs_controller.py

    r5915 r6129  
    156156        if queryxml: 
    157157            qp=FEQueryProcessor() 
     158            log.info('Sending query: %s to query processor '%queryxml) 
    158159            resultset=qp.evaluate(self.featureset, queryxml) 
    159             log.debug('Final resultset from query processor %s'%resultset) 
     160            log.info('Final resultset from query processor %s'%resultset) 
    160161        elif storedqueryid: 
    161162            storedquery, func=self.layerMapper.queryDescriptions.queries[storedqueryid] 
     
    191192        if attstart == -1: #no attribute             
    192193            for feature in features: 
    193                 featureXML=feature._feature.elem #the underlying XML 
     194                #need to deal with the underlying XML 
     195                #To make sure all xlink references are resolved correctly, convert feature to GML (which calls the CSML toXML() method then read back in with ElementTree 
     196                featureGML=feature.toGML() 
     197                featureXML=etree.fromstring(featureGML)                
     198                 
    194199                valuecomponent=featureXML.find(xpath) 
    195200                if valuecomponent is not None: 
     
    201206            xpath=xpath.split('[')[0] 
    202207            for feature in features: 
    203                 featureXML=feature._feature.elem #the underlying XML 
     208                #get the underlying XML 
     209                featureGML=feature.toGML() 
     210                featureXML=etree.fromstring(featureGML) 
    204211                log.debug('xpath path %s'%xpath) 
    205212                log.debug('attribute %s'%attributeName) 
Note: See TracChangeset for help on using the changeset viewer.