08.03.2014 Views

Exercises on XML and Semantic Web Technologies ... - ISMLL

Exercises on XML and Semantic Web Technologies ... - ISMLL

Exercises on XML and Semantic Web Technologies ... - ISMLL

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<str<strong>on</strong>g>Exercises</str<strong>on</strong>g> <strong>on</strong> <strong>XML</strong> <strong>and</strong> <strong>Semantic</strong> <strong>Web</strong> <strong>Technologies</strong> Summer term 2005<br />

Prof. Dr. Lars Schmidt-Thieme, Karen Tso sheet 4 / 06.05.2005<br />

Due <strong>on</strong>: (postp<strong>on</strong>ed to) Thursday 19.05.2005 via email tso@informatik.uni-freiburg.de<br />

Exercise 7<br />

a) Download the products.xsd (you can get the file from our department webpage, in<br />

<str<strong>on</strong>g>Exercises</str<strong>on</strong>g> secti<strong>on</strong>).<br />

1. Complete the <strong>XML</strong> schema so that it fulfils the following restricti<strong>on</strong>:<br />

The productCode of a company has the following form:<br />

E.g. hP SC 12345<br />

The first comp<strong>on</strong>ent (e.g. hP) c<strong>on</strong>sists of 2 letters. With<br />

LOWERCASE OR UPPERCASE letters from a to z.<br />

The sec<strong>on</strong>d comp<strong>on</strong>ent (e.g. SC) c<strong>on</strong>sists of 1 OR 2 letter.<br />

The last comp<strong>on</strong>ent (e.g. 12345) is a number with up to 4 digits.<br />

b) Given a fragment of an <strong>XML</strong> schema.<br />

1. Does the following <strong>XML</strong> schema violate the Unique Particle Attributi<strong>on</strong>?<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

2. If yes, explain why <strong>and</strong> model it correctly such that it allows the following<br />

names combinati<strong>on</strong>.<br />

<br />

Michael<br />

<br />

<br />

Joseph<br />

<br />

<br />

Jacks<strong>on</strong><br />

<br />

<br />

Michael<br />

<br />

<br />

Jacks<strong>on</strong><br />

<br />

<br />

Michael<br />

<br />

<br />

Joseph<br />

<br />

<br />

Jacks<strong>on</strong><br />

<br />

1


<str<strong>on</strong>g>Exercises</str<strong>on</strong>g> <strong>on</strong> <strong>XML</strong> <strong>and</strong> <strong>Semantic</strong> <strong>Web</strong> <strong>Technologies</strong> Summer term 2005<br />

Prof. Dr. Lars Schmidt-Thieme, Karen Tso sheet 4 / 06.05.2005<br />

Exercise 8<br />

a) Given the following example xml document, design a suitable schema such that the<br />

document is valid w.r.t. the schema.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!