diff --git a/Sd1/swd1.xml b/Sd1/swd1.xml index d6a56c8de343bd22ec497a5c175cc10bc187ed30..d0a0da96bb225a83f75c00b95ba7381afa36fbd0 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 50932cb254c94160d05243bfcb37ff39348487e2..0a3465ccb795556b2a9d0003fd9e6e5e89f00e0e 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()"/>