From b219b5c46e95aa7a14cf8ef811aaae8939e35342 Mon Sep 17 00:00:00 2001
From: Martin Goik <goik@hdm-stuttgart.de>
Date: Thu, 15 May 2014 19:54:59 +0200
Subject: [PATCH] New preparations, clickable solutions

---
 Sd1/swd1.xml                                  | 46 ++++++++++++++++++-
 ws/Docbook/Extensions/Xsl/docbook2docbook.xsl |  5 +-
 2 files changed, 48 insertions(+), 3 deletions(-)

diff --git a/Sd1/swd1.xml b/Sd1/swd1.xml
index d6a56c8de..d0a0da96b 100644
--- a/Sd1/swd1.xml
+++ b/Sd1/swd1.xml
@@ -5904,11 +5904,55 @@ values newArray  | 1| 2| F| 7| 9|  | ...</programlisting>
           </qandadiv>
         </qandaset>
       </section>
+    </section>
+  </chapter>
+
+  <chapter xml:id="sd1Strings">
+    <title>Handling String instances</title>
+
+    <section xml:id="sd1PrepStrings">
+      <title>Preparations</title>
+
+      <itemizedlist>
+        <listitem>
+          <para>Read the section on <link
+          xlink:href="http://docs.oracle.com/javase/tutorial/essential/environment/cmdLineArgs.html">command
+          line arguments</link> and execute the given examples.</para>
+        </listitem>
+
+        <listitem>
+          <para>Read the <link
+          xlink:href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html">String
+          API</link>. Try to understand methods concerning:</para>
+
+          <itemizedlist>
+            <listitem>
+              <para>Comparing strings lexicographically or for equality? How
+              does this relate to the <methodname
+              xlink:href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-">equals()</methodname>
+              method you read about in chapter 6 of <xref
+              linkend="bibHorton2011"/>.</para>
+            </listitem>
+
+            <listitem>
+              <para>Searching for sub strings in a given string i.e. testing,
+              whether e.g. <quote>keeper</quote> is part of
+              <quote>goalkeeper</quote>.</para>
+            </listitem>
+          </itemizedlist>
+        </listitem>
+      </itemizedlist>
+    </section>
+
+    <section xml:id="sd1StringExercise">
+      <title>Exercises</title>
 
       <section xml:id="sd1GameOfLife">
         <title>Game of life, World</title>
 
-        <qandaset xml:id="sd1QandaLifeWorld">
+        <qandaset defaultlabel="qanda" xml:id="sd1QandaLifeWorld">
+          <title>Creating the life's world</title>
+
           <qandadiv>
             <qandaentry>
               <question>
diff --git a/ws/Docbook/Extensions/Xsl/docbook2docbook.xsl b/ws/Docbook/Extensions/Xsl/docbook2docbook.xsl
index 50932cb25..0a3465ccb 100644
--- a/ws/Docbook/Extensions/Xsl/docbook2docbook.xsl
+++ b/ws/Docbook/Extensions/Xsl/docbook2docbook.xsl
@@ -47,7 +47,8 @@
             </xsl:if>
         </para>
     </xsl:template>
-    
+   
+   <!-- 
     <xsl:template match="db:answer">
         <db:answer>
             <xsl:variable name="proximaParentId" select="ancestor::*[@xml:id and position()=1]/@xml:id"/>
@@ -61,7 +62,7 @@
             </xsl:choose>
         </db:answer>
     </xsl:template>
-    
+   --> 
     <xsl:template match="db:part">
         <xsl:copy>
             <xsl:apply-templates select="@* | node()"/>
-- 
GitLab