473,288 Members | 1,729 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,288 software developers and data experts.

Getting error while compling schema file usin JAXB api

hello friends ,
i am using to jdk6 and JAXB2.0, i have geomtry.xsd file i am trying to compile this file using jaxb but i got some error i.e.The particle of the type is not a valid restriction of the particle of the base
this xsd file is valid as per w3c standard i am also providing error in detail and geometry.xsd file

geometry.xsd
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.opengis.net/gml" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" elementFormDefault="qualified" version="2.1.2">
<annotation>
<appinfo>geometry.xsd v2.1.2 2002-07</appinfo>
<documentation xml:lang="en">
GML Geometry schema. Copyright (c) 2001,2002 OGC, All Rights Reserved.
</documentation>
</annotation>
<!-- bring in the XLink attributes -->
<import namespace="http://www.w3.org/1999/xlink" schemaLocation="D:/data/soiGenericXSD/xlink/1.0.0/xlinks.xsd"/>
<!-- ================================================== ============
global declarations
================================================== ================= -->
<element name="_Geometry" type="gml:AbstractGeometryType" abstract="true"/>
<element name="_GeometryCollection" type="gml:GeometryCollectionType" abstract="true" substitutionGroup="gml:_Geometry"/>
<element name="geometryMember" type="gml:GeometryAssociationType"/>
<element name="pointMember" type="gml:PointMemberType" substitutionGroup="gml:geometryMember"/>
<element name="lineStringMember" type="gml:LineStringMemberType" substitutionGroup="gml:geometryMember"/>
<element name="polygonMember" type="gml:PolygonMemberType" substitutionGroup="gml:geometryMember"/>
<element name="outerBoundaryIs" type="gml:LinearRingMemberType"/>
<element name="innerBoundaryIs" type="gml:LinearRingMemberType"/>
<!-- primitive geometry elements -->
<element name="Point" type="gml:PointType" substitutionGroup="gml:_Geometry"/>
<element name="LineString" type="gml:LineStringType" substitutionGroup="gml:_Geometry"/>
<element name="LinearRing" type="gml:LinearRingType" substitutionGroup="gml:_Geometry"/>
<element name="Polygon" type="gml:PolygonType" substitutionGroup="gml:_Geometry"/>
<element name="Box" type="gml:BoxType"/>
<!-- aggregate geometry elements -->
<element name="MultiGeometry" type="gml:GeometryCollectionType" substitutionGroup="gml:_Geometry"/>
<element name="MultiPoint" type="gml:MultiPointType" substitutionGroup="gml:_Geometry"/>
<element name="MultiLineString" type="gml:MultiLineStringType" substitutionGroup="gml:_Geometry"/>
<element name="MultiPolygon" type="gml:MultiPolygonType" substitutionGroup="gml:_Geometry"/>
<!-- coordinate elements -->
<element name="coord" type="gml:CoordType"/>
<element name="coordinates" type="gml:CoordinatesType"/>
<!-- this attribute gives the location where an element is defined -->
<attribute name="remoteSchema" type="anyURI"/>
<!-- ================================================== ============
abstract supertypes
================================================== ================= -->
<complexType name="AbstractGeometryType" abstract="true">
<annotation>
<documentation>
All geometry elements are derived from this abstract supertype;
a geometry element may have an identifying attribute (gid).
It may be associated with a spatial reference system.
</documentation>
</annotation>
<complexContent>
<restriction base="anyType">
<attribute name="gid" type="ID" use="optional"/>
<attribute name="srsName" type="anyURI" use="optional"/>
</restriction>
</complexContent>
</complexType>
<complexType name="AbstractGeometryCollectionBaseType" abstract="true">
<annotation>
<documentation>
This abstract base type for geometry collections just makes the
srsName attribute mandatory.
</documentation>
</annotation>
<complexContent>
<restriction base="gml:AbstractGeometryType">
<attribute name="gid" type="ID" use="optional"/>
<attribute name="srsName" type="anyURI" use="required"/>
</restriction>
</complexContent>
</complexType>
<attributeGroup name="AssociationAttributeGroup">
<annotation>
<documentation>
These attributes can be attached to any element, thus allowing it
to act as a pointer. The 'remoteSchema' attribute allows an element
that carries link attributes to indicate that the element is declared
in a remote schema rather than by the schema that constrains the
current document instance.
</documentation>
</annotation>
<attributeGroup ref="xlink:simpleLink"/>
<attribute ref="gml:remoteSchema" use="optional"/>
</attributeGroup>
<complexType name="GeometryAssociationType">
<annotation>
<documentation>
An instance of this type (e.g. a geometryMember) can either
enclose or point to a primitive geometry element. When serving
as a simple link that references a remote geometry instance,
the value of the gml:remoteSchema attribute can be used to
locate a schema fragment that constrains the target instance.
</documentation>
</annotation>
<sequence minOccurs="0">
<element ref="gml:_Geometry"/>
</sequence>
<attributeGroup ref="xlink:simpleLink"/>
<attribute ref="gml:remoteSchema" use="optional"/>
<!-- <attributeGroup ref="gml:AssociationAttributeGroup"/> -->
</complexType>
<complexType name="PointMemberType">
<annotation>
<documentation>Restricts the geometry member to being a Point instance.</documentation>
</annotation>
<complexContent>
<restriction base="gml:GeometryAssociationType">
<sequence minOccurs="0">
<element ref="gml:Point"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</restriction>
</complexContent>
</complexType>
<complexType name="LineStringMemberType">
<annotation>
<documentation>Restricts the geometry member to being a LineString instance.</documentation>
</annotation>
<complexContent>
<restriction base="gml:GeometryAssociationType">
<sequence minOccurs="0">
<element ref="gml:LineString"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</restriction>
</complexContent>
</complexType>
<complexType name="PolygonMemberType">
<annotation>
<documentation>Restricts the geometry member to being a Polygon instance.</documentation>
</annotation>
<complexContent>
<restriction base="gml:GeometryAssociationType">
<sequence minOccurs="0">
<element ref="gml:Polygon"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</restriction>
</complexContent>
</complexType>
<complexType name="LinearRingMemberType">
<annotation>
<documentation>Restricts the outer or inner boundary of a polygon instance
to being a LinearRing.</documentation>
</annotation>
<complexContent>
<restriction base="gml:GeometryAssociationType">
<sequence minOccurs="0">
<element ref="gml:LinearRing"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</restriction>
</complexContent>
</complexType>
<!-- ================================================== ============
primitive geometry types
================================================== ================= -->
<complexType name="PointType">
<annotation>
<documentation>
A Point is defined by a single coordinate tuple.
</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractGeometryType">
<sequence>
<choice>
<element ref="gml:coord"/>
<element ref="gml:coordinates"/>
</choice>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="LineStringType">
<annotation>
<documentation>
A LineString is defined by two or more coordinate tuples, with
linear interpolation between them.
</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractGeometryType">
<sequence>
<choice>
<element ref="gml:coord" minOccurs="2" maxOccurs="unbounded"/>
<element ref="gml:coordinates"/>
</choice>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="LinearRingType">
<annotation>
<documentation>
A LinearRing is defined by four or more coordinate tuples, with
linear interpolation between them; the first and last coordinates
must be coincident.
</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractGeometryType">
<sequence>
<choice>
<element ref="gml:coord" minOccurs="4" maxOccurs="unbounded"/>
<element ref="gml:coordinates"/>
</choice>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="BoxType">
<annotation>
<documentation>
The Box structure defines an extent using a pair of coordinate tuples.
</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractGeometryType">
<sequence>
<choice>
<element ref="gml:coord" minOccurs="2" maxOccurs="2"/>
<element ref="gml:coordinates"/>
</choice>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="PolygonType">
<annotation>
<documentation>
A Polygon is defined by an outer boundary and zero or more inner
boundaries which are in turn defined by LinearRings.
</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractGeometryType">
<sequence>
<element ref="gml:outerBoundaryIs"/>
<element ref="gml:innerBoundaryIs" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ================================================== ============
aggregate geometry types
================================================== ================= -->
<complexType name="GeometryCollectionType">
<annotation>
<documentation>
A geometry collection must include one or more geometries, referenced
through geometryMember elements. User-defined geometry collections
that accept GML geometry classes as members must instantiate--or
derive from--this type.
</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractGeometryCollectionBaseType">
<sequence>
<element ref="gml:geometryMember" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="MultiPointType">
<annotation>
<documentation>
A MultiPoint is defined by one or more Points, referenced through
pointMember elements.
</documentation>
</annotation>
<complexContent>
<restriction base="gml:GeometryCollectionType">
<sequence>
<element ref="gml:pointMember" maxOccurs="unbounded"/>
</sequence>
<attribute name="gid" type="ID" use="optional"/>
<attribute name="srsName" type="anyURI" use="required"/>
</restriction>
</complexContent>
</complexType>
<complexType name="MultiLineStringType">
<annotation>
<documentation>
A MultiLineString is defined by one or more LineStrings, referenced
through lineStringMember elements.
</documentation>
</annotation>
<complexContent>
<restriction base="gml:GeometryCollectionType">
<sequence>
<element ref="gml:lineStringMember" maxOccurs="unbounded"/>
</sequence>
<attribute name="gid" type="ID" use="optional"/>
<attribute name="srsName" type="anyURI" use="required"/>
</restriction>
</complexContent>
</complexType>
<complexType name="MultiPolygonType">
<annotation>
<documentation>
A MultiPolygon is defined by one or more Polygons, referenced through
polygonMember elements.
</documentation>
</annotation>
<complexContent>
<restriction base="gml:GeometryCollectionType">
<sequence>
<element ref="gml:polygonMember" maxOccurs="unbounded"/>
</sequence>
<attribute name="gid" type="ID" use="optional"/>
<attribute name="srsName" type="anyURI" use="required"/>
</restriction>
</complexContent>
</complexType>
<!-- ================================================== ============
There are two ways to represent coordinates: (1) as a sequence
of <coord> elements that encapsulate tuples, or (2) using a
single <coordinates> string.
================================================== ================= -->
<complexType name="CoordType">
<annotation>
<documentation>
Represents a coordinate tuple in one, two, or three dimensions.
</documentation>
</annotation>
<sequence>
<element name="X" type="decimal"/>
<element name="Y" type="decimal" minOccurs="0"/>
<element name="Z" type="decimal" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="CoordinatesType">
<annotation>
<documentation>
Coordinates can be included in a single string, but there is no
facility for validating string content. The value of the 'cs' attribute
is the separator for coordinate values, and the value of the 'ts'
attribute gives the tuple separator (a single space by default); the
default values may be changed to reflect local usage.
</documentation>
</annotation>
<simpleContent>
<extension base="string">
<attribute name="decimal" type="string" use="optional" default="."/>
<attribute name="cs" type="string" use="optional" default=","/>
<attribute name="ts" type="string" use="optional" default="&#x20;"/>
</extension>
</simpleContent>
</complexType>
</schema>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error is:

D:\data\soiGenericXSD>xjc geometry.xsd
parsing a schema...
[ERROR] rcase-RecurseLax.2: There is not a complete functional mapping between t
he particles.
line 263 of file:/D:/data/soiGenericXSD/geometry.xsd

[ERROR] derivation-ok-restriction.5.4.2: Error for type 'MultiPointType'. The p
article of the type is not a valid restriction of the particle of the base.
line 263 of file:/D:/data/soiGenericXSD/geometry.xsd

[ERROR] rcase-RecurseLax.2: There is not a complete functional mapping between t
he particles.
line 280 of file:/D:/data/soiGenericXSD/geometry.xsd

[ERROR] derivation-ok-restriction.5.4.2: Error for type 'MultiLineStringType'.
The particle of the type is not a valid restriction of the particle of the base.

line 280 of file:/D:/data/soiGenericXSD/geometry.xsd

[ERROR] rcase-RecurseLax.2: There is not a complete functional mapping between t
he particles.
line 297 of file:/D:/data/soiGenericXSD/geometry.xsd

[ERROR] derivation-ok-restriction.5.4.2: Error for type 'MultiPolygonType'. The
particle of the type is not a valid restriction of the particle of the base.
line 297 of file:/D:/data/soiGenericXSD/geometry.xsd

Failed to parse a schema.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
plz help me to compile successfully this xsd using JAXB
Jul 7 '07 #1
0 2600

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: jesper | last post by:
Hi I am currently following the tutorial from IBM (http://www-106.ibm.com/developerworks/xml/edu/x-dw-xjaxb-i.html) I have three problems at the moment. 1. It says else where that when the...
4
by: Pushya | last post by:
Hello - I am trying to parse a .XSD file to obtain information about element name and type in the file. I have been trying to find some kind of documentation for Schema Parsing. All I come...
2
by: Ed Trembicki-Guy | last post by:
Does anyone know of an existing tool or template to merge the contents of a base schema and an extension schema that uses the <redefine> tag to extend the base schema? I need to extract a subset...
1
by: yanwan | last post by:
Hello I am now compling a project, but in one source file of this project, I met this problem. It seems very strange. Below is this source file: ----------------------------------------...
4
by: yanwan | last post by:
Hello I am now compling a project, but in one source file of this project, I met this problem. It seems very strange. Below is this source file: ----------------------------------------...
0
by: bill gates | last post by:
I was trying to use msbee to build an old project. I don't want to upgrade to dotnet2.0. Is there any way to get this to compile using DevStudio 2005 using dotnet1.1. ? Build FAILED....
1
by: =?Utf-8?B?VGVjaGVlaw==?= | last post by:
I am using JAXB for parsing the XML file. When any validation error occurs like a particular tag value in the XML file is not in sync with what is defined in the schema, the JAXB is not displaying...
0
by: malsh1358 | last post by:
Hi I need check required elements and attributes in JAXB java classes , if there are any value for them place it , otherwise place default value in xml file , because of it I upgrade JAXB2.0 to...
1
by: popprem | last post by:
hi, I generated classes from a xsd schema with jaxb & did a program to xml reading & writing.Bt wn i cpomlile it through maven it saya that :- annotations are not supported in -source 1.3 (use...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.