DesignLiquido / xslt-processor

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

'he' package used for xml-entities resolving #1

Closed pkozemirov closed 6 years ago

pkozemirov commented 6 years ago

According to the readme file, xslt-processor can be used for server-side xslt-transformations, which is awesome, but window.document brakes the case for NodeJS. I suggest using he for decoding html/xml entities, which is cross-platform.

johanneswilm commented 6 years ago

Looks good. Thanks!

johanneswilm commented 6 years ago

Hey @pkozemirov I am working on getting a new version ready with your patch. Just a question: Did using he solve some bugs for you? I am asking because I now realize that including ti will mean I will have to add a test building stage.

johanneswilm commented 6 years ago

@pkozemirov Ok, saw your comment now. Ok, I'll just add the build steps then.

johanneswilm commented 6 years ago

@pkozemirov Ok, I have adjusted the tests. There is still one place where it seems to use the document, but I believe this code is no longer used. There is a reference to Internet Explorer there, but this should hopefully no longer be an issue. Please let me know if it works for you now.

pkozemirov commented 6 years ago

@johanneswilm, great work there, it works just fine with some test cases. I guess I'll check my production case today with 0.10.0 and let you know.

pkozemirov commented 6 years ago

@johanneswilm, so it went just great with real data. Thank you!