node-libxslt icon indicating copy to clipboard operation
node-libxslt copied to clipboard

Cannot open file from URL

Open GiorgioAresu opened this issue 8 years ago • 2 comments

Hi, I'm using a stylesheet which loads an external file like this:

<xsl:variable name="secondaryFileXml" select="document($languageXPath)"/>

where languageXPath contains a relative path and all works, everyone is happy.

The issue is I'm developing an API which transforms the XSL server-side, and I'd like that path to be an URL instead of a filesystem path (or at least a path relative to the stylesheet itself), but if I change $languageXPath with something else, let's say http://localhost:3000/public/[...]/it.xml I get:

I/O warning : failed to load external entity "http://localhost:3000/public/[...]/it.xml"

It goes without saying that opening that url in a browser works just fine, as well as letting a browser perform the transformation.

I took a look at the underlying libxmljs and it seems that the HTTP part is optional, so enabling it would probably work.

Is there anything we could do?

Thanks

GiorgioAresu avatar Aug 18 '16 07:08 GiorgioAresu

Can anyone help please?

GiorgioAresu avatar Nov 15 '16 14:11 GiorgioAresu

I have very little time to dedicate to this project. If you wish to work on the problem and submit a pull request I would gladly review it.

albanm avatar Nov 15 '16 14:11 albanm