i start to w3shools xsl tutorial and created one xml and xsl file and linked them together, after running the xml file i got the following error:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Access is denied. Error processing resource 'file:///C:/Documents and Settings/serkans/Desktop/deneme/cdcatalog.xslt'.

what should i do?
Thanks

Dani AI

Generated

This is usually a client-side security issue rather than a bad XSL. As discovered, browsers (especially Internet Explorer/MSXML) will block loading an external XSL stylesheet when you open the XML directly from disk with a file:// URL. The browser refuses to fetch the stylesheet for security reasons, so the transform never runs.

Practical fixes:

  • Serve both files over HTTP from a local web server (recommended). For a quick test you can run a tiny server from the folder that holds your XML/XSL. For Python 3:
    python -m http.server 8000

    then open . Using IIS, IIS Express or the Visual Studio dev server works the same way and avoids the file:// restriction.

  • Test in a different browser (Firefox tends not to impose the same local-file XSL restriction).
  • If you must stay local, make the stylesheet reference a relative path (not an absolute file:// URI) and keep XML and XSL in the same directory.

Troubleshooting tips and cautions:

  • Use the browser developer tools (network/console) to see whether the XSL is being requested or blocked.
  • Check file permissions if the server can’t read the files.
  • If the XSL uses document() or embedded script, those calls can trigger extra security checks.
  • Avoid lowering Internet Explorer security settings on production machines; serving files over HTTP or doing the transform server-side (XslCompiledTransform, xsltproc, etc.) are safer long-term solutions.

i found a solution :
i created those files in a project using asp.net and in order to display xml file in asp.net development server page, i used

<asp:xml runat="server" id="ID" />

; asp.net's xml tool from the toolbox and set its source to my .xml file.
It worked without any errors.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.