Jump to content

hommer

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by hommer

  1. Thank you for the reply. Now it is working!
  2. It’s great tutorial for a beginner like me.I followed through the screens, now I want to test it on my own. I created (or copied to be exact) both the xsl and xml files on notepad. But I got error when I browsed to the xml either by http://localhost/cdcatalog.xml or double clicked on: C:\Inetpub\wwwroot\cdcatalog.xml.The error message points to my second line of the xml file, which is an exact copy from the tutorial.What did I do wrong? Below are my xsl and xml. Thanks!cdcatalog.xsl <xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><html><body><h2>My CD Collection</h2><table><tr><th>first header</th><th>second header</th></tr><xsl:for-each select="catalog/cd"> <tr><td><xsl:value-of Select="catalog/cd/Title"/></td> <td><xsl:value-of Select="catalog/cd/Artist"/></td> </tr></xsl:for-each></table></body></html></xsl:template></xsl:stylesheet>cdcatalog.xml<?xml version="1.0" encoding="ISO-8859-1" ?> <?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?>- <catalog>- <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd>- <cd> <title>Hide your heart</title> <artist>Bonnie Tyler</artist> <country>UK</country> <company>CBS Records</company> <price>9.90</price> <year>1988</year> </cd>- <cd> <title>Greatest Hits</title> <artist>Dolly Parton</artist> <country>USA</country> <company>RCA</company> <price>9.90</price> <year>1982</year> </cd></catalog>
×
×
  • Create New...