Click here to Skip to main content
15,890,399 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more: , +
We only talk about DTD and XML in class for 2 days and i have this assignment not sure if im doing it right or did everything that has been asked. Atleast i try, any help will be appreciated!!

Assignment You have been asked to represent airport data where an airport has required attributes name and location; and an implied attribute famous_assoiciation. The famous_assoication attribute is the name of a famous person after whom the airport has been named. An airport is composed of one or more hangers. Each hanger has a number, location and a set of 0 or more associated airlines. Each hanger also has a fixed attribute, length, of 2 miles. An airline has a name, one of more types of aircraft fleets (where a fleet contains one or more planes). A plane has a manufacturer, model, vin and seat_capacity. A plane also has attribute color with a default value of “silver”

You may assume that all data in this system is of type CDATA

This is what i have did..

XML
<!DOCTYPE airport [


<!ELEMENT airport (hanger+)>
<!ELEMENT hanger (number, location, airline*)>
<!ELEMENT number (#PCDATA)>
<!ELEMENT location (#PCDATA)>
<!ELEMENT airline (name, aircraft fleets+)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT aircraft fleets (plane+)>
<!ELEMENT plane (manufacturer, model, vin, seat_capacity)>
<!ELEMENT manufacturer (#PCDATA)>
<!ELEMENT model (#PCDATA)>
<!ELEMENT vin (#PCDATA)>
<!ELEMENT seat_capacity (#PCDATA)>


<!ATTLIST airport name CDATA #REQUIRED>
<!ATTLIST airport location CDATA #REQUIRED>
<!ATTLIST airport famous_assoiciation CDATA #IMPLIED>
<!ATTLIST plane color CDATA #FIXED "silver">
<!ATTLIST hanger length CDATA #FIXED "2 miles">

]>
Posted
Updated 20-Nov-13 19:15pm
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900