From 3683bd3f37f0c093c055549dee7ff60e70e0a2ac Mon Sep 17 00:00:00 2001 From: goik <goik@hdm-stuttgart.de> Date: Fri, 28 Nov 2014 16:33:07 +0100 Subject: [PATCH] E-Test intermediate state --- .../Book2Html/Book1/{book.xsd => book1.xsd} | 0 .../{bookBasicTest.xspec => book1Test.xspec} | 0 .../Book1/{book2html.xsl => book1ToHtml.xsl} | 0 ...rk.reference.html => work1.reference.html} | 0 .../Book2Html/Book1/{work.xml => work1.xml} | 2 +- Sda1/Etest/Xslt2/Book2Html/Book2/book.xsd | 49 ------ .../book.xsd => Book2Html/Book2/book2.xsd} | 17 +- ...ookLinkMixedTest.xspec => book2Test.xspec} | 0 .../Book2/{book2html.xsl => book2ToHtml.xsl} | 0 ...rk.reference.html => work2.reference.html} | 3 +- .../Book2Html/Book2/{work.xml => work2.xml} | 8 +- Sda1/Etest/Xslt2/Solution/Book1/book.xsd | 27 ---- .../Xslt2/Solution/Book1/bookBasicTest.xspec | 148 ------------------ Sda1/Etest/Xslt2/Solution/Book1/work.xml | 15 -- .../Solution/Book2/bookLinkMixedTest.xspec | 104 ------------ Sda1/Etest/Xslt2/Solution/Book2/work.xml | 15 -- 16 files changed, 18 insertions(+), 370 deletions(-) rename Sda1/Etest/Xslt2/Book2Html/Book1/{book.xsd => book1.xsd} (100%) rename Sda1/Etest/Xslt2/Book2Html/Book1/{bookBasicTest.xspec => book1Test.xspec} (100%) rename Sda1/Etest/Xslt2/Book2Html/Book1/{book2html.xsl => book1ToHtml.xsl} (100%) rename Sda1/Etest/Xslt2/Book2Html/Book1/{work.reference.html => work1.reference.html} (100%) rename Sda1/Etest/Xslt2/Book2Html/Book1/{work.xml => work1.xml} (92%) delete mode 100644 Sda1/Etest/Xslt2/Book2Html/Book2/book.xsd rename Sda1/Etest/Xslt2/{Solution/Book2/book.xsd => Book2Html/Book2/book2.xsd} (76%) rename Sda1/Etest/Xslt2/Book2Html/Book2/{bookLinkMixedTest.xspec => book2Test.xspec} (100%) rename Sda1/Etest/Xslt2/Book2Html/Book2/{book2html.xsl => book2ToHtml.xsl} (100%) rename Sda1/Etest/Xslt2/Book2Html/Book2/{work.reference.html => work2.reference.html} (87%) rename Sda1/Etest/Xslt2/Book2Html/Book2/{work.xml => work2.xml} (66%) delete mode 100644 Sda1/Etest/Xslt2/Solution/Book1/book.xsd delete mode 100644 Sda1/Etest/Xslt2/Solution/Book1/bookBasicTest.xspec delete mode 100644 Sda1/Etest/Xslt2/Solution/Book1/work.xml delete mode 100644 Sda1/Etest/Xslt2/Solution/Book2/bookLinkMixedTest.xspec delete mode 100644 Sda1/Etest/Xslt2/Solution/Book2/work.xml diff --git a/Sda1/Etest/Xslt2/Book2Html/Book1/book.xsd b/Sda1/Etest/Xslt2/Book2Html/Book1/book1.xsd similarity index 100% rename from Sda1/Etest/Xslt2/Book2Html/Book1/book.xsd rename to Sda1/Etest/Xslt2/Book2Html/Book1/book1.xsd diff --git a/Sda1/Etest/Xslt2/Book2Html/Book1/bookBasicTest.xspec b/Sda1/Etest/Xslt2/Book2Html/Book1/book1Test.xspec similarity index 100% rename from Sda1/Etest/Xslt2/Book2Html/Book1/bookBasicTest.xspec rename to Sda1/Etest/Xslt2/Book2Html/Book1/book1Test.xspec diff --git a/Sda1/Etest/Xslt2/Book2Html/Book1/book2html.xsl b/Sda1/Etest/Xslt2/Book2Html/Book1/book1ToHtml.xsl similarity index 100% rename from Sda1/Etest/Xslt2/Book2Html/Book1/book2html.xsl rename to Sda1/Etest/Xslt2/Book2Html/Book1/book1ToHtml.xsl diff --git a/Sda1/Etest/Xslt2/Book2Html/Book1/work.reference.html b/Sda1/Etest/Xslt2/Book2Html/Book1/work1.reference.html similarity index 100% rename from Sda1/Etest/Xslt2/Book2Html/Book1/work.reference.html rename to Sda1/Etest/Xslt2/Book2Html/Book1/work1.reference.html diff --git a/Sda1/Etest/Xslt2/Book2Html/Book1/work.xml b/Sda1/Etest/Xslt2/Book2Html/Book1/work1.xml similarity index 92% rename from Sda1/Etest/Xslt2/Book2Html/Book1/work.xml rename to Sda1/Etest/Xslt2/Book2Html/Book1/work1.xml index ce99efd15..694fa0467 100644 --- a/Sda1/Etest/Xslt2/Book2Html/Book1/work.xml +++ b/Sda1/Etest/Xslt2/Book2Html/Book1/work1.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="book.xsd"> + xsi:noNamespaceSchemaLocation="book1.xsd"> <title>Beginning XSL</title> <chapter> <title>Basic structure</title> diff --git a/Sda1/Etest/Xslt2/Book2Html/Book2/book.xsd b/Sda1/Etest/Xslt2/Book2Html/Book2/book.xsd deleted file mode 100644 index 071d5962a..000000000 --- a/Sda1/Etest/Xslt2/Book2Html/Book2/book.xsd +++ /dev/null @@ -1,49 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified" - vc:minVersion="1.0" vc:maxVersion="1.1"> - - <xs:element name="book"> - <xs:complexType> - <xs:sequence> - <xs:element ref="title"/> - <xs:element ref="chapter" minOccurs="1" maxOccurs="unbounded"/> - </xs:sequence> - <xs:attribute name="id" type="xs:ID" use="optional"/> - </xs:complexType> - </xs:element> - - <xs:element name="title" type="xs:string"/> - - - <xs:element name="chapter"> - <xs:complexType> - <xs:sequence> - <xs:element ref="title"/> - <xs:element ref="para" minOccurs="1" maxOccurs="unbounded"/> - </xs:sequence> - <xs:attribute name="id" type="xs:ID" use="optional"/> - </xs:complexType> - </xs:element> - - <xs:element name="para" > - <xs:complexType mixed="true"> - <xs:sequence> - <xs:element ref="emphasis" minOccurs="0" maxOccurs="unbounded"/> - <xs:element ref="link" minOccurs="0" maxOccurs="unbounded"/> - </xs:sequence> - <xs:attribute name="id" type="xs:ID" use="optional"/> - </xs:complexType> - </xs:element> - - <xs:element name="emphasis" type="xs:string"/> - - <xs:element name="link"> - <xs:complexType mixed="true"> - <xs:attribute name="linkend" type="xs:IDREF" use="required"/> - </xs:complexType> - - </xs:element> - -</xs:schema> diff --git a/Sda1/Etest/Xslt2/Solution/Book2/book.xsd b/Sda1/Etest/Xslt2/Book2Html/Book2/book2.xsd similarity index 76% rename from Sda1/Etest/Xslt2/Solution/Book2/book.xsd rename to Sda1/Etest/Xslt2/Book2Html/Book2/book2.xsd index 071d5962a..c52af3089 100644 --- a/Sda1/Etest/Xslt2/Solution/Book2/book.xsd +++ b/Sda1/Etest/Xslt2/Book2Html/Book2/book2.xsd @@ -14,9 +14,6 @@ </xs:complexType> </xs:element> - <xs:element name="title" type="xs:string"/> - - <xs:element name="chapter"> <xs:complexType> <xs:sequence> @@ -29,14 +26,22 @@ <xs:element name="para" > <xs:complexType mixed="true"> - <xs:sequence> - <xs:element ref="emphasis" minOccurs="0" maxOccurs="unbounded"/> - <xs:element ref="link" minOccurs="0" maxOccurs="unbounded"/> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="emphasis" minOccurs="0"/> + <xs:element ref="link" minOccurs="0" /> </xs:sequence> <xs:attribute name="id" type="xs:ID" use="optional"/> </xs:complexType> </xs:element> + <xs:element name="title"> + <xs:complexType mixed="true"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="link" minOccurs="0" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="emphasis" type="xs:string"/> <xs:element name="link"> diff --git a/Sda1/Etest/Xslt2/Book2Html/Book2/bookLinkMixedTest.xspec b/Sda1/Etest/Xslt2/Book2Html/Book2/book2Test.xspec similarity index 100% rename from Sda1/Etest/Xslt2/Book2Html/Book2/bookLinkMixedTest.xspec rename to Sda1/Etest/Xslt2/Book2Html/Book2/book2Test.xspec diff --git a/Sda1/Etest/Xslt2/Book2Html/Book2/book2html.xsl b/Sda1/Etest/Xslt2/Book2Html/Book2/book2ToHtml.xsl similarity index 100% rename from Sda1/Etest/Xslt2/Book2Html/Book2/book2html.xsl rename to Sda1/Etest/Xslt2/Book2Html/Book2/book2ToHtml.xsl diff --git a/Sda1/Etest/Xslt2/Book2Html/Book2/work.reference.html b/Sda1/Etest/Xslt2/Book2Html/Book2/work2.reference.html similarity index 87% rename from Sda1/Etest/Xslt2/Book2Html/Book2/work.reference.html rename to Sda1/Etest/Xslt2/Book2Html/Book2/work2.reference.html index 7c41e75b8..7a08231f2 100644 --- a/Sda1/Etest/Xslt2/Book2Html/Book2/work.reference.html +++ b/Sda1/Etest/Xslt2/Book2Html/Book2/work2.reference.html @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> <html> <head> <title>Beginning XSL</title> @@ -9,6 +10,6 @@ <p>Do <em>not forget</em>: template elements must not be nested!</p> <h2>Important elements</h2> <p id="someText">Some more text.</p> - <p>The <a href="#firstChapter">first chapter</a> explains basic structures.</p> + <p>The <a href="#firstChapter">first chapter</a> explains <em>basic</em> structures.</p> </body> </html> diff --git a/Sda1/Etest/Xslt2/Book2Html/Book2/work.xml b/Sda1/Etest/Xslt2/Book2Html/Book2/work2.xml similarity index 66% rename from Sda1/Etest/Xslt2/Book2Html/Book2/work.xml rename to Sda1/Etest/Xslt2/Book2Html/Book2/work2.xml index 95992573e..eb1ac6c2f 100644 --- a/Sda1/Etest/Xslt2/Book2Html/Book2/work.xml +++ b/Sda1/Etest/Xslt2/Book2Html/Book2/work2.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="book.xsd"> + id="top" xsi:noNamespaceSchemaLocation="book2.xsd"> <title>Beginning XSL</title> <chapter id="firstChapter"> - <title>Basic structure</title> + <title>Basic <link linkend="someText">XML</link> structure</title> <para>An XSLT consists of a stylesheet declaration and a set of templates.</para> <para>Do <emphasis>not forget</emphasis>: template elements must not be nested!</para> </chapter> <chapter> <title>Important elements</title> - <para id="someText">Some more text.</para> - <para>The <link linkend="firstChapter">first chapter</link> explains basic structures.</para> + <para id="someText">Basic information on XML.</para> + <para>The <link linkend="firstChapter">first chapter</link> explains <emphasis>basic</emphasis> structures.</para> </chapter> </book> \ No newline at end of file diff --git a/Sda1/Etest/Xslt2/Solution/Book1/book.xsd b/Sda1/Etest/Xslt2/Solution/Book1/book.xsd deleted file mode 100644 index 2937de43b..000000000 --- a/Sda1/Etest/Xslt2/Solution/Book1/book.xsd +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" elementFormDefault="qualified" - vc:minVersion="1.0" vc:maxVersion="1.1"> - - <xs:element name="book"> - <xs:complexType> - <xs:sequence> - <xs:element ref="title"/> - <xs:element ref="chapter" minOccurs="1" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - </xs:element> - - <xs:element name="title" type="xs:string"/> - - <xs:element name="chapter"> - <xs:complexType> - <xs:sequence> - <xs:element ref="title"/> - <xs:element name="para" type="xs:string" minOccurs="1" maxOccurs="unbounded"/> - </xs:sequence> - </xs:complexType> - </xs:element> - -</xs:schema> diff --git a/Sda1/Etest/Xslt2/Solution/Book1/bookBasicTest.xspec b/Sda1/Etest/Xslt2/Solution/Book1/bookBasicTest.xspec deleted file mode 100644 index 9fe81d085..000000000 --- a/Sda1/Etest/Xslt2/Solution/Book1/bookBasicTest.xspec +++ /dev/null @@ -1,148 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" - stylesheet="book2html.xsl"> - - <x:scenario label="Testing 'title' being immediate child of 'book'"> - - <x:context select="/book/title"> - <book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="book.xsd"> - <title>Abcd</title> - <chapter> - <title></title> - <para></para> - </chapter> - </book> - </x:context> - - <x:expect label="'title' text being wrapped in a 'h1' element" > - <h1>Abcd</h1> - </x:expect> - - </x:scenario> - - <x:scenario label="Testing 'title' being immediate child of 'chapter'"> - - <x:context select="/book/chapter/title"> - <book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="book.xsd"> - <title>Abcd</title> - <chapter> - <title>Defg</title> - <para></para> - </chapter> - </book> - </x:context> - - <x:expect label="'title' text being wrapped in a 'h2' element" > - <h2>Defg</h2> - </x:expect> - - </x:scenario> - - - <x:scenario label="Testing basic 'chapter' structure"> - - <x:context select="/book/chapter"> - <book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="book.xsd"> - <title>Abc</title> - <chapter> - <title>Def</title> - <para>Ghi</para> - <para>Jkl</para> - </chapter> - </book> - </x:context> - - <x:expect label="Expecting 'h2' containing AbC and two 'p' tags containing X and Y"> - <h2>Def</h2> - <p>Ghi</p> - <p>Jkl</p> - </x:expect> - - </x:scenario> - - <x:scenario label="Testing multiple 'chapter' nodes"> - - <x:context select="/book/chapter"> - <book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="book.xsd"> - <title>Abc</title> - <chapter> - <title>Def</title> - <para>Ghi</para> - <para>Jkl</para> - </chapter> - <chapter> - <title>Lmn</title> - <para>Opq</para> - <para>Rst</para> - </chapter> - </book> - </x:context> - - <x:expect label="Expecting 'h2' followed by 'p'. Repetition with corresponding values B and Y"> - - <h2>Def</h2> - <p>Ghi</p> - <p>Jkl</p> - - <h2>Lmn</h2> - <p>Opq</p> - <p>Rst</p> - </x:expect> - - </x:scenario> - - <x:scenario label="Testing minimal html root skeleton"> - - <x:context> - <book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="book.xsd"> - <title/> - <chapter> - <title/> - <para/> - <para/> - </chapter> - </book> - </x:context> - - <x:expect label="Expecting HTML root structure"> - <html> - <head><title/></head> - <body> - <h1/> - <h2/> - <p/> - <p/> - </body> - </html> - </x:expect> - - </x:scenario> - - <x:scenario label="Testing complete example"> - - <x:context> - <book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="book.xsd"> - <title>AbC</title> - <chapter> - <title>Def</title> - <para>Ghi</para> - </chapter> - </book> - </x:context> - - <x:expect label="Expecting HTML root structure"> - <html> - <head> - <title>AbC</title> - </head> - <body> - <h1>AbC</h1> - <h2>Def</h2> - <p>Ghi</p> - </body> - </html> - </x:expect> - - </x:scenario> - -</x:description> diff --git a/Sda1/Etest/Xslt2/Solution/Book1/work.xml b/Sda1/Etest/Xslt2/Solution/Book1/work.xml deleted file mode 100644 index ce99efd15..000000000 --- a/Sda1/Etest/Xslt2/Solution/Book1/work.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<book xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="book.xsd"> - <title>Beginning XSL</title> - <chapter> - <title>Basic structure</title> - <para>An XSLT consists of a stylesheet declaration and a set of templates.</para> - <para>Do not forget: template elements must not be nested!</para> - </chapter> - <chapter> - <title >Important elements</title> - <para>Some more text.</para> - <para>The first chapter explains basic structures.</para> - </chapter> -</book> \ No newline at end of file diff --git a/Sda1/Etest/Xslt2/Solution/Book2/bookLinkMixedTest.xspec b/Sda1/Etest/Xslt2/Solution/Book2/bookLinkMixedTest.xspec deleted file mode 100644 index f64c5d6c9..000000000 --- a/Sda1/Etest/Xslt2/Solution/Book2/bookLinkMixedTest.xspec +++ /dev/null @@ -1,104 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" - stylesheet="book2html.xsl"> - - - <x:import href="../Book1/bookBasicTest.xspec" /> - - <x:scenario label="Testing @id in 'chapter'"> - - <x:context select="/chapter/title"> - <chapter id='idValue'> - <title>Abc</title> - <para>Def</para> - </chapter> - </x:context> - - <x:expect label="'title' text being wrapped in a 'h2' element"> - <h2 id='idValue'>Abc</h2> - </x:expect> - - </x:scenario> - - <x:scenario label="Testing @id in 'para'"> - - <x:context> - <para id='idValue'>Abc</para> - </x:context> - - <x:expect label="'para' text being wrapped in a 'p' element supplying @id"> - <p id='idValue'>Abc</p> - </x:expect> - - </x:scenario> - - <x:scenario label="Testing @id in 'book'"> - - <x:context> - <book id='idValue'> - <title>Abc</title> - <chapter> - <title>Def</title> - <para>Ghi</para> - </chapter> - </book> - </x:context> - - <x:expect label="Transfer @id value in 'book' to 'body' tag"> - <html> - <head> - <title>Abc</title> - </head> - <body id='idValue'> - <h1>Abc</h1> - <h2>Def</h2> - <p>Ghi</p> - </body> - </html> - </x:expect> - - </x:scenario> - - <x:scenario label="Testing element content of 'emphasis'"> - - <x:context> - <emphasis>AbC</emphasis> - </x:context> - - <x:expect label="'emphasis' text being wrapped in a 'em' element"> - <em>AbC</em> - </x:expect> - - </x:scenario> - - <x:scenario label="Testing 'para' mixed text with 'emphasis'"> - - <x:context> - <para>Some <emphasis>important</emphasis> text</para> - </x:context> - - <x:expect label="'para' components being wrapped in a 'p' element containing 'em'"> - <p>Some <em>important</em> text</p> - </x:expect> - - </x:scenario> - - <x:scenario label="Testing @linkend and element content of 'link'"> - <x:context> - <link linkend='DeF'>AbC</link> - </x:context> - <x:expect label="'link' text being wrapped in a 'a' element providing @href attribute"> - <a href='#DeF'>AbC</a> - </x:expect> - </x:scenario> - - <x:scenario label="Testing mixed 'para' content"> - <x:context> - <para>See <emphasis>important hint</emphasis> in <link linkend='firstChapter'>start chapter</link></para> - </x:context> - <x:expect label="'em' and 'a' tags being wrapped in a 'p' element"> - <p>See <em>important hint</em> in <a href='#firstChapter'>start chapter</a></p> - </x:expect> - </x:scenario> - -</x:description> \ No newline at end of file diff --git a/Sda1/Etest/Xslt2/Solution/Book2/work.xml b/Sda1/Etest/Xslt2/Solution/Book2/work.xml deleted file mode 100644 index 8be7f7103..000000000 --- a/Sda1/Etest/Xslt2/Solution/Book2/work.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<book id="top" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:noNamespaceSchemaLocation="book.xsd"> - <title>Beginning XSL</title> - <chapter id="firstChapter"> - <title>Basic structure</title> - <para>An XSLT consists of a stylesheet declaration and a set of templates.</para> - <para>Do <emphasis>not forget</emphasis>: template elements must not be nested!</para> - </chapter> - <chapter> - <title>Important elements</title> - <para id="someText">Some more text.</para> - <para>The <link linkend="firstChapter">first chapter</link> explains basic structures.</para> - </chapter> -</book> \ No newline at end of file -- GitLab