Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Error: XSD: Type reference '#null' is unresolved in XML Schema Import into EMF
Error: XSD: Type reference '#null' is unresolved in XML Schema Import into EMF [message #615623] Fri, 07 March 2008 15:29
Gerrit  is currently offline Gerrit Friend
Messages: 30
Registered: July 2009
Member
Hello everyone,


I am getting lots of errors when importing the DITA XML schema
( http://docs.oasis-open.org/dita/v1.1/CD01/schema/ditaschema. zip) into a
new EMF Project. Many of these errors also appeared before when validating
the schema in Eclipse with the "Validate" context menu of the
org.eclipse.xsd plugin. However, after I changed some parts of the schema,
it gets validated fine in Eclipse (i.e. no errors show up), but the EMF
XML schema import still throws additional errors, even though I believe
that org.eclipse.xsd.ecore.importer is using org.eclipse.xsd as well.

Many of the errors were due to the schema using a catalog, which can be
integrated into the workspace with the XML Catalog menu. The EMF import,
however, doesn't seem to use it, even when importing from the workspace.
The errors didn't disappear until I switched to direct references instead
of using the catalog.


There is still another large group of errors, for which I found no
explanation yet:

Error: XSD: Type reference '#null' is unresolved : URI
platform:/resource/ditaschema/ditaschema/topicMod.xsd Line 157 Column 3
Error: XSD: Type reference '#null' is unresolved : URI
platform:/resource/ditaschema/ditaschema/topicMod.xsd Line 178 Column 3
Error: XSD: Type reference '#null' is unresolved : URI
platform:/resource/ditaschema/ditaschema/topicMod.xsd Line 211 Column 3
...


The given lines are starting points of element definition blocks like this
one:

<xs:element name="no-topic-nesting">
<xs:annotation>
<xs:documentation>
...
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="no-topic-nesting.class">
<xs:attribute ref="class" default="- topic/no-topic-nesting "/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="no-topic-nesting.class">
<xs:attributeGroup ref="global-atts"/>
</xs:complexType>



These errors don't appear when validating the schema separately.

The weird part is that the error message can't give the names of the
unresolved references. The _UI_UnresolvedTypeDefinition_message is defined
in the plugin.properties and used by the XSD_Type_DeclarationImpl classes,
for their respective validate() methods. These methods explicitely check
for null XSDTypeDefinition, in which case they pass an empty string. This
seems to imply that the XSDTypeDefinition is not null, but its URI is,
even though a reference basically consists of nothing but a URI. Could it
be that the "unresolved" references do not exist, but are rather generated
implicitely by the EMF importer?


I'd be happy if someone would have some ideas as to

1. What causes these errors?
2. How could I further analyze them if no URI is given?
3. Why do they only appear in the EMF importer, but not in the normal
validation?


In general, I'd like to know the differences between the normal XML Schema
Validation and the XML Schema Import into EMF, e.g. in which ways the
latter might be stricter.


Many thanks in advance,
Gerrit
Previous Topic:Loading a GMF diagram resource from Hibernate
Next Topic:Storing GMF diagram object with teneo
Goto Forum:
  


Current Time: Sun Jun 20 05:10:59 GMT 2021

Powered by FUDForum. Page generated in 0.02141 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top