<target name="fetch-ooxml-jars" depends="check-ooxml-jars" unless="ooxml.jars.present">
<mkdir dir="${ooxml.lib}"/>
<downloadfile src="${ooxml.curvesapi.url}" dest="${ooxml.curvesapi.jar}"/>
- <downloadfile src="${ooxml.xmlbeans23.url}" dest="${ooxml.xmlbeans23.jar}"/>
- <downloadfile src="${ooxml.xmlbeans26.url}" dest="${ooxml.xmlbeans26.jar}"/>
+ <downloadfile src="${ooxml.xmlbeans23.url}" dest="${ooxml.xmlbeans23.jar}.orig"/>
+ <downloadfile src="${ooxml.xmlbeans26.url}" dest="${ooxml.xmlbeans26.jar}.orig"/>
+ <!-- remove piccolo parser, so we don't use unsafe calls to it instead of using jaxp -->
+ <zip destfile="${ooxml.xmlbeans23.jar}">
+ <zipfileset src="${ooxml.xmlbeans23.jar}.orig" excludes="org/apache/xmlbeans/impl/piccolo/**"/>
+ </zip>
+ <zip destfile="${ooxml.xmlbeans26.jar}">
+ <zipfileset src="${ooxml.xmlbeans26.jar}.orig" excludes="org/apache/xmlbeans/impl/piccolo/**"/>
+ </zip>
</target>
<target name="check-ooxml-xsds">
DEFAULT_XML_OPTIONS.setUseDefaultNamespace();\r
DEFAULT_XML_OPTIONS.setSaveAggressiveNamespaces();\r
DEFAULT_XML_OPTIONS.setCharacterEncoding("UTF-8");\r
- DEFAULT_XML_OPTIONS.setLoadEntityBytesLimit(4096);\r
+ // Piccolo is disabled for POI builts, i.e. JAXP is used for parsing\r
+ // so only user code using XmlObject/XmlToken.Factory.parse\r
+ // directly can bypass the entity check, which is probably unlikely (... and not within our responsibility :)) \r
+ // DEFAULT_XML_OPTIONS.setLoadEntityBytesLimit(4096);\r
\r
Map<String, String> map = new HashMap<String, String>();\r
map.put("http://schemas.openxmlformats.org/drawingml/2006/main", "a");\r