Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » nullException
nullException [message #36866] Fri, 30 January 2004 07:47 Go to next message
Eclipse User
Originally posted by: niemaz.xrce.xerox.com

I'm getting a nullException exception when loading a particular schema
file.
After investigating, it appears that it crashes on restricted enumerations
based on xs:positiveInteger. See xsd code below.

--mike

<xs:attribute name="layer">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="1"/>
<xs:enumeration value="2"/>
<xs:enumeration value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>

<xs:element name="root">
<xs:complexType>
<xs:attribute ref="layer"/>
</xs:complexType>
</xs:element>
Re: nullException [message #36934 is a reply to message #36866] Fri, 30 January 2004 08:34 Go to previous message
Eclipse User
Originally posted by: merks.ca.ibm.com

--------------E7DFBC8757621574A8A5840F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Mike,

Your example doesn't use positiveInteger and even if I change it and build a
complete schema like this:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:attribute name="layer">
<xs:simpleType>
<xs:restriction base="xs:positiveInteger">
<xs:enumeration value="1"/>
<xs:enumeration value="2"/>
<xs:enumeration value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>

<xs:element name="root">
<xs:complexType>
<xs:attribute ref="layer"/>
</xs:complexType>
</xs:element>
</xs:schema>

I can't reprodue a null pointer exception.


mike wrote:

> I'm getting a nullException exception when loading a particular schema
> file.
> After investigating, it appears that it crashes on restricted enumerations
> based on xs:positiveInteger. See xsd code below.
>
> --mike
>
> <xs:attribute name="layer">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:enumeration value="1"/>
> <xs:enumeration value="2"/>
> <xs:enumeration value="3"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
>
> <xs:element name="root">
> <xs:complexType>
> <xs:attribute ref="layer"/>
> </xs:complexType>
> </xs:element>

--------------E7DFBC8757621574A8A5840F
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Mike,
<p>Your example doesn't use positiveInteger and even if I change it and
build a complete schema like this:
<blockquote>&lt;?xml version="1.0" encoding="UTF-8"?>
<br>&lt;xs:schema xmlns:xs="<A HREF="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</A>">
<br>&lt;xs:attribute name="layer">
<br>&nbsp;&lt;xs:simpleType>
<br>&nbsp; &lt;xs:restriction base="xs:positiveInteger">
<br>&nbsp;&nbsp; &lt;xs:enumeration value="1"/>
<br>&nbsp;&nbsp; &lt;xs:enumeration value="2"/>
<br>&nbsp;&nbsp; &lt;xs:enumeration value="3"/>
<br>&nbsp; &lt;/xs:restriction>
<br>&nbsp;&lt;/xs:simpleType>
<br>&lt;/xs:attribute>
<p>&lt;xs:element name="root">
<br>&nbsp;&lt;xs:complexType>
<br>&nbsp; &lt;xs:attribute ref="layer"/>
<br>&nbsp;&lt;/xs:complexType>
<br>&lt;/xs:element>
<br>&lt;/xs:schema></blockquote>
I can't reprodue a null pointer exception.
<br>&nbsp;
<p>mike wrote:
<blockquote TYPE=CITE>I'm getting a nullException exception when loading
a particular schema
<br>file.
<br>After investigating, it appears that it crashes on restricted enumerations
<br>based on xs:positiveInteger. See xsd code below.
<p>--mike
<p>&lt;xs:attribute name="layer">
<br>&nbsp;&lt;xs:simpleType>
<br>&nbsp; &lt;xs:restriction base="xs:string">
<br>&nbsp;&nbsp; &lt;xs:enumeration value="1"/>
<br>&nbsp;&nbsp; &lt;xs:enumeration value="2"/>
<br>&nbsp;&nbsp; &lt;xs:enumeration value="3"/>
<br>&nbsp; &lt;/xs:restriction>
<br>&nbsp;&lt;/xs:simpleType>
<br>&lt;/xs:attribute>
<p>&lt;xs:element name="root">
<br>&nbsp;&lt;xs:complexType>
<br>&nbsp; &lt;xs:attribute ref="layer"/>
<br>&nbsp;&lt;/xs:complexType>
<br>&lt;/xs:element></blockquote>
</html>

--------------E7DFBC8757621574A8A5840F--
Re: nullException [message #583323 is a reply to message #36866] Fri, 30 January 2004 08:34 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25947
Registered: July 2009
Senior Member
--------------E7DFBC8757621574A8A5840F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Mike,

Your example doesn't use positiveInteger and even if I change it and build a
complete schema like this:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:attribute name="layer">
<xs:simpleType>
<xs:restriction base="xs:positiveInteger">
<xs:enumeration value="1"/>
<xs:enumeration value="2"/>
<xs:enumeration value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>

<xs:element name="root">
<xs:complexType>
<xs:attribute ref="layer"/>
</xs:complexType>
</xs:element>
</xs:schema>

I can't reprodue a null pointer exception.


mike wrote:

> I'm getting a nullException exception when loading a particular schema
> file.
> After investigating, it appears that it crashes on restricted enumerations
> based on xs:positiveInteger. See xsd code below.
>
> --mike
>
> <xs:attribute name="layer">
> <xs:simpleType>
> <xs:restriction base="xs:string">
> <xs:enumeration value="1"/>
> <xs:enumeration value="2"/>
> <xs:enumeration value="3"/>
> </xs:restriction>
> </xs:simpleType>
> </xs:attribute>
>
> <xs:element name="root">
> <xs:complexType>
> <xs:attribute ref="layer"/>
> </xs:complexType>
> </xs:element>

--------------E7DFBC8757621574A8A5840F
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Mike,
<p>Your example doesn't use positiveInteger and even if I change it and
build a complete schema like this:
<blockquote>&lt;?xml version="1.0" encoding="UTF-8"?>
<br>&lt;xs:schema xmlns:xs="<A HREF="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</A>">
<br>&lt;xs:attribute name="layer">
<br>&nbsp;&lt;xs:simpleType>
<br>&nbsp; &lt;xs:restriction base="xs:positiveInteger">
<br>&nbsp;&nbsp; &lt;xs:enumeration value="1"/>
<br>&nbsp;&nbsp; &lt;xs:enumeration value="2"/>
<br>&nbsp;&nbsp; &lt;xs:enumeration value="3"/>
<br>&nbsp; &lt;/xs:restriction>
<br>&nbsp;&lt;/xs:simpleType>
<br>&lt;/xs:attribute>
<p>&lt;xs:element name="root">
<br>&nbsp;&lt;xs:complexType>
<br>&nbsp; &lt;xs:attribute ref="layer"/>
<br>&nbsp;&lt;/xs:complexType>
<br>&lt;/xs:element>
<br>&lt;/xs:schema></blockquote>
I can't reprodue a null pointer exception.
<br>&nbsp;
<p>mike wrote:
<blockquote TYPE=CITE>I'm getting a nullException exception when loading
a particular schema
<br>file.
<br>After investigating, it appears that it crashes on restricted enumerations
<br>based on xs:positiveInteger. See xsd code below.
<p>--mike
<p>&lt;xs:attribute name="layer">
<br>&nbsp;&lt;xs:simpleType>
<br>&nbsp; &lt;xs:restriction base="xs:string">
<br>&nbsp;&nbsp; &lt;xs:enumeration value="1"/>
<br>&nbsp;&nbsp; &lt;xs:enumeration value="2"/>
<br>&nbsp;&nbsp; &lt;xs:enumeration value="3"/>
<br>&nbsp; &lt;/xs:restriction>
<br>&nbsp;&lt;/xs:simpleType>
<br>&lt;/xs:attribute>
<p>&lt;xs:element name="root">
<br>&nbsp;&lt;xs:complexType>
<br>&nbsp; &lt;xs:attribute ref="layer"/>
<br>&nbsp;&lt;/xs:complexType>
<br>&lt;/xs:element></blockquote>
</html>

--------------E7DFBC8757621574A8A5840F--
Previous Topic:Redefinitions
Next Topic:Imported schema not resolved in wsdl
Goto Forum:
  


Current Time: Thu Jul 31 17:49:11 EDT 2014

Powered by FUDForum. Page generated in 0.03703 seconds