opensagres / xdocreport

XDocReport means XML Document reporting. It's Java API to merge XML document created with MS Office (docx) or OpenOffice (odt), LibreOffice (odt) with a Java model to generate report and convert it if you need to another format (PDF, XHTML...).
https://github.com/opensagres/xdocreport
1.22k stars 372 forks source link

Freemarker #if condiction and odt document cause: The element type "text:p" must be terminated by the matching end-tag "</text:p> #505

Open mattgolem opened 2 years ago

mattgolem commented 2 years ago

In attachment odt file example that cause the problem.

org.xml.sax.SAXParseException: The element type "text:p" must be terminated by the matching end-tag "</text:p>".
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) ~[xercesImpl-2.9.1.jar:na]
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ~[xercesImpl-2.9.1.jar:na]
    at org.odftoolkit.odfdom.pkg.OdfFileDom.initialize(OdfFileDom.java:142) [odfdom-java-0.8.7.jar:na]
    at org.odftoolkit.odfdom.dom.OdfContentDom.initialize(OdfContentDom.java:55) [odfdom-java-0.8.7.jar:na]
    at org.odftoolkit.odfdom.pkg.OdfFileDom.<init>(OdfFileDom.java:87) [odfdom-java-0.8.7.jar:na]
    at org.odftoolkit.odfdom.dom.OdfContentDom.<init>(OdfContentDom.java:45) [odfdom-java-0.8.7.jar:na]
    at org.odftoolkit.odfdom.pkg.OdfFileDom.newFileDom(OdfFileDom.java:110) [odfdom-java-0.8.7.jar:na]
    at org.odftoolkit.odfdom.pkg.OdfPackageDocument.getFileDom(OdfPackageDocument.java:281) [odfdom-java-0.8.7.jar:na]
    at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getFileDom(OdfSchemaDocument.java:312) [odfdom-java-0.8.7.jar:na]
    at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getContentDom(OdfSchemaDocument.java:190) [odfdom-java-0.8.7.jar:na]
    at fr.opensagres.odfdom.converter.pdf.PdfConverter.processStyles(PdfConverter.java:104) [fr.opensagres.odfdom.converter.pdf-2.0.2.jar:2.0.2]
    at fr.opensagres.odfdom.converter.pdf.PdfConverter.doConvert(PdfConverter.java:62) [fr.opensagres.odfdom.converter.pdf-2.0.2.jar:2.0.2]
    at fr.opensagres.odfdom.converter.pdf.PdfConverter.doConvert(PdfConverter.java:44) [fr.opensagres.odfdom.converter.pdf-2.0.2.jar:2.0.2]
    at fr.opensagres.odfdom.converter.core.AbstractODFConverter.convert(AbstractODFConverter.java:42 [fr.opensagres.odfdom.converter.core-2.0.2.jar:2.0.2]
......

ModelloStampaExNovo - Non Funzionante.odt