Hi,
I know how to create new schema, but i have one XSD file that include
elements with inherited attributes. Only in this schema an error occurs. It
looks like this:
...
<xs:attributeGroup name="ObjectIdentification">
<xs:attribute name="id" type="xs:ID"/>
<xs:attribute name="uuid" type="xs:string"/>
</xs:attributeGroup>
<xs:complexType name="AbstractObject_Type" abstract="true">
<xs:sequence/>
<xs:attributeGroup ref="iso:ObjectIdentification"/>
</xs:complexType>
...
...
...
<xs:complexType name="CI_Telephone_Type">
<xs:complexContent>
<xs:extension base="iso:AbstractObject_Type">
<xs:sequence>
<xs:element name="voice" type="iso:CharacterString_PropertyType"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="facsimile"
type="iso:CharacterString_PropertyType" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
...
When I start geonetwork in tomcat log I get error:
2007-06-28 13:55:31 | Adding xml schema : naszeiso
2007-06-28 13:55:31 | Raised exception while starting appl handler. Skipped.
2007-06-28 13:55:31 | Handler : org.fao.geonet.Geonetwork
2007-06-28 13:55:31 | Exception : java.lang.IllegalArgumentException:
'ref' cannot be null in 'extension' : iso:AbstractObject_Type
2007-06-28 13:55:31 | Message : 'ref' cannot be null in 'extension' :
iso:AbstractObject_Type
2007-06-28 13:55:31 | Stack : java.lang.IllegalArgumentException:
'ref' cannot be null in 'extension' : iso:AbstractObject_Type
at
org.fao.geonet.kernel.schema.ComplexContentEntry.handleExtension(ComplexContentEntry.java:134)
at
org.fao.geonet.kernel.schema.ComplexContentEntry.handleChildren(ComplexContentEntry.java:99)
at
org.fao.geonet.kernel.schema.ComplexContentEntry.<init>(ComplexContentEntry.java:61)
at
org.fao.geonet.kernel.schema.ComplexContentEntry.<init>(ComplexContentEntry.java:53)
at
org.fao.geonet.kernel.schema.ComplexTypeEntry.handleChildren(ComplexTypeEntry.java:146)
at
org.fao.geonet.kernel.schema.ComplexTypeEntry.<init>(ComplexTypeEntry.java:69)
at
org.fao.geonet.kernel.schema.SchemaLoader.buildComplexType(SchemaLoader.java:425)
at
org.fao.geonet.kernel.schema.SchemaLoader.parseElements(SchemaLoader.java:354)
at org.fao.geonet.kernel.schema.SchemaLoader.load(SchemaLoader.java:83)
at org.fao.geonet.kernel.EditLib.addSchema(EditLib.java:85)
at org.fao.geonet.kernel.DataManager.addSchema(DataManager.java:208)
at org.fao.geonet.Geonetwork.start(Geonetwork.java:125)
at jeeves.server.JeevesEngine.initAppHandler(JeevesEngine.java:413)
at jeeves.server.JeevesEngine.init(JeevesEngine.java:136)
at jeeves.server.sources.http.JeevesServlet.init(JeevesServlet.java:68)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1044)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:876)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4017)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at org.apache.catalina.core.StandardService.start(StandardService.java:480)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Does GN 2.0.3 xsd parser operate with inherited elements ?? Maybe I need
newer version?? If I need one, is it enough to change some java libraries
and which ??
Please help
Cheers,
Lukasz
--
View this message in context: http://www.nabble.com/inherited-elements-in-xml-schema-tf3998416s18419.html#a11355599
Sent from the geonetwork-users mailing list archive at Nabble.com.