You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Mukul Gandhi (Jira)" <xe...@xml.apache.org> on 2019/11/12 06:32:00 UTC
[jira] [Created] (XERCESJ-1717) While using xs:key having 'ref'
attribute, emits java.lang.NullPointerException
Mukul Gandhi created XERCESJ-1717:
-------------------------------------
Summary: While using xs:key having 'ref' attribute, emits java.lang.NullPointerException
Key: XERCESJ-1717
URL: https://issues.apache.org/jira/browse/XERCESJ-1717
Project: Xerces2-J
Issue Type: Bug
Components: XML Schema 1.1 Structures
Affects Versions: 2.12.0
Reporter: Mukul Gandhi
Assignee: Mukul Gandhi
XSD 1.1 has introduced a 'ref' attribute on xs:key, xs:unique and xs:keyref. While processing the following schema in XSD 1.0 mode with Xerces's XSD 1.1 processor, generates an java.lang.NullPointerException,
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="X">
<xs:complexType>
<xs:sequence>
<xs:element name="a" type="xs:integer" maxOccurs="unbounded"/>
<xs:element name="b" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
<xs:key name="a_key">
<xs:selector xpath="a"/>
<xs:field xpath="."/>
</xs:key>
</xs:element>
<xs:element name="Y">
<xs:complexType>
<xs:sequence>
<xs:element name="a" type="xs:integer" maxOccurs="unbounded"/>
<xs:element name="b" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
<xs:key ref="a_key"/>
</xs:element>
</xs:schema>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org