Commit 428eec21 authored by Dr. Martin Goik's avatar Dr. Martin Goik

Exam sda1

parent ae119d71
<?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.1">
<xs:element name="dictionary">
</xs:element>
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<dictionary fromLanguage='en' toLanguage='de'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="dictionary.xsd">
<entry>
<from>concern</from>
<translations>
<to>Sorge</to>
<to>Besorgnis</to>
</translations>
</entry>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
<to>Mitgefühl</to>
<to>Mitleid</to>
<to>Erbarmen</to>
</translations>
<synonyms>
<from>pity</from>
<from>concern</from>
</synonyms>
</entry>
<entry>
<from>jerk</from>
<translations>
<to>Ruck</to>
<to>Trottel</to>
</translations>
</entry>
<entry>
<from>pity</from>
<translations>
<to>Mitleid</to>
<to>Erbarmen</to>
<to>Jammer</to>
<to>Mitgefühl</to>
</translations>
<synonyms>
<from>compassion</from>
</synonyms>
</entry>
</dictionary>
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>'en' to 'de' translation.</title>
</head>
<body>
<h1>'en' to 'de' translation.</h1>
<dl>
<dt id="concern" style="font-weight: bold;">concern</dt>
<dd>
<ul>
<li>Sorge</li>
<li>Besorgnis</li>
</ul>
</dd>
<dt id="compassion" style="font-weight: bold;">compassion</dt>
<dd>
<ul>
<li>Barmherzigkeit</li>
<li>Mitgefühl</li>
<li>Mitleid</li>
<li>Erbarmen</li>
</ul>
<p>Synonyms: <a href="#pity">pity</a>, <a href="#concern">concern</a></p>
</dd>
<dt id="jerk" style="font-weight: bold;">jerk</dt>
<dd>
<ul>
<li>Ruck</li>
<li>Trottel</li>
</ul>
</dd>
<dt id="pity" style="font-weight: bold;">pity</dt>
<dd>
<ul>
<li>Mitleid</li>
<li>Erbarmen</li>
<li>Jammer</li>
<li>Mitgefühl</li>
</ul>
<p>Synonym: <a href="#compassion">compassion</a></p>
</dd>
</dl>
</body>
</html>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en'
toLanguage='de'>
<entry>
<from>concern</from>
<translations>
<to>Sorge</to>
<to>Besorgnis</to>
</translations>
</entry>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
<to>Mitgefühl</to>
</translations>
<synonyms>
<from>pity</from>
</synonyms>
<synonyms>
<from>concern</from>
</synonyms>
</entry>
<entry>
<from>pity</from>
<translations>
<to>Mitleid</to>
<to>Erbarmen</to>
</translations>
<synonyms>
<from>compassion</from>
</synonyms>
</entry>
</dictionary>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "synonym.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en' toLanguage='de'>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
<to>Mitgefühl</to>
</translations>
<translations>
<to>Mitleid</to>
<to>Erbarmen</to>
</translations>
</entry>
</dictionary>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "1"
expectedToBeValid= "false"
preconditionValid="noTranslationDuplicate.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en' toLanguage='de'/>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "1"
expectedToBeValid= "true" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en'
toLanguage='de'>
<entry>
<from></from>
<translations>
<to>Sonne</to>
</translations>
</entry>
</dictionary>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "type.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en'
toLanguage='fi'/>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "empty.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en' toLanguage='de'>
<entry>
<from>compassion</from>
</entry>
</dictionary>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "1"
expectedToBeValid= "false"
preconditionValid="translation.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en' toLanguage='de'>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
<to>Mitgefühl</to>
<to>Mitleid</to>
<to>Erbarmen</to>
</translations>
</entry>
</dictionary>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en' toLanguage='de'>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
<to>Mitgefühl</to>
<to>Mitleid</to>
<to>Erbarmen</to>
<to>Mitgefühl</to>
</translations>
</entry>
</dictionary>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "1"
expectedToBeValid= "false"
preconditionValid="noTranslationDuplicate.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en'
toLanguage='de'>
<entry>
<from>concern</from>
<translations>
<to>Sorge</to>
<to>Besorgnis</to>
</translations>
</entry>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
<to>Mitgefühl</to>
</translations>
<synonyms>
<from>pity</from>
<from>concern</from>
</synonyms>
</entry>
<entry>
<from>pity</from>
<translations>
<to>Mitleid</to>
<to>Erbarmen</to>
</translations>
<synonyms>
<from>compassion</from>
</synonyms>
</entry>
</dictionary>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en'
toLanguage='de'>
<entry>
<from>concern</from>
<translations>
<to>Sorge</to>
<to>Besorgnis</to>
</translations>
</entry>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
<to>Mitgefühl</to>
</translations>
<synonyms>
<from>pity</from>
<from>concern</from>
<from>pity</from>
</synonyms>
</entry>
<entry>
<from>pity</from>
<translations>
<to>Mitleid</to>
<to>Erbarmen</to>
<to>Jammer</to>
<to>Mitgefühl</to>
</translations>
<synonyms>
<from>compassion</from>
</synonyms>
</entry>
</dictionary>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "synonym.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en'
toLanguage='de'>
<entry>
<from>concern</from>
<translations>
<to>Sorge</to>
<to>Besorgnis</to>
</translations>
</entry>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
<to>Mitgefühl</to>
</translations>
<synonyms>
<from>pity</from>
<from>conincidence</from>
</synonyms>
</entry>
<entry>
<from>pity</from>
<translations>
<to>Mitleid</to>
<to>Erbarmen</to>
<to>Jammer</to>
<to>Mitgefühl</to>
</translations>
<synonyms>
<from>compassion</from>
</synonyms>
</entry>
</dictionary>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "2"
expectedToBeValid = "false"
preconditionValid = "synonym.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en'
toLanguage='de'>
<entry>
<from>Sun</from>
<translations>
<to>Sonne</to>
<to></to>
</translations>
</entry>
</dictionary>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "type.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en' toLanguage='de'>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
</translations>
</entry>
</dictionary>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en' toLanguage='de'>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
</translations>
</entry>
</dictionary>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en' toLanguage='de'>
<entry>
<from>compassion</from>
<translations/>
</entry>
</dictionary>
<!-- Subsequent lines contain only processing instructions irrelevant to instance's validity -->
<?xmlTest
points = "1"
expectedToBeValid= "false"
preconditionValid="translationMinimal.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en'
toLanguage='de'>
<entry>
<from>Sun</from>
<translations>
<to>Sonne</to>
</translations>
</entry>
<entry>
<from>Moon</from>
<translations>
<to>Mond</to>
</translations>
</entry>
</dictionary>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en'
toLanguage='de'>
<entry>
<from>Sun</from>
<translations>
<to>Sonne</to>
</translations>
</entry>
<entry>
<from>Sun</from>
<translations>
<to>Himmelsstern</to>
</translations>
</entry>
</dictionary>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "twoEntries.xml" ?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<dictionary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/dictionary.xsd" fromLanguage='en'
toLanguage='de'>
<entry>
<from>Sun</from>
<translations>
<to>Sonne</to>
</translations>
</entry>
</dictionary>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<x:description xmlns:x="http://www.jenitennison.com/xslt/xspec" stylesheet="dictionary2html.xsl">
<x:scenario label="An empty '/dictionary'">
<x:context>
<dictionary fromLanguage='en' toLanguage='de'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="dictionary.xsd"/>
</x:context>
<x:expect label="Message indicating empty dictionary">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>'en' to 'de' translation.</title>
</head>
<body>
<h1>'en' to 'de' translation.</h1>
<p>No entries in dictionary</p>
</body>
</html>
</x:expect>
</x:scenario>
<x:scenario label="A single 'entry'">
<x:context>
<entry>
<from>concern</from>
<translations>
<to>Sorge</to>
</translations>
</entry>
</x:context>
<x:expect label="A dt/dd pair.">
<dt xmlns="http://www.w3.org/1999/xhtml" id="concern" style="font-weight: bold;">concern</dt>
<dd xmlns="http://www.w3.org/1999/xhtml">
<ul>
<li>Sorge</li>
</ul>
</dd>
</x:expect>
</x:scenario>
<x:scenario label="'/dictionary' containing one entry">
<x:context>
<dictionary fromLanguage='en' toLanguage='de'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="dictionary.xsd">
<entry>
<from>concern</from>
<translations>
<to>Sorge</to>
<to>Besorgnis</to>
</translations>
</entry>
</dictionary>
</x:context>
<x:expect label="A dl list containing one entry">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>'en' to 'de' translation.</title>
</head>
<body>
<h1>'en' to 'de' translation.</h1>
<dl>
<dt id="concern" style="font-weight: bold;">concern</dt>
<dd>
<ul>
<li>Sorge</li>
<li>Besorgnis</li>
</ul>
</dd>
</dl>
</body>
</html>
</x:expect>
</x:scenario>
<x:scenario label="Scenario for testing template with match 'synonyms">
<x:context select="dictionary/entry/synonyms">
<dictionary fromLanguage='en' toLanguage='de'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="dictionary.xsd">
<entry>
<from>concern</from>
<translations>
<to>Sorge</to>
<to>Besorgnis</to>
</translations>
</entry>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
<to>Mitgefühl</to>
<to>Mitleid</to>
<to>Erbarmen</to>
</translations>
<synonyms>
<from>pity</from>
<from>concern</from>
</synonyms>
</entry>
</dictionary>
</x:context>
<x:expect label="A coma separated list of all synonyms">
<p xmlns="http://www.w3.org/1999/xhtml">Synonyms: <a href="#pity">pity</a>, <a href="#concern">concern</a></p>
</x:expect>
</x:scenario>
<x:scenario label="Complete sample data.">
<x:context>
<dictionary fromLanguage='en' toLanguage='de'
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="dictionary.xsd">
<entry>
<from>concern</from>
<translations>
<to>Sorge</to>
<to>Besorgnis</to>
</translations>
</entry>
<entry>
<from>compassion</from>
<translations>
<to>Barmherzigkeit</to>
<to>Mitgefühl</to>
<to>Mitleid</to>
<to>Erbarmen</to>
</translations>
<synonyms>
<from>pity</from>
<from>concern</from>
</synonyms>