DesignLiquido / xslt-processor

A JavaScript XSLT processor without native library dependencies
GNU Lesser General Public License v3.0
94 stars 30 forks source link

Implement <xsl:include> #71

Closed inqb closed 2 months ago

rafaelcor commented 4 months ago

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

leonelsanchesdasilva commented 4 months ago

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

leonelsanchesdasilva commented 3 months ago

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 commented 3 months ago

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

This modification will have a major impact in this lib.