Hello,

I have a problem with parsing GML3 FeatureCollections with Geotools.
My problem ist: I work with geotools and use the functionality to parse 
GML3 FC. I create my own FC and write my own schema for this usecase.
I don't know what the mistake is for this. If the code parse the gml 
with the GML3BAsicParser.java class, then i get this message:

INFORMATION: parser configuration specified schema: 
'http://localhost:8282/wps-demo-dev/demos/TestGML', but instance 
document does not reference this schema.

The parsed object contains the coordinates, but is not able to further 
process with this. So I get an exception:

Error occured, while XML parsing

Can everybody help me to solve this problem, please?

Felix Scholtyssek

My GML-FC looks like this:
<gml:FeatureCollection xmlns:gml="http://www.opengis.net/gml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://localhost:8282/wps-demo-dev/demos/TestGML 
http://localhost:8282/wps-demo-dev/demos/testGML.xsd";>
        <gml:FeatureMember>
                <ns6:LineString xmlns:ns6="http://www.opengis.net/gml"; 
axisLabels="" 
uomLabels="">
        <ns6:pos axisLabels="" uomLabels="">44.390 3.607</ns6:pos>
        <ns6:pos axisLabels="" uomLabels="">46.236 4.047</ns6:pos>
        <ns6:pos axisLabels="" uomLabels="">46.763 8.441</ns6:pos>
                </ns6:LineString>
        </gml:FeatureMember>
</gml:FeatureCollection>

And my test GML schema is this one:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
attributeFormDefault="unqualified" elementFormDefault="qualified" 
targetNamespace="http://www.opengis.net/gml";>
   <xs:element xmlns:gml="http://www.opengis.net/gml"; 
name="FeatureCollection" type="gml:FeatureCollectionType"/>
   <xs:complexType name="posType">
     <xs:simpleContent>
       <xs:extension base="xs:string">
         <xs:attribute type="xs:string" name="axisLabels" use="optional"/>
         <xs:attribute type="xs:string" name="uomLabels" use="optional"/>
       </xs:extension>
     </xs:simpleContent>
   </xs:complexType>
   <xs:complexType name="LineStringType">
     <xs:sequence>
       <xs:element xmlns:gml="http://www.opengis.net/gml"; 
type="gml:posType" name="pos" maxOccurs="unbounded" minOccurs="0"/>
     </xs:sequence>
     <xs:attribute type="xs:string" name="axisLabels"/>
     <xs:attribute type="xs:string" name="uomLabels"/>
   </xs:complexType>
   <xs:complexType name="FeatureMemberType">
     <xs:sequence>
       <xs:element xmlns:gml="http://www.opengis.net/gml"; 
type="gml:LineStringType" name="LineString"/>
     </xs:sequence>
   </xs:complexType>
   <xs:complexType name="FeatureCollectionType">
     <xs:sequence>
       <xs:element xmlns:gml="http://www.opengis.net/gml"; 
type="gml:FeatureMemberType" name="FeatureMember"/>
     </xs:sequence>
   </xs:complexType>
</xs:schema>


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to