[xsd-users] How to get Objects for Elements referenced by xlink:href

Jan Klimke jan.klimke at hpi.uni-potsdam.de
Thu Aug 7 17:16:01 EDT 2008


Hi,

i generated the GML, Web Feature Service classes as well as those for an 
application schema. I managed to sucessfully create requests and receive 
replies from my deegree WFS.

The response look like this (currently there is some nonsense data in my 
database for testing puposes):

<?xml version="1.0" encoding="utf-8"?>
<wfs:FeatureCollection numberOfFeatures='4' 
xmlns:app="http://www.deegree.org/app" 
xmlns:wfs="http://www.opengis.net/wfs" 
xmlns:xlink="http://www.w3.org/1999/xlink" 
xmlns:gml="http://www.opengis.net/gml" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.deegree.org/app 
http://servername:8080/deegree-wfs/services?SERVICE=WFS&amp;VERSION=1.1.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=app:User&amp;NAMESPACE=xmlns(app=http://www.deegree.org/app) 
http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
  <gml:featureMember>
    <app:User gml:id="USER_133">
      <app:id>133</app:id>
      <app:name>Friedrich Engels2</app:name>
      <app:color>
        <app:Color gml:id="COLOR_70">
          <app:id>70</app:id>
          <app:red>1.0</app:red>
          <app:green>0.0</app:green>
          <app:blue>0.0</app:blue>
          <app:alpha>1.0</app:alpha>
        </app:Color>
      </app:color>
    </app:User>
  </gml:featureMember>
  <gml:featureMember>
    <app:User gml:id="USER_134">
      <app:id>134</app:id>
      <app:name>Friedrich Engels</app:name>
      <app:color xlink:href="#COLOR_70"/>
    </app:User>
  </gml:featureMember>
</wfs:FeatureCollection>

As you can see, the second user has a xlink reference in its <app:color> 
property referencing "COLOR_70" which appeared "earlier" in the 
document. My problem is now to obtain a reference to  the Color object 
for the "USER_134" object. How can i resolve such inner document xlink 
references ?

Thanks,
Jan





More information about the xsd-users mailing list