add solutions for excercise 3
This commit is contained in:
parent
e04c8669f6
commit
4f7bca6860
|
@ -0,0 +1,25 @@
|
|||
<!ELEMENT collection (description,recipe*)>
|
||||
|
||||
<!ELEMENT description ANY>
|
||||
|
||||
<!ELEMENT recipe (title,ingredient*,preparation,comment?,nutrition)>
|
||||
|
||||
<!ELEMENT title (#PCDATA)>
|
||||
|
||||
<!ELEMENT ingredient EMPTY>
|
||||
<!ATTLIST ingredient name CDATA #REQUIRED
|
||||
amount CDATA #IMPLIED
|
||||
unit CDATA #IMPLIED>
|
||||
|
||||
<!ELEMENT preparation (step*)>
|
||||
|
||||
<!ELEMENT step (#PCDATA)>
|
||||
|
||||
<!ELEMENT comment (#PCDATA)>
|
||||
|
||||
<!ELEMENT nutrition EMPTY>
|
||||
<!ATTLIST nutrition protein CDATA #REQUIRED
|
||||
carbohydrates CDATA #REQUIRED
|
||||
fat CDATA #REQUIRED
|
||||
calories CDATA #REQUIRED
|
||||
alcohol CDATA #IMPLIED>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0"?>
|
||||
<!DOCTYPE collection SYSTEM 'recipes.dtd'>
|
||||
<collection>
|
||||
<description>Dies ist ein Rezept für etwas zu bauen.</description>
|
||||
<recipe>
|
||||
<title>Brot</title>
|
||||
<ingredient name="wasser" amount="2" unit="liter"/>
|
||||
<ingredient name="mehl" amount="2" unit="kg"/>
|
||||
<preparation>
|
||||
<step>rühren</step>
|
||||
<step>knetten</step>
|
||||
<step>backen</step>
|
||||
</preparation>
|
||||
<comment>Dies ist ein Kommentar</comment>
|
||||
<nutrition protein="2" carbohydrates="4" fat="7" calories="2000" alcohol="40"/>
|
||||
</recipe>
|
||||
</collection>
|
Reference in New Issue