diff --git a/Sd1/Makefile b/Sd1/Makefile index e51233d137827dca275b4c27067de765306bbae9..f73402d345e8bcde758041bc0932ec068e0d3485 100644 --- a/Sd1/Makefile +++ b/Sd1/Makefile @@ -15,7 +15,7 @@ BUILDROOT=/tmp # # Directories containing pom.xml files # -POMDIRS= $(shell find P -name pom.xml|grep -v target/classes/META-INF|sed -e s/\\/pom.xml//g) +POMDIRS= $(shell find P -name pom.xml|grep -v target/classes|grep -v src/main/resources/archetype-resources|sed -e s/\\/pom.xml//g) # # Dependent destinations diff --git a/Sda1/Etest/SaxMemo2Html/exercise1.xhtml b/Sda1/Etest/SaxMemo2Html/exercise1.xhtml index 176dbae8397089b406c2e1bc70cf309e623eb55a..0bb111955f8f70a806d7755516f83a3b537bac3e 100644 --- a/Sda1/Etest/SaxMemo2Html/exercise1.xhtml +++ b/Sda1/Etest/SaxMemo2Html/exercise1.xhtml @@ -5,46 +5,40 @@ <title>Exercise 1</title> </head> - <body><h2>Objective</h2><p>Implementing a SAX based Java application + <body><h2>Objective</h2><p>Implementing two SAX based Java applications transforming memo documents to HTML.</p><h2>Preparations</h2><ol> <li>Download <a href="/iliasData/goik/sax_hahHzh66-99DDDwsq/saxmemo2html.zip">saxmemo2html.zip</a> and import it as a project into your Eclipse workspace.</li> - <li><p>Your resulting Project <code>Bsaxmemo2html</code>contains among - other files:</p><dl> - <dt>src/main/resources/memo.xml</dt> + <li><p>Your resulting Project <code>saxmemo2html</code>contains among + other files:</p><ul> + <li><p><strong>src/main/resources/memo.xml</strong></p><p>A sample + memo input document.</p></li> - <dd>A sample memo input document.</dd> - - <dt>de.hdm_stuttgart.mi.sda1.saxhtml.v1.Memo2HtmlHandler</dt> - - <dd>A SAX event handler which currently just creates static + <li><p><strong>de.hdm_stuttgart.mi.sda1.saxhtml.v1.Memo2HtmlHandler</strong></p><p>A + SAX event handler which currently just creates static <code><html></html></code> output. The non-default constructor expects a <a href="http://docs.oracle.com/javase/8/docs/api/java/io/PrintStream.html">java.io.PrintStream</a> allowing unit tests to redirect output to a file for subsequent - result analysis.</dd> - - <dt>de.hdm_stuttgart.mi.sda1.saxhtml.v1.Driver</dt> + result analysis.</p></li> - <dd>Executing this class converts <code>memo.xml</code> to + <li><p><strong>de.hdm_stuttgart.mi.sda1.saxhtml.v1.Driver</strong></p><p>Executing + this class converts <code>memo.xml</code> to <code>src/main/resources/memo.xml.1.html</code> by using <code>de.hdm_stuttgart.mi.sda1.saxhtml.v1.Memo2HtmlHandler</code> - and writing to output console.</dd> - - <dt>src/main/resources/memo.xml.1.sample.html</dt> - - <dd>The intended output corresponding to be generated from - <code>memo.xml</code> by <code>Memo2HtmlHandler</code>.</dd> + and writing to output console.</p></li> - <dt>de.hdm_stuttgart.de.sda1.saxhtml.v1.test.ConversionTest</dt> + <li><p><strong>src/main/resources/memo.xml.1.sample.html</strong></p><p>The + intended output corresponding to be generated from </p></li> - <dd>This Junit class executes your handler and writes the - corresponding output to src/main/resources/memo.xml.1.html. The - latter file then becomes subject to a series of XPath expression - tests checking for correctness of your output.</dd> - </dl></li> + <li><p><strong>de.hdm_stuttgart.de.sda1.saxhtml.v1.test.ConversionTest</strong></p><p>This + Junit class executes your handler and writes the corresponding + output to src/main/resources/memo.xml.1.html. The latter file then + becomes subject to a series of XPath expression tests checking for + correctness of your output.</p></li> + </ul></li> </ol><h2>Description</h2><p>Our sample document memo document contains:</p><pre style="font-family:monospace;"><memo> <from>M. Goik</from> @@ -52,9 +46,10 @@ <to>A. June</to> <subject>Best wishes</subject> <content>Hi all, congratulations to your splendid party</content> -</memo></pre><h2>ToDo, Part 1</h2><p>Complete the implementation of - <code>Memo2HtmlHandler</code> to generate the content of - <code>memo.xml.1.sample.html</code>:</p><pre><html> +</memo></pre><h2>ToDo, Part 1</h2><p>This exercise deals with Java + classes from packages containing the string <strong>v1</strong> in their + names. Complete the implementation of <code>Memo2HtmlHandler</code> to + generate the content of <code>memo.xml.1.sample.html</code>:</p><pre><html> <head> <title>Memo message</title> </head> @@ -73,7 +68,11 @@ satisfied with your result execute the Junit test <code>de.hdm_stuttgart.de.sda1.saxhtml.v1.test.ConversionTest</code>. When you are finished export your Maven project as a compressed .zip archive and - upload it.</p><h2>ToDo, Part 2</h2><p>Your project contains a second set of + upload it.</p><h2>ToDo, Part 2</h2><p>This second exercise deals with Java + classes from packages containing the string <strong>v2</strong> in their + names. So you might want to close <strong>all</strong> file tabs in your + current Eclipse project to avoid confusing yourself with files from the + first part of this exercise.</p><p>Your project contains a second set of files intended to create more sophisticated output as being contained in <code>memo.xml.2.sample.html</code>:</p><pre><html> <head><title>Memo from M. Goik</title></head> @@ -101,10 +100,10 @@ <code>de.hdm_stuttgart.de.sda1.saxhtml.v2.test.ConversionTest</code>.</p><p>When you are finished zip your project again and upload it. Only the last .zip file will become subject to marking.</p><h3>Hint:</h3><p>In this second part - the order of XML input is not being preserved. Furthermore some input - (sender's name) has to be duplicated. To deal with these challenges you may - first collect all relevant input during the SAX parsing process and - completely defer HTML output generation to the <a + the order of content from your XML input is not being preserved. Furthermore + some input (sender's name) has to be duplicated. To deal with these + challenges you may first collect all relevant input during the SAX parsing + process and completely defer HTML output generation to the <a href="http://docs.oracle.com/javase/8/docs/api/org/xml/sax/ContentHandler.html#endDocument--">endDocument()</a> method.</p></body> </html>