From 73ff070e2074a9b5a3ed21c911d32fd736a9aabf Mon Sep 17 00:00:00 2001 From: Martin Goik <goik@hdm-stuttgart.de> Date: Fri, 2 Jan 2015 13:44:02 +0100 Subject: [PATCH] HTML solutions file --- Sda1/Etest/solutions.html | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 Sda1/Etest/solutions.html diff --git a/Sda1/Etest/solutions.html b/Sda1/Etest/solutions.html new file mode 100644 index 000000000..ae9b7cdb2 --- /dev/null +++ b/Sda1/Etest/solutions.html @@ -0,0 +1,49 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <title>Solutions</title> + + <meta charset="UTF-8" /> + </head> + + <body><h1>Test solutions</h1><h2>Test 3</h2><h3>Well-formed and + valid</h3><p>“well-formed†XML document instances obey the constraints of + well-formedness like:</p><ul> + <li>Proper nesting of elements</li> + + <li>Exactly one root element</li> + + <li>quoting of attribute values. (Unlike HTML in its SGML variant + allowing e.g. <code><img align=top></code>)</li> + </ul><p>“valid†XML document instances are “well-formed†and in + addition conform to a grammar being expressed as e.g. XML Schema, RelaxNG or + DTD.</p><h3>Doodle poll XML data</h3><p><a + href="/ilias/data/iliasclient1/assessment/4018/1952/solution/doodle.zip">doodle.zip</a> + offers a solution.</p><h2>Test 4</h2><p><a + href="/iliasData/goik/Xml2xml_Solutiondsadhiukfhsr65RRY_o/xml2xml_solution.zip">xml2xml_solution.zip</a> + contains an Eclipse project based reference implementation.</p><h2>Test + 5</h2><p><a + href="/iliasData/goik/book2html_Solution_idzhsfc5-6FFsfK/book2Html_solution.zip">book2Html_solution.zip</a> + contains an Eclipse project based reference implementation.</p><h3>XML book + instances</h3><h2>Test 6</h2><h3>Printing element names</h3><p>The + implemented method <code>startElement</code> has got wrong signature. + According to the Java 1.7 API documentation <a + href="http://docs.oracle.com/javase/7/docs/api/org/xml/sax/helpers/DefaultHandler.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes)">startElement</a> + should have <code>org.xml.sax.Attributes</code> as its last argument. But in + the given code the last argument is of type + <code>java.util.jar.Attributes</code>. Hence the handler does not redefine + the corresponding parent class method <a + href="http://docs.oracle.com/javase/7/docs/api/org/xml/sax/helpers/DefaultHandler.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes)">startElement</a> + but instead adds an overloaded method. At runtime the SAX parser will call + the (dummy) method being defined in the parent class DefaultHandler thus + completely ignoring the intended implementation.</p><p>Replacing + <code>import java.util.jar.Attributes</code> by <code>import + org.xml.sax.Attributes</code> solves the problem.</p><p>An + <code>@Override</code> annotation would have flagged this apparent mistake + as a Java compile time error.</p><h3>SAX html creation (2 parts)</h3><p><a + href="/iliasData/goik/sax_hahHzh66-99DDDwsq/jidHFced74_98GFWWs/saxmemo2html_solution.zip">saxmemo2html_solution.zip</a> + contains an Eclipse project based reference implementation.</p><h2>Test + 7</h2><h3>Jdom tables, 2 parts</h3><p><a + href="/iliasData/goik/jdomtable_Solution_65RRR_fkweFGjhuiz/jdomtable_solution.zip">jdomtable_solution.zip</a> + contains a Maven reference implementation.</p></body> +</html> -- GitLab