hi all, i've the following xml file: <?xml version="1.0" encoding="ISO-8859-1" ?> <?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?> <!-- Edited with XML Spy v4.2 --> <catalog> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> <catalog> here is the "cdcatalog.xsl" <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:value-of select="catalog/cd/title"/> </xsl:template> </xsl:stylesheet> i am expecting to get "Empire Burlesque" but got nothing at all. can anybody point out what's wrong with it? thanks. himal
Himal, I'm using xalan xslt processor and getting the following output - <?xml version="1.0" encoding="UTF-8"?> Empire Burlesque Also, you need to close the xml document properly with </catalog> (a little typo in ur pasted code) Do you want to just see "Empire Burlesque" and not even the <?xml....?> stuff??
thanks for you guys' prompt reply. looks like i don't have xslt processor installed and i didn't know that i should have it. i just tried opening that xml file in IE5 browser and got nothing. appreciate it if you guys suggest me the processor that i should install and the place that i can download it. pls also point out the steps to install it. thanks again for your help. himal
Himal, You can get Apache's Xalan-Java xslt processor here - http://xml.apache.org/xalan-j/ Read the instructions there as to how to install it and make sure that you got everything right after setting all the CLASSPATH variables properly by running the command (from a msdos prompt) java org.apache.xalan.xslt.Process All this stuff is given in there. The reason why it failed to open the xml file in IE for you is the missing / for the closing catalog tag as Dan pointed out; Also you should have the xsl file in the same directory as your xml so that IE can apply the stylesheet on ur xml document and show you the result in IE.
Gobiraj, I think he is mainly having problem with the closing "/" tag for his catalog element. I could see the resulting xml after the xsl transformation in IE6 with the old namespace http://www.w3.org/1999/XSL/Transform.