Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Specific failure in XSDEcoreBuilder
Specific failure in XSDEcoreBuilder [message #576731] Wed, 03 September 2003 08:53
Eclipse UserFriend
Originally posted by: ihc.sas-glas.mottmac.com

Specific failure in XSDEcoreBuilder

We’ve been using XSDEcoreBuilder on a trivial schema and now are turning
to some more realistic schemas. However, it choked on a particular
construct, which I have now isolated. The schema

<?xml version = "1.0" encoding = "UTF-8"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">

<xsd:complexType name = "ServiceCategory">
<xsd:simpleContent>
<xsd:extension base = "xsd:boolean"/>
</xsd:simpleContent>
</xsd:complexType>

<xsd:element name = "DialARide">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base = "ServiceCategory"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>

</xsd:schema>

produces a null pointer exception during XSDEcoreBuilder.generate(), when
it gets to XSDConstants.isAnyType() – which is called with a null argument
which is then used as if it is a valid object.

It doesn’t seem to matter what is inside the simple content of the base
type (ServiceCategory) we always get the same failure. If however the same
kind of simple extension construct is used directly within an element
rather than as a reference to a separate type, it works OK.

However, I don’t have control of the schemas so I have no workaround.

stack trace:

java.lang.NullPointerException
at org.eclipse.xsd.util.XSDConstants.isAnyType(XSDConstants.jav a:1532)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:324)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:360)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.getEClassifier(XSDEcor eBuilder.java:727)
at
org.eclipse.xsd.ecore.XSDEcoreBuilder.generate(XSDEcoreBuild er.java:902)

Hope someone can help.

Ian Cornwell
Previous Topic:best pratice on where to store property strings?
Next Topic:Sorry for the duplicate replies
Goto Forum:
  


Current Time: Thu Mar 28 09:28:58 GMT 2024

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

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

Back to the top