Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

The problem of GML storing in Oracle xml db

511132Sep 24 2006 — edited Oct 12 2006
hello!
I want to store GML data in Oracle XML DB.But there are some questions.its schema is:
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.opengis.net/examples" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ex="http://www.opengis.net/examples" elementFormDefault="qualified" version="2.1.1">
<annotation>
<appinfo>schools.xsd v2.1.1 2001-12</appinfo>
<documentation xml:lang="en">
GML schema for Schools example
</documentation>
</annotation>
<!-- import constructs from the GML Feature and Geometry schemas -->
<import namespace="http://www.opengis.net/gml" schemaLocation="feature.xsd"/>
<!-- ==============================================================
global element declarations
=================================================================== -->
<element name="State" type="ex:StateType" substitutionGroup="gml:_FeatureCollection"/>
<element name="SchoolDistrict" type="ex:SchoolDistrictType" substitutionGroup="gml:_FeatureCollection"/>
<element name="schoolMember" type="gml:FeatureAssociationType" substitutionGroup="gml:featureMember"/>
<element name="School" type="ex:SchoolType" substitutionGroup="gml:_Feature"/>
<element name="College" type="ex:CollegeType" substitutionGroup="gml:_Feature"/>
<element name="address" type="string"/>
<!-- ==============================================================
type definitions for state educational institutions
=================================================================== -->
<complexType name="StateType">
<complexContent>
<extension base="gml:AbstractFeatureCollectionType">
<sequence>
<element name="studentPopulation" type="integer"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="SchoolDistrictType">
<complexContent>
<extension base="gml:AbstractFeatureCollectionType">
<sequence>
<element ref="gml:extentOf"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="SchoolType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element ref="ex:address"/>
<element ref="gml:location"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="CollegeType">
<complexContent>
<extension base="gml:AbstractFeatureType">
<sequence>
<element ref="ex:address"/>
<element ref="gml:pointProperty"/>
</sequence>
</extension>
</complexContent>
</complexType>
</schema>
I register it succefully.
then I create table(schools) based this schema
finally I insert the data into schools the data is:
<?xml version="1.0" encoding="UTF-8"?>
<State xmlns="http://www.opengis.net/examples" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/examples schools.xsd">
<gml:description>
Educational institutions with student populations exceeding 500.
</gml:description>
<gml:name>School districts in the North Region.</gml:name>
<gml:boundedBy>
<gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coord>
<gml:X>0</gml:X>
<gml:Y>0</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>50</gml:X>
<gml:Y>50</gml:Y>
</gml:coord>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<SchoolDistrict>
<gml:name>District 28</gml:name>
<gml:boundedBy>
<gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coord>
<gml:X>0</gml:X>
<gml:Y>0</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>50</gml:X>
<gml:Y>40</gml:Y>
</gml:coord>
</gml:Box>
</gml:boundedBy>
<schoolMember>
<School>
<gml:name>Alpha</gml:name>
<address>100 Cypress Ave.</address>
<gml:location>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coord>
<gml:X>20.0</gml:X>
<gml:Y>5.0</gml:Y>
</gml:coord>
</gml:Point>
</gml:location>
</School>
</schoolMember>
<schoolMember>
<School>
<gml:name>Beta</gml:name>
<address>1673 Balsam St.</address>
<gml:location>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coord>
<gml:X>40.0</gml:X>
<gml:Y>5.0</gml:Y>
</gml:coord>
</gml:Point>
</gml:location>
</School>
</schoolMember>
<gml:extentOf>
<gml:Polygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coord>
<gml:X>0</gml:X>
<gml:Y>0</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>50</gml:X>
<gml:Y>0</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>50</gml:X>
<gml:Y>40</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>0</gml:X>
<gml:Y>0</gml:Y>
</gml:coord>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:extentOf>
</SchoolDistrict>
</gml:featureMember>
<gml:featureMember>
<SchoolDistrict>
<gml:name>District 32</gml:name>
<gml:boundedBy>
<gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coord>
<gml:X>0</gml:X>
<gml:Y>0</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>30</gml:X>
<gml:Y>50</gml:Y>
</gml:coord>
</gml:Box>
</gml:boundedBy>
<schoolMember>
<School>
<gml:name>Gamma</gml:name>
<address>651 Sequoia Ave.</address>
<gml:location>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coord>
<gml:X>5.0</gml:X>
<gml:Y>20.0</gml:Y>
</gml:coord>
</gml:Point>
</gml:location>
</School>
</schoolMember>
<schoolMember>
<College>
<gml:name>Delta</gml:name>
<address>260 University Blvd.</address>
<gml:pointProperty>
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coord>
<gml:X>5.0</gml:X>
<gml:Y>40.0</gml:Y>
</gml:coord>
</gml:Point>
</gml:pointProperty>
</College>
</schoolMember>
<schoolMember xlink:type="simple" xlink:title="Epsilon High School" xlink:href="http:www.state.gov/schools/cgi-bin/wfs?schoolID=hs736" gml:remoteSchema="schools.xsd#xpointer(//complexType[@name='SchoolType'])"/>
<gml:extentOf>
<gml:Polygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coord>
<gml:X>0</gml:X>
<gml:Y>0</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>40</gml:X>
<gml:Y>50</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>50</gml:X>
<gml:Y>50</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>0</gml:X>
<gml:Y>0</gml:Y>
</gml:coord>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:extentOf>
</SchoolDistrict>
</gml:featureMember>
<studentPopulation>392620</studentPopulation>
</State>
there are many questions.
please help me.thanks very much!

Message was edited by:
user508129
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 9 2006
Added on Sep 24 2006
18 comments
2,331 views