Click here to Skip to main content
14,833,054 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: building an XML page Pin
Estys14-Apr-10 22:52
MemberEstys14-Apr-10 22:52 
GeneralRe: building an XML page Pin
Farraj15-Apr-10 0:46
MemberFarraj15-Apr-10 0:46 
AnswerRe: building an XML page Pin
Farraj16-Apr-10 4:26
MemberFarraj16-Apr-10 4:26 
GeneralRe: building an XML page Pin
Estys16-Apr-10 6:04
MemberEstys16-Apr-10 6:04 
GeneralRe: building an XML page Pin
Farraj24-Apr-10 9:46
MemberFarraj24-Apr-10 9:46 
QuestionImage in XML Pin
farokhian10-Apr-10 5:08
Memberfarokhian10-Apr-10 5:08 
AnswerRe: Image in XML Pin
daveyerwin10-Apr-10 10:29
Memberdaveyerwin10-Apr-10 10:29 
Questionhey I need some help with my coding...... I have an xml and a dtd but they dont validate... can someone help me please? Pin
anubir7-Apr-10 9:44
Memberanubir7-Apr-10 9:44 
XML FILE.....

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<?xml-stylesheet type="text/css" href="catalog.css"?>
<!DOCTYPE shop SYSTEM "cataloge.dtd">


<!-- . -->
<!-- Avnish Dusara -->
<!-- 12-02-2010 -->

<shop>
	<detail>
			<shopName>Pc World/Currys</shopName>
			<street>Lower High Street</street>
			<city>Watford</city>
			<postCode>WD25 7DU</postCode>
			<telNumber>01923 640 9684</telNumber>
			<email>pc.currys@dsg.com</email>
			<url>www.pc/currysonline.com</url>
	</detail>
	<catalog>
			<computers>
					<computer:packardbell xmlns:computer="http://www.google.ca/">
							<computer:itemID>654132</computer:itemID>
							<computer:itemName>PACKARD BELL</computer:itemName>
							<computer:desc>ALL IN ONE TOUCH SCREEN</computer:desc>
							<computer:OS>VISTA</computer:OS>
							<computer:cpu>AMD</computer:cpu>
							<computer:speed>2.6</computer:speed>
							<computer:memory>1GB</computer:memory>
							<computer:hdd>250GB</hdd>
							<computer:wirelessEnabled>NO</computer:wirelessEnabled>
							<computer:quantity>3</computer:quantity>
							<computer:price>435.62</computer:price>
					</computer:packardbell>
					<computer:sony xmlns:computer="http://www.google.ca/">
							<computer:itemID>654328</computer:itemID>
							<computer:itemName>SONY</computer:itemName>
							<computer:desc>UNLTRA SLIM DESKTOP</computer:desc>
							<computer:OS>WINDOWS 7</computer:OS>
							<computer:cpu>i5</computer:cpu>
							<computer:speed>2.1</computer:speed>
							<computer:memory>2GB</computer:memory>
							<computer:hdd>300GB</computer:hdd>
							<computer:wirelessEnabled>YES</computer:wirelessEnabled>
							<computer:quantity>8</computer:quantity>
							<computer:price>654.65</computer:price>
					</computer:sony>
					<computer:toshiba xmlns:computer="http://www.google.ca/">
							<computer:itemID>123456</computer:itemID>
							<computer:itemName>TOSHIBA</computer:itemName>
							<computer:desc>POWER AND PERFORMANCE</computer:desc>
							<computer:OS>XP</computer:OS>
							<computer:cpu>i3</computer:cpu>
							<computer:speed>1.3</computer:speed>
							<computer:memory>3GB</computer:memory>
							<computer:hdd>500GB</computer:hdd>
							<computer:wirelessEnabled>NO</computer:wirelessEnabled>
							<computer:quantity>12</computer:quantity>
							<computer:price>123.32</computer:price>
					</computer:toshiba>	
					<computer:HP xmlns:computer="http://www.google.ca/">>
							<computer:itemID>654987</computer:itemID>
							<computer:itemName>HP</computer:itemName>
							<computer:desc>HOME MOBILE USE</computer:desc>
							<computer:OS>WINDOWS 98</computer:OS>
							<computer:cpu>i7</computer:cpu>
							<computer:speed>1.1</computer:speed>
							<computermemory>4GB</computer:memory>
							<compute:rhdd>1TB</computer:hdd>
							<computer:wirelessEnabled>YES</computer:wirelessEnabled>
							<computer:quantity>20</computer:quantity>
							<computer:price>789.65</computer:price>
					</computer:HP>	
			</computers>
			<homeappliances>
				<washingMachine:Bosch xmlns:washingMachine="http://www.google.ca/">>
						<washingMachine:itemNumber>986336</washingMachine:itemNumber>
						<washingMachine:itemName>Bosch</washingMachine:itemName>
						<washingMachine:desc>Fast Cycle</washingMachine:desc>
						<washingMachine:color>Pink</washingMachine:color>
						<washingMachine:quantity>3</washingMachine:quantity>
						<washingMachine:price>236.10</washingMachine:price>
				</washingMachine>
				<washingMachine:Hot_Point xmlns:washingMachine="http://www.google.ca/">>
						<washingMachine:itemNumber>741741</washingMachine:itemNumber>
						<washingMachine:itemName>Hot Point</washingMachine:itemName>
						<washingMachine:desc>Auto Rinse</washingMachine:desc>
						<washingMachine:color>Rainbow</washingMachine:color>
						<washingMachine:quantity>6</washingMachine:quantity>
						<washingMachine:price>321.65</washingMachine:price>
				</washingMachine>
				<television:Panasonic xmlns:televison="http://www.google.ca/">>
						<television:itemNumber>852852</television:itemNumber>
						<television:itemName>Panasonic</television:itemName>
						<television:desc>Plasma</television:desc>
						<television:size>32'</television:size>
						<television:quantity>4</television:quantity>
						<television:price>469.45</television:price>
				</television:Panasonic>
				<television:lg xmlns:televison="http://www.google.ca/">>
						<television:itemNumber>963852</television:itemNumber>
						<television:itemName>LG</television:itemName>
						<television:desc>LED</television:desc>
						<television:size>42'</television:size>
						<television:quantity>9</television:quantity>
						<television:price>987.65</television:price>
				</television:lg>
				<vacuumeCleaner:Dyson xmlns:vacuumeCleaner="http://www.google.ca/">>
						<vacuumeCleaner:itemNumber>963741</vacuumeCleaner:itemNumber>
						<vacuumeCleaner:itemName>Dyson</vacuumeCleaner:itemName>
						<vacuumeCleaner:desc>Cyclone Function</vacuumeCleaner:desc>
						<vacuumeCleaner:bagRefrence>No</vacuumeCleaner:bagRefrence>
						<vacuumeCleaner:quantity>2</vacuumeCleaner:quantity>
						<vacuumeCleaner:price>65.48</vacuumeCleaner:price>
				</vacuumeCleaner:Dyson>
				<vacuumeCleaner:Henry xmlns:vacuumeCleaner="http://www.google.ca/">>
						<vacuumeCleaner:itemNumber>852741</vacuumeCleaner:itemNumber>
						<vacuumeCleaner:itemName>Henry</vacuumeCleaner:itemName>
						<vacuumeCleaner:desc>Old Fashion</vacuumeCleaner:desc>
						<vacuumeCleaner:bagRefrence>Yes</vacuumeCleaner:bagRefrence>
						<vacuumeCleaner:quantity>5</vacuumeCleaner:quantity>
						<vacuumeCleaner:price>67.32</vacuumeCleaner:price>
				</vacuumeCleaner>
				<microwave:Cannon xmlns:microwave= "http://www.google.ca/">>
						<microwave:itemNumber>741159</microwave:itemNumber>
						<microwave:itemName>Cannon</microwave:itemName>
						<microwave:desc>Electrical and Simple</microwave:desc>
						<microwave:quantity>8</microwave:quantity>
						<microwave:price>50.99</microwave:price>
				</microwave:Cannon>
				<microwave:Kenwood xmlns:microwave= "http://www.google.ca/">>>
						<microwave:itemNumber>986256</microwave:itemNumber>
						<microwave:itemName>Kenwood</microwave:itemName>
						<microwave:desc>Gas and Complex</microwave:desc>
						<microwave:quantity>4</microwave:quantity>
						<microwave:price>197.99</microwave:price>
				</microwave:Kenwood>
			</homeappliances>
	</catalog>
</shop>


DTD CODE.....

<!--
   New Perspectives on XML
   Tutorial 3
   Case Problem 1

   PBA team roster DTD
   Author: Avnish Dusara
   Date:   26 Feb 2010

   Filename:         teams.dtd
   Supporting Files: 
-->


<!ELEMENT shop (detail*, catalog*)>
<!ELEMENT detail (myLogo, shopName, street, city, postCode, telNumber, email, url)>
<!ELEMENT shopName (#PCDATA)>
<!ELEMENT street (#PCDATA)>
<!ELEMENT city (#PCDATA)>
<!ELEMENT postcode (#PCDATA)>
<!ELEMENT telnumber (#PCDATA)>
<!ELEMENT e-mail (#PCDATA)>
<!ELEMENT url (#PCDATA)>

<!ELEMENT catalog (computers, homeappliances)>

<!ELEMENT computers (computer+)>
<!ELEMENT computer (itemID, itemName, desc, os, cpu, speed, memory, hdd, wirelessEnabled, quantity, price)>
<!ATTLIST computer type CDATA #REQUIRED>
<!ELEMENT itemID (#PCDATA)>
<!ELEMENT itemName (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<!ELEMENT os (#PCDATA)>
<!ELEMENT cpu (#PCDATA)>
<!ELEMENT speed (#PCDATA)>
<!ELEMENT memory (#PCDATA)>
<!ELEMENT hdd (#PCDATA)>
<!ELEMENT wirelessEnabled (#PCDATA)>
<!ELEMENT quantity (#PCDATA)>
<!ELEMENT price (#PCDATA)>

<!ELEMENT homeappliances (washingMachine*, television*, vacuumeCleaner*, microwave*)>

<!ELEMENT washingMachine (itemNumber, itemName, desc, color, quantity, price)>
<!ELEMENT itemNumber (#PCDATA)>
<!ELEMENT itemName (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<!ELEMENT color (#PCDATA)>
<!ELEMENT quantity (#PCDATA)>
<!ELEMENT price (#PCDATA)>

<!ELEMENT television (itemNumber, itemName, desc, size, quantity, price)>
<!ELEMENT itemNumber (#PCDATA)>
<!ELEMENT itemName (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<!ELEMENT size (#PCDATA)>
<!ELEMENT quantity (#PCDATA)>
<!ELEMENT price (#PCDATA)>

<!ELEMENT vacuumCleaner (itemNumber, itemName, desc, bagReference, quantity, price)>
<!ELEMENT itemNumber (#PCDATA)>
<!ELEMENT itemName (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<!ELEMENT bagReference (#PCDATA)>
<!ELEMENT quantity (#PCDATA)>
<!ELEMENT price (#PCDATA)>

<!ELEMENT microwave (itemNumber, itemName, desc, color, quantity, price)>
<!ELEMENT itemNumber (#PCDATA)>
<!ELEMENT itemName (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<!ELEMENT quantity (#PCDATA)>
<!ELEMENT price (#PCDATA)>



Basically the top xml is a inventory for a company named tiger direct which im sure you have all heard of and the dtd is a link to that xml. Please ignore small things like google.ca as the url indicator for the namespacing. but they dont link because the dtd is done wrong. can someone please tell me where i went wrong?

Cheers !
AnswerRe: hey I need some help with my coding...... I have an xml and a dtd but they dont validate... can someone help me please? Pin
Stuart Dootson7-Apr-10 14:22
professionalStuart Dootson7-Apr-10 14:22 
GeneralRe: hey I need some help with my coding...... I have an xml and a dtd but they dont validate... can someone help me please? Pin
anubir8-Apr-10 3:07
Memberanubir8-Apr-10 3:07 
GeneralRe: hey I need some help with my coding...... I have an xml and a dtd but they dont validate... can someone help me please? Pin
anubir8-Apr-10 3:08
Memberanubir8-Apr-10 3:08 
GeneralRe: hey I need some help with my coding...... I have an xml and a dtd but they dont validate... can someone help me please? Pin
Stuart Dootson8-Apr-10 4:49
professionalStuart Dootson8-Apr-10 4:49 
QuestionXML File is not updated in IE browser Pin
vdtrip7-Apr-10 8:40
Membervdtrip7-Apr-10 8:40 
QuestionGenerating a new XML file starting with a XML file and applyng XSLT Pin
FJJCENTU5-Apr-10 7:32
MemberFJJCENTU5-Apr-10 7:32 
AnswerRe: Generating a new XML file starting with a XML file and applyng XSLT Pin
FJJCENTU5-Apr-10 8:56
MemberFJJCENTU5-Apr-10 8:56 
QuestionCompiling an XML database with an application Pin
brdavid24-Mar-10 21:19
Memberbrdavid24-Mar-10 21:19 
AnswerRe: Compiling an XML database with an application Pin
Stuart Dootson28-Mar-10 21:46
professionalStuart Dootson28-Mar-10 21:46 
QuestionHow can i read or get an XML from another host? Pin
spawneditions24-Mar-10 8:58
Memberspawneditions24-Mar-10 8:58 
AnswerRe: How can i read or get an XML from another host? Pin
daveyerwin25-Mar-10 6:33
Memberdaveyerwin25-Mar-10 6:33 
QuestionXSLT help Pin
Aljaz11124-Mar-10 4:39
MemberAljaz11124-Mar-10 4:39 
AnswerRe: XSLT help Pin
PIEBALDconsult24-Mar-10 5:04
professionalPIEBALDconsult24-Mar-10 5:04 
GeneralRe: XSLT help Pin
Aljaz11124-Mar-10 5:13
MemberAljaz11124-Mar-10 5:13 
QuestionSerializing a complex object to XML [modified] Pin
CDP180222-Mar-10 22:39
MemberCDP180222-Mar-10 22:39 
Questionbuild one xml element with few childs Pin
Aljaz11122-Mar-10 16:04
MemberAljaz11122-Mar-10 16:04 
QuestionXQUERY fn:replace() inserting spaces? Pin
tom_masciovecchio12-Mar-10 10:17
Membertom_masciovecchio12-Mar-10 10:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.