[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XML View in IE 6
Hi All, I am new to this forum and I am not sure if the following question has already been raised earlier. I have an xml file as follows: <?xml version="1.0" encoding="UTF-8" ?> <?xml:stylesheet href="styles.xsl" type="text/xsl" ?> <collection> <book> <index>1</index> <author year= "1990" > John Doe </author> <title> JavaScript </title> <price> 10.99 </price> </book> <book> <index>2</index> <author year= "2000" > Mary Jones </author> <title> Photoshop Secrets </title> <price> 15.99 </price> </book> <book> <index>3</index> <author year= "2005" > Garry Po </author> <title> PHP Programming </title> <price> 20.99 </price> </book> <book> <index>4</index> <author year= "2005" > Garry Po </author> <title> PHP Programming </title> <price> 20.99 </price> </book> </collection> And the corresponding xsl file is as follows: <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <!-- / forward slash is used to denote a patern that matches the root node of the XML document --> <xsl:template match ="/" > <html> <head> <title> Book Collection </title> </head> <body> <xsl:apply-templates /> </body> </html> </xsl:template> <xsl:template match="collection" > <table width="400" border="1" > <tr bgcolor = "#cccccc" > <td>Index</td> <td>Author</td> <td>Year</td> <td>Name</td> <td>Price</td> </tr> <xsl:for-each select="book" > <xsl:variable name="index_anchor"> <xsl:value-of select="index" /> </xsl:variable> <tr> <td id="{$index_anchor}"> <xsl:value-of select="index" /> </td> <td> <xsl:value-of select="author" /> </td> <!-- here we use /@ to access the value of an attribute --> <td> <xsl:value-of select="author/@year" /> </td> <td> <xsl:value-of select="title" /> </td> <td> <xsl:value-of select="price" /> </td> </tr> </xsl:for-each> </table> </xsl:template > </xsl:stylesheet > The strange problem that I am facing is: When I have these two files on the desktop, the tags work perfectly fine. For instance c:\documents and settings\neelima\desktop\books.xml#2 But when I have the same files in another directory/folder on the desktop, there seems to be a problem. Can some one please tell me what could be the problem? Thanks, Neelima
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|