0

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

vaibhavcool20
  • 861
  • 3
  • 11
  • 28
  • I added the relevant line of the code.external links are just for reference. – vaibhavcool20 Apr 06 '18 at 07:33
  • Can you explain exactly what is not working? Are you getting an error of some description, for example? Also, how are you applying the XSLT to the XML? Are you simply opening the XML in a browser? If so, which browser? Thank you. – Tim C Apr 06 '18 at 07:55
  • @TimC added the details. – vaibhavcool20 Apr 06 '18 at 08:02
  • Chrome does not allow XSLT to be served up locally via the file system. See https://stackoverflow.com/questions/3828898/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). – Tim C Apr 06 '18 at 08:15
  • thanks, i was very confused for 2 days, i thought path is not correct. – vaibhavcool20 Apr 06 '18 at 09:14
  • 1
    A general solution is to process the input files with `xsltproc` and generate the HTML output once. Then you can distribute or view that directly. – bonsaiviking Apr 06 '18 at 18:18

2 Answers2

1

Sep 2021. You need manually turn the config on to use it for firefox. https://support.mozilla.org/bm/questions/1264318#answer-1236496

Alvin Smith
  • 547
  • 5
  • 9
  • Please don't add the same answer to multiple questions. Answer the best one and flag the rest as duplicates. See [Is it acceptable to add a duplicate answer to several questions?](//meta.stackexchange.com/q/104227) – Yunnosch Sep 12 '21 at 09:53
0

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).

vaibhavcool20
  • 861
  • 3
  • 11
  • 28