Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » nullException
nullException [message #36866] Fri, 30 January 2004 12:47 Go to next message
Eclipse UserFriend
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 13:34 Go to previous message
Eclipse UserFriend
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 13:34 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
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--


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Redefinitions
Next Topic:Imported schema not resolved in wsdl
Goto Forum:
  


Current Time: Fri Apr 26 00:35:22 GMT 2024

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

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

Back to the top