Question

In: Computer Science

Consider the XML DTD definition below. Write a well-formed and valid XML Document that conforms to...

Consider the XML DTD definition below. Write a well-formed and valid XML Document that conforms to this definition.

<!ELEMENT wine-catalog (wine+)>

<!ELEMENT wine (properties,origin,price,year,tasting-note?)>

<!ATTLIST wine

   code   ID #REQUIRED

name   #PCDATA #REQUIRED

   classification #PCDATA #REQUIRED

format (375ml|750ml) “750ml”>

<!ELEMENT properties (color,alcohol-content)>

<!ELEMENT color (#PCDATA)>

<!ELEMENT alcohol-content (#PCDATA)>

<!ELEMENT origin (country, region, producer)>

<!ELEMENT country (#PCDATA)>

<!ELEMENT region (#PCDATA)>

<!ELEMENT producer (#PCDATA)>

<!ELEMENT price (#PCDATA)>

<!ELEMENT year (#PCDATA)>

<!ELEMENT tasting-note (#PCDATA)>

Solutions

Expert Solution

THE VALID XML DOCUMENT THAT CONFORMS TO THE GIVEN DEFINATION .

NOTE THAT I HAVE PUT ALL THE VALUES SUCH AS name of the wine etc AS AN EXAMPLE. YOU CAN CHANGE THE VALUES , BUT THE SCHEMA REMAINS SAME .

<!DOCTYPE wine_catalog SYSTEM "wine.dtd">
  <wine-catalog>
    <wine code="124579" , name = "Red wine" , classification ="smooth-wine" , format ="750ml">
      <properties>
         <color>red</color>
         <alchol-content> 35% </alchol-content>
      </properties>
      <origin>
         <country>swiss</country>
         <region>alps mountains</region>
         <producer> swiss wines</producer>
       </origin>
      <price> 1000$ </price>
      <year> 1879 </year>
      <tasting-note>Incredibly smooth </tasting-note>
    <wine>
   <wine-catalog>
      

Related Solutions

What is the well formatted XML document
What is the well formatted XML document
Write a DTD for this XML document such that the corrected version of the example is...
Write a DTD for this XML document such that the corrected version of the example is a valid XML document <?xml version="1.0"?> <computers> <item type = "Laptop" code = "Dell437">    <make>    <brand>Dell Inspiration</Brand>    <supplier id = "Dell"/>    </make>    <spec>    <cpu speed = "900"/>    <harddisk size = "12" units = "GB"/>    </Spec>    <price n = "950" units = "USD"/> </item> <item type = "Desktop" code = "Apple1679">    <make>    <brand>Apple iMac</brand>...
Exercise 1: Write an XML document describing the exercises in this document: the root element is...
Exercise 1: Write an XML document describing the exercises in this document: the root element is <exercises>. The root has an attribute number that has value 1. The root element has three child elements; <date> that contains as text the date of the exercise, and two <item> elements for the first two exercises (1--2). Write some text in the <item> elements. Exercise 2: Write an XML document describing a person: name, occupation, address and hobbies. Please do not use your...
Create a XSD Schema to validate and provide structure for the XML document below: <?xml version="1.0"...
Create a XSD Schema to validate and provide structure for the XML document below: <?xml version="1.0" encoding="UTF-8" ?> <forecast qTime="28/10/20 10:00 PM" qLocation="Singapore"> <weather yyyymmdd="20200430"> <year>2020</year>   <month>04</month> <date>30</date> <comment>Plenty of sunshine</comment> <code>sunny</code> <highest>32.6</highest> <lowest>28.4</lowest> </weather> <weather yyyymmdd="20200218"> <year>2020</year>   <month>02</month> <date>18</date> <comment>Plenty of sunshine</comment> <code>sunny</code> <highest>34.6</highest> <lowest>30.5</lowest> </weather> <weather yyyymmdd="20200710"> <year>2020</year>   <month>07</month> <date>10</date> <comment>Partly sunny</comment> <code>partlySunny</code> <highest>33.1</highest> <lowest>29.2</lowest> </weather> <weather yyyymmdd="20200616"> <year>2020</year>   <month>06</month> <date>16</date> <comment>Considerable clouds</comment> <code>cloudy</code> <highest>30.5</highest> <lowest>25.4</lowest> </weather> <weather yyyymmdd="20200612"> <year>2020</year>   <month>06</month> <date>12</date> <comment>Cloudy with a thunderstorm</comment> <code>thunderstorm</code> <highest>29.1</highest>...
Write a simple XML Schema file to define an XML document structure for simplified technical reports...
Write a simple XML Schema file to define an XML document structure for simplified technical reports (it must support tags for report title, chapter, two levels of sections, and item lists; more features for extra credits); write a sample XML document for technical report based on your Schema specification (the document should make reference to your external Schema file); validate your XML document against your Schema specification with my utility “SaxParse” to remove any bugs. Write a simple XSL stylesheet...
Please Write an XML document describing a person: name, occupation, address, and hobbies. Decide on suitable...
Please Write an XML document describing a person: name, occupation, address, and hobbies. Decide on suitable element names and nesting. Check your document for well-formedness. And draw a tree that represents the XML document you created. Thanks
Exercise 2: Write an XML document describing a person: name, occupation, address and hobbies. Please do...
Exercise 2: Write an XML document describing a person: name, occupation, address and hobbies. Please do not use your own information, you can use fake data. Decide on suitable element names and nesting. Check your document for well-formedness. Exercise 3: Draw a tree that represents the XML document you created in task 2.
Need C++ code for following with a document describing the code as well: Write a program...
Need C++ code for following with a document describing the code as well: Write a program to implement the game of Tic Tac Toe Four. The game is played on a 4 × 4 chessboard, within 2 players. The player who is playing "X" always goes first. Players alternate placing Xs and Os on the board until either one player has four in a row, horizontally, vertically, or diagonally; or all 16 squares are filled(which is a draw). The program...
In one well formed post to a discussion write a maximum of 350 words and express...
In one well formed post to a discussion write a maximum of 350 words and express the following. As an undergraduate student do you feel that the study of Macroeconomics theory is important and if so why?Explain one topic in macroeconomics (any topic)
Consider the relational schemas given below and the respective sets of functional dependencies valid in the...
Consider the relational schemas given below and the respective sets of functional dependencies valid in the schemas. For each one of the relational schemas identify its highest normal form. Remember that the identification of a normal form requires analysis of the valid functional dependencies and the minimal keys. Provide justification of each answer. A solution with no comprehensive justification scores no marks. (iv) When a staff is required to undertake an inspection of properties, the staff is allocated a company...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT