Skip to content
Snippets Groups Projects
Commit 76fcf035 authored by Goik Martin's avatar Goik Martin
Browse files

Sda1 WS 2016/17

parent e3ec25cc
No related branches found
No related tags found
No related merge requests found
Showing
with 410 additions and 0 deletions
/.classpath
/.project
A1.log
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
<xs:element name="company"/> <!-- TODO: implement me -->
</xs:schema>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<company xsi:noNamespaceSchemaLocation="company.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<departments>
<department short="fs">
<name>Financial Services</name>
<department short="cust">
<name>Customer Relations</name>
<department short="support">
<name>Customer Support</name>
</department>
</department>
<department short="4you">
<name>Marketing for you</name>
</department>
</department>
<department short="dev">
<name>Development</name>
</department>
</departments>
<employees>
<employee ssn="987-65-4320" department="dev">
<commonName>Sue Baker</commonName>
</employee>
<employee ssn="987-65-4326" department="support">
<commonName>Jim Smith</commonName>
</employee>
</employees>
</company>
\ 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 short="a">
<name>A</name>
</department>
</departments>
<employees/>
</company>
\ 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 short="a b"> <!-- Error: @short must not contain spaces -->
<name>A</name>
</department>
</departments>
<employees/>
</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 short="abc">
<name>A</name>
</department>
<department short="abc"> <!-- Error: Duplicate @short value "abc" -->
<name>A</name>
</department>
</departments>
<employees/>
</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 > <!-- Error: @short attribute undefined -->
<name>A</name>
</department>
</departments>
<employees/>
</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 short=""> <!-- Error: @short has zero length -->
<name>A</name>
</department>
</departments>
<employees/>
</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/> <!-- Error: Need at least one <department> -->
<employees/>
</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 short="a">
<name>A</name>
<name>B</name> <!-- Error: <name> must appear exactly once -->
</department>
</departments>
<employees/>
</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/> <!-- Error: Need at least one department -->
<employees/>
</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 short="a">
<name>A</name>
<department short="b">
<name>B</name>
<department short="c">
<name>C</name>
<department short="d">
<name>D</name>
</department>
<department short="e">
<name>E</name>
</department>
</department>
</department>
</department>
</departments>
<employees/>
</company>
\ 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 short="a">
<name>A</name>
<department short="abc">
<name>B</name>
<department short="abc"> <!-- Error: duplicate @short value "abc" -->
<name>C</name>
<department short="d">
<name>D</name>
</department>
</department>
</department>
</department>
</departments>
<employees/>
</company>
<?xmlTest
points = "2"
expectedToBeValid = "false"
preconditionValid = "0200valid_nesting.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 short="a">
<name>A</name>
</department>
</departments>
<employees>
<employee ssn="123-33-2213" department="a">
<commonName>Pam Baker</commonName>
</employee>
</employees>
</company>
\ 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 short="a">
<name>A</name>
</department>
</departments>
<employees>
<employee ssn="123-33-2213"> <!--Error: missing department attribute -->
<commonName>Pam Baker</commonName>
</employee>
</employees>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0300valid_minEmployee.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 short="a">
<name>A</name>
</department>
</departments>
<employees>
<employee department="a"> <!--Error: missing ssn attribute -->
<commonName>Pam Baker</commonName>
</employee>
</employees>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0300valid_minEmployee.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 short="a">
<name>A</name>
</department>
</departments>
<employees>
<employee ssn="213-55-3213" department="a"/> <!--Error: missing <commonName> -->
</employees>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0300valid_minEmployee.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 short="a">
<name>A</name>
</department>
</departments>
<employees>
<employee ssn="123-33-2213" department="a">
<commonName>Pam Baker</commonName>
<commonName>Tim Berners Lee</commonName>
</employee>
</employees>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0300valid_minEmployee.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 short="a">
<name>A</name>
</department>
</departments>
<employees>
<employee ssn="123-33-2213" department="a">
<commonName>Pam Baker</commonName>
</employee>
<employee ssn="123-33-2215" department="a">
<commonName>Pam Baker</commonName>
</employee>
</employees>
</company>
\ 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 short="a">
<name>A</name>
</department>
</departments>
<employees>
<employee ssn="123-33-2213" department="a">
<commonName>Pam Baker</commonName>
</employee>
<employee ssn="123-33-2213" department="a"> <!--Error: Duplicate ssn -->
<commonName>Pam Baker</commonName>
</employee>
</employees>
</company>
<?xmlTest
points = "1"
expectedToBeValid = "false"
preconditionValid = "0400valid_multipleEmployee.xml" ?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment