xslt-processor icon indicating copy to clipboard operation
xslt-processor copied to clipboard

Implement <xsl:include>

Open inqb opened this issue 2 years ago • 4 comments

inqb avatar Sep 04 '23 15:09 inqb

Hi, I wanted to ask if this was implemented or is still WIP? Thanks

rafaelcor avatar Feb 15 '24 23:02 rafaelcor

Hi @rafaelcor. Yes, I'll let you know when it is ready.

leonelsanchesdasilva avatar Feb 16 '24 11:02 leonelsanchesdasilva

Some thoughts here:

<xsl:include> uses href as a single parameter. It means that it's a net access (HTTP, in general). To make it work for JS in browser, we need to use the fetch API.

Node, in turn, has a package called node-fetch. For this to work, first we need to detect whether there's a window.fetch object defined in the environment. If not, we try to require() node-fetch.

leonelsanchesdasilva avatar Apr 07 '24 17:04 leonelsanchesdasilva

I started an implementation here: https://github.com/DesignLiquido/xslt-processor/tree/xsl-include.

This modification will have a major impact in this lib.

leonelsanchesdasilva avatar Apr 07 '24 19:04 leonelsanchesdasilva