Search code examples
xmlxsltnmap

how to use a relative path in xml for xsl stylesheet?


this seems like a basic question but I'm struggling to get the XML working.

<?xml-stylesheet href="./nmap.xsl" type="text/xsl"?>

this path is working in Kali Linux/Firefox but not in windows 10/chrome. this is working in windows 10/IE*(IE for the win).*

I'm just double-clicking on the XML file.

I'm also attaching the files also. in chrome I'm getting an black screen.

here is the screen shot of the XML in Kali Linux

XML code

xsl code


Solution

  • Chrome does not allow XSLT to be served up locally via the file system. See

    Can Chrome be made to perform an XSL transform on a local file?

    You need to access it locally via http (using IIS, or IISExpress).