XML Challenge

webmasterbeta

New Member
Hi,I was wondering if anyone can help with a assignment I'm doing at the moment.I've produce a XML, XSL and a DTD but I'm not sure why the XML document isnot displaying all data (i.e. more than one dispatch note)I've added the copy of the three documents as below.Hope someone can help,Gazza.XML<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href=http://forums.devx.com/archive/index.php/"Highland.xsl"?><!DOCTYPE InvernessHighlandProduce SYSTEM "Highland.dtd"><InvernessHighlandProduce><DispatchNote><DispatchNo>757684</DispatchNo><Dispatcher>Mr Smythe</Dispatcher><Time><OutfromDepot>0600</OutfromDepot><BacktoDepot/><DriversInitialsonReturn/></Time><Date><Day>01</Day><Month>12</Month><Year>2000</Year></Date><Vehicle><RegNo>N295 XRG</RegNo></Vehicle><Driver><FirstName>Stuart</FirstName><Surname>McCauley</Surname><EmpNo>729/D</EmpNo></Driver><Destination><DestinationNo>1</DestinationNo><Mileage><FromDepot>55</FromDepot><FromLastDrop/></Mileage><Customer><NameCompany>Co-op Foodstore</NameCompany><Street>High Street</Street><Town>Lairg</Town><County/></Customer><Load><Description>Haggis</Description><Units>5</Units><Quantity>250</Quantity><Weight/><Comments/></Load></Destination><Destination><DestinationNo>2</DestinationNo><Mileage><FromDepot/><FromLastDrop>40</FromLastDrop></Mileage><Customer><NameCompany>Ullapool Ferry Terminal</NameCompany><Street/><Town>Ullapool</Town><County/></Customer><Load><Description>Smoked Salmon</Description><Units/><Quantity/><Weight>25 Kg</Weight><Comments>For onward shipping to handler in Stornaway</Comments></Load><Load><Description>Oat-Cakes</Description><Units>20</Units><Quantity>234</Quantity><Weight/><Comments>For onwards shipping to handler in Stornaway</Comments></Load><Load><Description>Home made produce (various pastries)</Description><Units>16</Units><Quantity>5</Quantity><Weight/><Comments>For onwards shipping to handler in Stornaway</Comments></Load></Destination><RouteProblems>Snow blocking road from Lairg to Ullapool, take alternativeroute via A6543</RouteProblems><Notes>None</Notes></DispatchNote><DispatchNote><DispatchNo>756685</DispatchNo><Dispatcher>Mr Smythe</Dispatcher><Time><OutfromDepot>0600</OutfromDepot><BacktoDepot/><DriversInitialsonReturn/></Time><Date><Day>02</Day><Month>12</Month><Year>2000</Year></Date><Vehicle><RegNo>P300 XRG</RegNo></Vehicle><Driver><FirstName>Euwan</FirstName><Surname>Forbes</Surname><EmpNo>800/D</EmpNo></Driver><Destination><DestinationNo>1</DestinationNo><Mileage><FromDepot>105</FromDepot><FromLastDrop/></Mileage><Customer><NameCompany>Mr A Jones and family</NameCompany><Street>1 Seaview Cottage</Street><Town>Dingwell</Town><County>Sutherland</County></Customer><Load><Description>Xmas Hamper</Description><Units/><Quantity>3</Quantity><Weight/><Comments>Variant X12, Z10 and T34</Comments></Load></Destination><Destination><DestinationNo>2</DestinationNo><Mileage><FromDepot/><FromLastDrop>65</FromLastDrop></Mileage><Customer><NameCompany>Ullapool Ferry Terminal</NameCompany><Street/><Town>Ullapool</Town><County/></Customer><Load><Description>Smoked Salmon</Description><Units/><Quantity/><Weight>50 Kg</Weight><Comments>For onward shipping to handler in Stornaway</Comments></Load><Load><Description>Oat-Cakes</Description><Units>20</Units><Quantity>234</Quantity><Weight/><Comments>For onwards shipping to handler in Stornaway</Comments></Load><Load><Description>Home made produce (various pastries)</Description><Units>16</Units><Quantity>5</Quantity><Weight/><Comments>For onwards shipping to handler in Stornaway</Comments></Load></Destination><Destination><DestinationNo>3</DestinationNo><Mileage><FromDepot/><FromLastDrop>45</FromLastDrop></Mileage><Customer><NameCompany>McGregor's Convenience Stores</NameCompany><Street>Dingwall High Street</Street><Town>Dingwall</Town><County/></Customer><Load><Description/><Units/><Quantity/><Weight/><Comments/></Load></Destination><RouteProblems>Watch ice around Dingwall</RouteProblems><Notes>Cash on delivery required for del-1 ï¿¡602.50!</Notes>DTD<!ELEMENT InvernessHighlandProduce (DispatchNote+)><!ELEMENT DispatchNote (DispatchNo, Dispatcher, Time, Date, Vehicle, Driver,Destination+, RouteProblems*, Notes*)><!ELEMENT DispatchNo (#PCDATA)><!ELEMENT Dispatcher (#PCDATA)><!ELEMENT Time (OutfromDepot, BacktoDepot?, DriversInitialsonReturn)><!ELEMENT OutfromDepot (#PCDATA)><!ELEMENT BacktoDepot (#PCDATA)><!ELEMENT DriversInitialsonReturn (#PCDATA)><!ELEMENT Date (Day, Month, Year)><!ELEMENT Day (#PCDATA)><!ELEMENT Month (#PCDATA)><!ELEMENT Year (#PCDATA)><!ELEMENT Vehicle (RegNo)><!ELEMENT RegNo (#PCDATA)><!ELEMENT Driver (FirstName, Surname, EmpNo)><!ELEMENT FirstName (#PCDATA)><!ELEMENT Surname (#PCDATA)><!ELEMENT EmpNo (#PCDATA)><!ELEMENT Destination (DestinationNo, Mileage, Customer, Load*)><!ELEMENT DestinationNo (#PCDATA)><!ELEMENT Mileage (FromDepot?, FromLastDrop?)><!ELEMENT FromDepot (#PCDATA)><!ELEMENT FromLastDrop (#PCDATA)><!ELEMENT Customer (NameCompany, Street, Town, County)><!ELEMENT NameCompany (#PCDATA)><!ELEMENT Street (#PCDATA)><!ELEMENT Town (#PCDATA)><!ELEMENT County (#PCDATA)><!ELEMENT Load (Description, Units, Quantity, Weight, Comments)><!ELEMENT Description (#PCDATA)><!ELEMENT Units (#PCDATA)><!ELEMENT Quantity (#PCDATA)><!ELEMENT Weight (#PCDATA)><!ELEMENT Comments (#PCDATA)><!ELEMENT RouteProblems (#PCDATA)><!ELEMENT Notes (#PCDATA)>XSL<?xml version="1.0"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"><xsl:template match="/"><html><xsl:apply-templates/></html></xsl:template><xsl:template match="InvernessHighlandProduce"><H3>Inverness Highland Produce Ltd</H3><H4>Dispatch Number:<xsl:value-of select="DispatchNote/DispatchNo"/><BR/></H4><SPAN STYLE="font-style:italic">Dispatcher: </SPAN><xsl:value-of select="DispatchNote/Dispatcher"/><BR/><SPAN STYLE="font-style:italic">Time: (out of depot)</SPAN><xsl:value-of select="DispatchNote/Time/OutfromDepot"/><SPAN STYLE="font-style:italic">(back to depot)</SPAN><xsl:value-of select="DispatchNote/Time/BacktoDepot"/><BR/><SPAN STYLE="font-style:italic">Drivers Initials: </SPAN><xsl:value-of select="DispatchNote/DriversInitialsonReturn"/><BR/><SPAN STYLE="font-style:italic">Date: </SPAN><xsl:value-of select="DispatchNote/Date/Day"/><xsl:value-of select="DispatchNote/Date/Month"/><xsl:value-of select="DispatchNote/Date/Year"/><BR/><SPAN STYLE="font-style:italic">Vehicle: </SPAN><xsl:value-of select="DispatchNote/Vehicle/RegNo"/><BR/><SPAN STYLE="font-style:italic">Driver: </SPAN><xsl:value-of select="DispatchNote/Driver/FirstName"/><xsl:value-of select="DispatchNote/Driver/Surname"/><BR/><SPAN STYLE="font-style:italic">Destination: </SPAN><xsl:value-of select="DispatchNote/Destination/DestinationNo"/> -<xsl:value-of select="DispatchNote/Destination/Customer/NameCompany"/>,<xsl:value-of select="DispatchNote/Destination/Customer/Street"/>,<xsl:value-of select="DispatchNote/Destination/Customer/Town"/>,<xsl:value-of select="DispatchNote/Destination/Customer/County"/><BR/><SPAN STYLE="font-style:italic">Mileage: (from Depot)</SPAN><xsl:value-of select="DispatchNote/Destination/Mileage/FromDepot"/>,<SPAN STYLE="font-style:italic">(from last drop)</SPAN><xsl:value-of select="DispatchNote/Destination/Mileage/FromLastDrop"/><BR/><SPAN STYLE="font-style:italic">Load:</SPAN><xsl:value-of select="DispatchNote/Destination/Load/Description"/>:<SPAN STYLE="font-style:italic">Unit(s):</SPAN><xsl:value-of select="DispatchNote/Destination/Load/Units"/>;<SPAN STYLE="font-style:italic">Quantity Ordered:</SPAN><xsl:value-of select="DispatchNote/Destination/Load/Quantity"/>;<SPAN STYLE="font-style:italic">Weight:</SPAN><xsl:value-of select="DispatchNote/Destination/Load/Weight"/><BR/><SPAN STYLE="font-style:italic">Comments:</SPAN><xsl:value-of select="DispatchNote/Destination/Load/Comments"/><BR/><xsl:apply-templates/></xsl:template></xsl:stylesheet></DispatchNote></InvernessHighlandProduce>
 
Back
Top