You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Paul Kinnucan <pa...@mathworks.com> on 2020/09/11 02:51:15 UTC
URL issues with Xalan
Hi,
Xalan turns all local file references in input XML files and XSL files into file:/// URLs that an entity handler must decode and that prevent associating a stylesheet with an XML file. For example, trying to transform
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="category.xsl"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
</catalog>
produces the following Xerces exception:
"unable to open primary document entity 'file:///W:/category.xsl'"
Is there a way to prevent Xalan from turning local file paths into URLs?
Paul
RE: URL issues with Xalan
Posted by Paul Kinnucan <pa...@mathworks.com>.
This is not an issue with Xalan but an issue with the XML file I was transforming. The PI instruction specified a non-existent xsl file.
From: Paul Kinnucan
Sent: Thursday, September 10, 2020 10:51 PM
To: c-users@xalan.apache.org
Subject: URL issues with Xalan
Hi,
Xalan turns all local file references in input XML files and XSL files into file:/// URLs that an entity handler must decode and that prevent associating a stylesheet with an XML file. For example, trying to transform
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="category.xsl"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
</catalog>
produces the following Xerces exception:
"unable to open primary document entity 'file:///W:/category.xsl'"
Is there a way to prevent Xalan from turning local file paths into URLs?
Paul