Commit 151ca861 authored by Dr. Martin Goik's avatar Dr. Martin Goik

Sda1 SoSe 2020

parent b805e18f
This diff is collapsed.
......@@ -164,6 +164,9 @@
<xi:include href="Sda1/Exam/2019/Winter/Solve/Doc/tasks.xml"
xpointer="element(/1)"/>
<xi:include href="Sda1/Exam/2020/Summer/Solve/Doc/tasks.xml"
xpointer="element(/1)"/>
</section>
</appendix>
</part>
......
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
<!-- TODO: Implement me -->
</xs:schema>
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="company.xsd" >
<departments>
<department>
<name>Headquarter</name>
<member nickname = "jb">Jim Beam</member>
<department> <!-- Sub department of »Headquarter« -->
<name>GUI Development</name>
<member nickname="eg">Eve Gardener</member>
<member nickname="pt">Pete Townsend</member>
</department>
<department> <!-- Another sub department of »Headquarter« -->
<name>Database Development</name>
<member nickname="ls">Laura Stern</member>
</department>
<department>
<name>New stuff</name>
<!-- No members yet -->
</department>
</department>
</departments>
<projects>
<project slug="GUIGen" visibility="public">
<name>GUI Generator</name>
<developers>
<developer member="eg" role="manager"/>
<developer member="jb" role="guest"/>
</developers>
</project>
<project slug="dbSchemaGen" visibility="internal">
<name>Database Schema Generator</name>
<developers>
<developer member="pt" role="developer"/>
</developers>
</project>
<project slug="aBook" visibility="private">
<name>Address Book</name>
<developers>
<developer member="jb" role="manager"/>
</developers>
</project>
</projects>
</company>
DROP TABLE IF EXISTS Department;
CREATE TABLE Department (
name CHAR(255) /* Schema yet incomplete !!!*/
);
/* Missing tables */
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments/>
<projects/>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "true"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments/>
<!-- <projects/> is missing -->
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0100valid_Minimum.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<!-- <departments/> is missing -->
<projects/>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0100valid_Minimum.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<!-- <departments/> and <projects/> are missing -->
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0100valid_Minimum.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments>
<department>
<name>Headquarter</name>
</department>
</departments>
<projects/>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "true"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments>
<department>
<!-- Missing <name> ... </name> -->
</department>
</departments>
<projects/>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0200valid_Department.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments>
<department>
<name>Name 1</name>
</department>
<department>
<name>Name 2</name>
</department>
<department>
<name>Name 3</name>
</department>
</departments>
<projects/>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "true"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments>
<department>
<name>Name 1</name>
<department>
<name>sub 1_1</name>
<department>
<name>Sub 1_1_1</name>
</department>
</department>
</department>
<department>
<name>Name 2</name>
</department>
<department>
<name>Name 3</name>
</department>
</departments>
<projects/>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "true"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments>
<department>
<name>Name 1</name>
<department>
<name>sub 1_1</name>
<department>
<name>Duplicate</name>
</department>
</department>
</department>
<department>
<name>Name 2</name>
</department>
<department>
<name>Duplicate</name> <!-- Department name »Duplicate« already define -->
</department>
</departments>
<projects/>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0305validDepHierarchy.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments>
<department>
<name>Dept. 1</name>
<member nickname="tim">Tim evans</member>
<member nickname="sue">Sue Jenkins</member>
<department>
<name>Dept. 2</name>
<member nickname="ellen">Ellen Palmer</member>
</department>
</department>
</departments>
<projects/>
</company>
<?xmlTest
points = "2"
expectedToBeValid = "true"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments>
<department>
<name>Name 1</name>
<member >Tim evans</member> <!-- Missing @nickname -->
<member nickname="sue">Sue Jenkins</member>
<department>
<name>Dept. 2</name>
<member nickname="ellen">Ellen Palmer</member>
</department>
</department>
</departments>
<projects/>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0350validDepartmentMember.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments>
<department>
<name>Name 1</name>
<member nickname="tim+evans">Tim evans</member> <!-- @nickname must not contain '+' -->
<member nickname="sue">Sue Jenkins</member>
<department>
<name>Dept. 2</name>
<member nickname="ellen">Ellen Palmer</member>
</department>
</department>
</departments>
<projects/>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0350validDepartmentMember.xml"
?>
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments>
<department>
<name>Department 1</name>
<member nickname="tim">Tim evans</member>
<member nickname="sue">Sue Jenkins</member>
<department>
<name>Department 2</name>
<member nickname="sue">Sue Jenkins2</member> <!-- Duplicate @nickname in Department 1 -->
</department>
</department>
</departments>
<projects/>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0350validDepartmentMember.xml"
?>
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments/>
<projects>
<project slug="testP" visibility="internal">
<name>Test project</name>
<developers/>
</project>
<project slug="testQ" visibility="private">
<name>Test project</name>
<developers/>
</project>
</projects>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "true"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments/>
<projects>
<project slug="testProject" visibility="internal">
<!-- Missing <name> ... </name> -->
<developers/>
</project>
</projects>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0100valid_Minimum.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments/>
<projects>
<project visibility="internal" slug="test"> <!-- @slug minimum length is 5 -->
<name>Test project</name>
<developers/>
</project>
</projects>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0400validProject.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments/>
<projects>
<project visibility="internal" slug="test Project"> <!-- @slug must not contain whitespace -->
<name>Test project</name>
<developers/>
</project>
</projects>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0400validProject.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments/>
<projects>
<project slug="testProject" visibility="garbage"> <!-- @visibility must be {public|internal|private} -->
<name>Project 1</name>
<developers/>
</project>
</projects>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0400validProject.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments/>
<projects>
<project visibility="internal"> <!-- missing required @slug -->
<name>Project 1</name>
<developers/>
</project>
</projects>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0400validProject.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments/>
<projects>
<project slug="testProject" > <!-- missing required @visibility -->
<name>Project 1</name>
<developers/>
</project>
</projects>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0400validProject.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >
<departments/>
<projects>
<project slug="testP" visibility="internal">
<name>Test project</name>
<developers/>
</project>
<project visibility="private" slug="testP"> <!-- Duplicate @slug value -->
<name>Test project</name>
<developers/>
</project>
</projects>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0400validProject.xml"
?>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../Schema/company.xsd" >