Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7960693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:49:38+00:00 2026-06-04T04:49:38+00:00

Possible Duplicate: How can I make XSLT work in chrome? I have this XML

  • 0

Possible Duplicate:
How can I make XSLT work in chrome?

I have this XML file:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>

<catalog>
    <album>
        <title>Exodus</title>
        <artist>Bob Marley</artist>
        <country>Jamaica</country>
        <price>19,99</price>
    </album>
    <album>
        <title>Black Album</title>
        <artist>Metallica</artist>
        <country>USA</country>
        <price>20,00</price>
    </album>
    <album>
        <title>Nevermind</title>
        <artist>Nirvana</artist>
        <country>USA</country>
        <price>22,00</price>
    </album>
</catalog>

which links to this XSL file:

<?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="/">
        <html>
            <body>
                <h2>My Catalog</h2>
                <table border="1">
                    <tr bgcolor="#9ACD32">
                        <th>Title</th>
                        <th>Artist</th>
                    </tr>
                    <xsl:for-each select="catalog/album">
                        <tr>
                            <td><xsl:value-of select="title"/></td>
                            <td><xsl:value-of select="artist"/></td>
                        </tr>
                    </xsl:for-each>
                </table>
           </body>
       </html>
    </xsl:template>
</xsl:stylesheet>

When I open the XML file in a browser, I don’t see anything being displayed. Since I copied from a tutorial as instructed, I’m not sure what went wrong here. Do you have any clue in terms of what may be causing the lack of display?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:49:39+00:00Added an answer on June 4, 2026 at 4:49 am

    Depending on XSLT constraints of the browser you use you may see nothing.

    I tested your files locally using Chrome 19.0.1084.46 and Firefox 3.6.22.

    In Firefox I could view it with no problems, but in Chrome I saw nothing.

    When I opened the console tab at developer tools in Chrome it show this message:

    Unsafe attempt to load URL
    file:///temp/web/catalog.xsl from frame with URL
    file:///temp/web/catalog.xml. Domains, protocols and
    ports must match.

    Then, I started my Tomcat and deployed the 2 files and when I accessed the xml from Chrome voilà, it shows everything as expected.

    I’m guessing that you are accessing it using file:/// and this is related to this issue Bug 397894

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How can I make an EXE file from a Python program? i
Possible Duplicate: How can I make setInterval also work when a tab is inactive
Possible Duplicate: How can I make this query to accept dynamic table names? I
Possible Duplicate: how can i make my product as a trial version for 30
Possible Duplicate: how can i make my product as a trial version for 30
Possible Duplicate: Can JavaScript connect with MySQL? I have a database with names and
Possible Duplicate: Can you animate a height change on a UITableViewCell when selected? This
Possible Duplicate: Can Read-Only Properties be Implemented in Pure JavaScript? I have an Object
Possible Duplicate: Why can templates only be implemented in the header file? Why should
Possible Duplicate: How can I convert my java program to an .exe file ?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.