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>...
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)
Write your plan for the investigation as described below and save it as a Word document.
  Fire Suppression Investigation Plan Write your plan for the investigation as described below and save it as a Word document. Detailed one page summary of your plans, including sketches if necessary. (Note: If you cannot submit your sketches, describe them in words.) Itemized list of materials, with total costs. Stoichiometric calculations of the amount of reactants required to produce enough gas to extinguish the fires. Remember that some gas may be lost prior to its use as a fire...
Research the topic below. Write one full page document (12 pt font) on your findings ....
Research the topic below. Write one full page document (12 pt font) on your findings . Your findings should be one page and completed in Microsoft Word. List positive and negative impacts that businesses making goods and services available for purchase on the Web have on consumers, as well as the businesses themselves. Do businesses that have a physical store and an online presence offer the same goods and services? Are they offered for the same price? Do they have...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT