A NPE occurs when exporting a xslx as an XML document if the attached schema contains ref elements. Here is an example of a xml schema which POI can't handle beacause of the xs:element ref attribute <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="Entry" type="Type_Entry"/> <xs:complexType name="Type_Entry"> <xs:sequence> <xs:element ref="REFELEMENT" minOccurs="0"/> </xs:sequence> </xs:complexType> <xs:element name="REFELEMENT" type="xs:double"/> </xs:schema> I'm going to provide a patch for this issue.
Created attachment 31819 [details] Fixes NPE when exporting xml schema containing elements with ref attributes
Created attachment 31820 [details] This is the right attachment
Thanks for the patch, this is fixed for 3.11 via r1621209.