Appendix D. Instance documents used in the examples

Example D.1. XML content of the file [CellarBook.xml] describing the cellar book whose structure has been given in Example 2.2

  1 <cellar-book noNamespaceSchemaLocation="CellarBook.xsd">
        <wine-catalog>
            <wine name="Domaine de l'Île Margaux"
                 appellation="Bordeaux supérieur"
  5              classification="a.c."
                 code="C00043125"
                 format="750ml">
                <properties>
                    <color>red</color>
 10                 <alcoholic-strength>12.5</alcoholic-strength>
                    <nature>still</nature>
                </properties>
                <origin>
                    <country>France</country>
 15                 <region>Bordeaux</region>
                    <producer> SCEA Domaine de L'Île Margaux (B.P. 5) </producer>
                </origin>
                <comment>Ready for drinking now</comment>
                <food-pairing> Accompanies <emph>Bordelaise ribsteak</emph>, 
 20                 <bold>pork with prunes</bold> or magret de canard. </food-pairing>
                <price>22.80</price>
                <year>2002</year>
            </wine>
            <wine name="Riesling Hugel"
 25              appellation="Alsace"
                 classification="a.c."
                 code="C00042101"
                 format="750ml">
                <properties>
 30                 <color>white</color>
                    <alcoholic-strength>12</alcoholic-strength>
                    <nature>still</nature>
                </properties>
                <origin>
 35                 <country>France</country>
                    <region>Alsace and East</region>
                    <producer>Hugel & Fils</producer>
                </origin>
                <price>17.95</price>
 40             <year>2002</year>
            </wine>
            <wine name="Château Montguéret"
                 appellation="Anjou"
                 classification="a.c."
 45              code="C00871996"
                 format="750ml">
                <properties>
                    <color>rosé</color>
                    <alcoholic-strength>11</alcoholic-strength>
 50                 <nature>still</nature>
                </properties>
                <origin>
                    <country>France</country>
                    <region>Loire Valley</region>
 55                 <producer>SCEA Château de Montguéret</producer>
                </origin>
                <comment> Made with Grolleau (100%). Ready to drink now. Serve at 8º-10ºC. </comment>
                <tasting-note> Tender pink in color, this wine shows 
                    <emph>light raspberry</emph> highlights. </tasting-note>
 60             <price>14.65</price>
                <year>2003</year>
            </wine>
            <wine name="Mumm Cordon Rouge"
                 appellation="Champagne"
 65              classification="a.c."
                 code="C00312363"
                 format="375ml">
                <properties>
                    <color>white</color>
 70                 <alcoholic-strength>12</alcoholic-strength>
                    <nature>Champagne</nature>
                </properties>
                <origin>
                    <country>France</country>
 75                 <region>Champagne</region>
                    <producer>G.H. Martel & Co</producer>
                </origin>
                <comment> Ready for drinking now. Serve it fresh but not too cold. </comment>
                <tasting-note> This champagne has a light fruity aroma. It is 
 80                 delicate and has exquisite bubbles. </tasting-note>
                <price>33.00</price>
                <year>2000</year>
            </wine>
            <wine name="Prado Rey Roble"
 85              appellation="Ribera-del-duero"
                 classification="d.o."
                 code="C00929026"
                 format="magnum">
                <properties>
 90                 <color>red</color>
                    <alcoholic-strength>12.5</alcoholic-strength>
                    <nature>still</nature>
                </properties>
                <origin>
 95                 <country>Spain</country>
                    <region>Old Castille</region>
                    <producer>Real Sitio de Ventosilla SA</producer>
                </origin>
                <price>35.25</price>
100             <year>2002</year>
            </wine>
        </wine-catalog>
        <owner>
            <name>
105             <first>Jude</first>
                <family>Raisin</family>
            </name>
            <street>1234 rue des Châteaux</street>
            <city>St-George</city>
110         <province>ON</province>
            <postal-code>M7W 7S0</postal-code>
        </owner>
        <location>
            <street>4587 des Futailles</street>
115         <city>Vallée des crus</city>
            <province>QC</province>
            <postal-code>H3C 4J8</postal-code>
        </location>
        <cellar>
120         <wine code="C00043125">
                <purchaseDate>2005-06-20</purchaseDate>
                <quantity>2</quantity>
                <comment><cat:bold>Guy Lapalme, Montréal</cat:bold>: should reorder soon</comment>
            </wine>
125         <wine code="C00312363">
                <purchaseDate>2004-11-19</purchaseDate>
                <quantity>5</quantity>
                <rating stars="3"/>
                <comment>Bottle too small...</comment>
130         </wine>
            <wine code="C00871996">
                <purchaseDate>2005-06-19</purchaseDate>
                <quantity>0</quantity>
                <comment>Really great</comment>
135         </wine>
            <wine code="C00929026">
                <purchaseDate>2003-10-15</purchaseDate>
                <quantity>1</quantity>
                <comment>for <cat:bold>big</cat:bold> parties</comment>
140         </wine>
        </cellar>
    </cellar-book>
            

This listing shows what is seen by the XML processor, after the inclusion of the wine catalog (see Example D.2) and once the XML entities have been replaced in Example 2.2. The formatting and line numbers differ from the ones in the source file.


Example D.2. XML content of the file [WineCatalog.xml] describing the wine catalog whose structure has been given in Example 2.3

  1 <wine-catalog schemaLocation="http://www.iro.umontreal.ca/lapalme/wine-catalog WineCatalog.xsd">
        <wine name="Domaine de l'Île Margaux"
                 appellation="Bordeaux supérieur"
                 classification="a.c."
  5              code="C00043125"
                 format="750ml">
            <properties>
                <color>red</color>
                <alcoholic-strength>12.5</alcoholic-strength>
 10             <nature>still</nature>
            </properties>
            <origin>
                <country>France</country>
                <region>Bordeaux</region>
 15             <producer>
                    SCEA Domaine de L'Île Margaux (B.P. 5)
                </producer>
            </origin>
            <comment>Ready for drinking now</comment>
 20         <food-pairing>
                Accompanies <emph>Bordelaise ribsteak</emph>, 
                <bold>pork with prunes</bold> or magret de canard.
            </food-pairing>
            <price>22.80</price>
 25         <year>2002</year>
        </wine>
        <wine name="Riesling Hugel"
                 appellation="Alsace"
                 classification="a.c."
 30              code="C00042101"
                 format="750ml">
            <properties>
                <color>white</color>
                <alcoholic-strength>12</alcoholic-strength>
 35             <nature>still</nature>
            </properties>
            <origin>
                <country>France</country>
                <region>Alsace and East</region>
 40             <producer>Hugel & Fils</producer>
            </origin>
            <price>17.95</price>
            <year>2002</year>
        </wine>
 45     <wine name="Château Montguéret"
                 appellation="Anjou"
                 classification="a.c."
                 code="C00871996"
                 format="750ml">
 50         <properties>
                <color>rosé</color>
                <alcoholic-strength>11</alcoholic-strength>
                <nature>still</nature>
            </properties>
 55         <origin>
                <country>France</country>
                <region>Loire Valley</region>
                <producer>SCEA Château de Montguéret</producer>
            </origin>
 60         <comment>
                Made with Grolleau (100%). Ready to drink now. 
                Serve at 8º-10ºC.
            </comment>
            <tasting-note>
 65             Tender pink in color, this wine shows 
                <emph>light raspberry</emph> highlights.
            </tasting-note>
            <price>14.65</price>
            <year>2003</year>
 70     </wine>
        <wine name="Mumm Cordon Rouge"
                 appellation="Champagne"
                 classification="a.c."
                 code="C00312363"
 75              format="375ml">
            <properties>
                <color>white</color>
                <alcoholic-strength>12</alcoholic-strength>
                <nature>Champagne</nature>
 80         </properties>
            <origin>
                <country>France</country>
                <region>Champagne</region>
                <producer>G.H. Martel & Co</producer>
 85         </origin>
            <comment>
                Ready for drinking now. Serve it fresh but not too cold.
            </comment>
            <tasting-note>
 90             This champagne has a light fruity aroma. It is delicate 
                and has exquisite bubbles.
            </tasting-note>
            <price>33.00</price>
            <year>2000</year>
 95     </wine>
        <wine name="Prado Rey Roble"
                 appellation="Ribera-del-duero"
                 classification="d.o."
                 code="C00929026"
100              format="magnum">
            <properties>
                <color>red</color>
                <alcoholic-strength>12.5</alcoholic-strength>
                <nature>still</nature>
105         </properties>
            <origin>
                <country>Spain</country>
                <region>Old Castille</region>
                <producer>Real Sitio de Ventosilla SA</producer>
110         </origin>
            <price>35.25</price>
            <year>2002</year>
        </wine>
    </wine-catalog>
115         

This listing shows what is seen by the XML processor. The formatting and line numbers differ from the ones in the source file.