[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML View in IE 6

Subject: XML View in IE 6
From: "Neelima Adusumilli" <neelima.adusumilli@xxxxxxxxx>
Date: Tue, 18 Apr 2006 13:41:35 +0530
adusumilli
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.