diff --git a/library/src/main/resources/stylesheets/xrechnung-html.univ.xsl b/library/src/main/resources/stylesheets/xrechnung-html.univ.xsl
index 1856fd51..b252b0e0 100644
--- a/library/src/main/resources/stylesheets/xrechnung-html.univ.xsl
+++ b/library/src/main/resources/stylesheets/xrechnung-html.univ.xsl
@@ -1151,6 +1151,10 @@ function downloadData (element_id) {
+
+
+
+
@@ -1564,6 +1568,37 @@ function downloadData (element_id) {
+
+
+
+
+
+
+
diff --git a/library/src/test/java/org/mustangproject/ZUGFeRD/VisualizationTest.java b/library/src/test/java/org/mustangproject/ZUGFeRD/VisualizationTest.java
index a59199f4..c45f87df 100644
--- a/library/src/test/java/org/mustangproject/ZUGFeRD/VisualizationTest.java
+++ b/library/src/test/java/org/mustangproject/ZUGFeRD/VisualizationTest.java
@@ -66,6 +66,47 @@ public class VisualizationTest extends ResourceCase {
.replace(" ", "");
// remove linebreaks as well...
+ } catch (UnsupportedOperationException e) {
+ fail("UnsupportedOperationException should not happen: " + e.getMessage());
+ } catch (IllegalArgumentException e) {
+ fail("IllegalArgumentException should not happen: " + e.getMessage());
+ } catch (TransformerException e) {
+ fail("TransformerException should not happen: " + e.getMessage());
+ } catch (IOException e) {
+ fail("IOException should not happen: " + e.getMessage());
+ }
+
+
+ assertNotNull(result);
+ // Reading ZUGFeRD
+ assertEquals(expected, result);
+ }
+
+ public void testCIIVisualizationExtended() {
+
+ // the writing part
+ String sourceFilename = "factur-x-extended.xml";
+ File CIIinputFile = getResourceAsFile(sourceFilename);
+
+ String expected = null;
+ String result = null;
+ try {
+ ZUGFeRDVisualizer zvi = new ZUGFeRDVisualizer();
+ /* remove file endings so that tests can also pass after checking
+ out from git with arbitrary options (which may include CSRF changes)
+ */
+ result = zvi.visualize(CIIinputFile.getAbsolutePath(), ZUGFeRDVisualizer.Language.DE).replace("\r", "").replace("\n", "")
+ .replace("\t", "")
+ .replace(" ", "");
+
+ File expectedResult = getResourceAsFile("factur-x-vis-extended.de.html");
+ expected = new String(Files.readAllBytes(expectedResult.toPath()), StandardCharsets.UTF_8)
+ .replace("\r", "")
+ .replace("\n", "")
+ .replace("\t", "")
+ .replace(" ", "");
+ // remove linebreaks as well...
+
} catch (UnsupportedOperationException e) {
fail("UnsupportedOperationException should not happen: " + e.getMessage());
} catch (IllegalArgumentException e) {
@@ -124,6 +165,7 @@ public class VisualizationTest extends ResourceCase {
}
+
assertNotNull(result);
// Reading ZUGFeRD
assertEquals(expected, result);
@@ -141,10 +183,18 @@ public class VisualizationTest extends ResourceCase {
/* remove file endings so that tests can also pass after checking
out from git with arbitrary options (which may include CSRF changes)
*/
- result = zvi.visualize(UBLinputFile.getAbsolutePath(), ZUGFeRDVisualizer.Language.EN).replace("\r", "").replace("\n", "").replace("\t", "").replace(" ", "");
+ result = zvi.visualize(UBLinputFile.getAbsolutePath(), ZUGFeRDVisualizer.Language.EN)
+ .replace("\r", "")
+ .replace("\n", "")
+ .replace("\t", "")
+ .replace(" ", "");
File expectedResult = getResourceAsFile("factur-x-vis-ubl-creditnote.en.html");
- expected = new String(Files.readAllBytes(expectedResult.toPath()), StandardCharsets.UTF_8).replace("\r", "").replace("\n", "").replace("\t", "").replace(" ", "");
+ expected = new String(Files.readAllBytes(expectedResult.toPath()), StandardCharsets.UTF_8)
+ .replace("\r", "")
+ .replace("\n", "")
+ .replace("\t", "")
+ .replace(" ", "");
// remove linebreaks as well...
} catch (UnsupportedOperationException e) {
@@ -162,12 +212,12 @@ public class VisualizationTest extends ResourceCase {
}
+
assertNotNull(result);
// Reading ZUGFeRD
assertEquals(expected, result);
}
-
public void testUBLVisualizationBasic() {
// the writing part
@@ -198,10 +248,6 @@ public class VisualizationTest extends ResourceCase {
fail("TransformerException should not happen: " + e.getMessage());
} catch (IOException e) {
fail("IOException should not happen: " + e.getMessage());
- } catch (ParserConfigurationException e) {
- fail("ParserConfigurationException should not happen: " + e.getMessage());
- } catch (SAXException e) {
- fail("SAXException should not happen: " + e.getMessage());
}
diff --git a/library/src/test/resources/factur-x-vis-ubl.en.html b/library/src/test/resources/factur-x-vis-ubl.en.html
index 9dd2506a..34d420e8 100644
--- a/library/src/test/resources/factur-x-vis-ubl.en.html
+++ b/library/src/test/resources/factur-x-vis-ubl.en.html
@@ -2,6 +2,7 @@
+
XRechnung