Czy może ktoś sprawdzić czy dobrze zrobiłem zadanie ?? Bardzo proszę :)
Kod:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE catalog [
<!ELEMENT catalog (section)+>
<!ELEMENT section (distributor*,region*,winery*,wine+)>
<!ATTLIST section subject (Wines) #REQUIRED>
<!ELEMENT distributor (#PCDATA)>
<!ATTLIST distributor id ID #IMPLIED name CDATA #IMPLIED>
<!ELEMENT region (#PCDATA)>
<!ATTLIST region name CDATA #IMPLIED>
<!ELEMENT name (#PCDATA)>
<!ELEMENT country (#PCDATA)>
<!ELEMENT winery (#PCDATA|name|region|country)*>
<!ATTLIST winery id ID #IMPLIED>
<!ELEMENT wine (name,varietal,vintage,winery,distributor,bottlesize,description)>
<!ATTLIST winery id ID #IMPLIED>
<!ELEMENT bottlesize (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT varietal (#PCDATA)>
<!ELEMENT vintage (#PCDATA)>
]>
<catalog>
<section subject="Wines">
<distributor id="" name=""></distributor>
<region name=""></region>
<name></name>
<country></country>
<winery id=""></winery>
<wine id="">
<name></name>
<varietal></varietal>
<vintage></vintage>
<winery></winery>
<distributor></distributor>
<bottlesize></bottlesize>
<description></description>
</wine>
</section>
<section subject="Wines">
<distributor id="" name=""></distributor>
<region name=""></region>
<winery id=""></winery>
<wine id="">
<name></name>
<varietal></varietal>
<vintage></vintage>
<winery></winery>
<distributor></distributor>
<bottlesize></bottlesize>
<description></description>
</wine>
</section>
<section subject="Wines">
<distributor id="" name=""></distributor>
<region name=""></region>
<winery id=""></winery>
<wine id="">
<name></name>
<varietal></varietal>
<vintage></vintage>
<winery></winery>
<distributor></distributor>
<bottlesize></bottlesize>
<description></description>
</wine>
</section>
</catalog>
Dziękuję :)