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 ce99efd154ab67f5351d6ad26069e28aa967dba7..694fa0467e8f6b8186caa53f2ab960ac6c02a55b 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 071d5962a2f91a56d810830099dfc6d3e2f7d71e..0000000000000000000000000000000000000000 --- 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 071d5962a2f91a56d810830099dfc6d3e2f7d71e..c52af3089b3ff6f70f63bf2b0738fd9611e1359d 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 7c41e75b8fac062826e6ba124732f6c1d56a24a1..7a08231f204c6f489d3152beffdd27a9d1ec3863 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 95992573e4b42fdf95e791faa2a51a173f3c17db..eb1ac6c2f04d02af6f90d6b96fc69a0cf7678e9a 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 2937de43baf54526bc86dfe183f3e22fd2f1b8f5..0000000000000000000000000000000000000000 --- 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 9fe81d0851bee34e1cfe8910cb04ef01745cfd65..0000000000000000000000000000000000000000 --- 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 ce99efd154ab67f5351d6ad26069e28aa967dba7..0000000000000000000000000000000000000000 --- 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 f64c5d6c911cfcc6120e34a7aebbe3c0e859ad64..0000000000000000000000000000000000000000 --- 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 8be7f710344e6c574f80e06c9a029d6576aa0923..0000000000000000000000000000000000000000 --- 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