[ https://issues.apache.org/jira/browse/XERCESJ-1717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mukul Gandhi updated XERCESJ-1717: ---------------------------------- Fix Version/s: 2.12.1 Description: 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> was: 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> > While using xsd xs:key having 'ref' attribute, a > java.lang.NullPointerException is emitted > ------------------------------------------------------------------------------------------ > > 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 > Priority: Major > Fix For: 2.12.1 > > > 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-unsubscr...@xerces.apache.org For additional commands, e-mail: j-dev-h...@xerces.apache.org