Hey @egh!
I'm trying to use XJSLT in a project where we run XSLTs to transform dita content. We are in a NodeJS flow, so XJSLT is a great fit to circumvent any Java / JDK dependencies that we do not yet need!
My idea for a workflow:
- Use JEST as a testing framework
- Compile the XSLT to a function in the
before of the test
- Use multiple test cases to one-by-one transform some input XML DOM (slimdom nodes)
- In those test cases do asserts using XPaths (like asserting the correct column widths are computed, the order of everything is OK, etc) for some nice readable assertions
- Serialize the document to XML and finish with a snapshot test.
Would you be up for some rough API proposal + documentation (I'd be willing to implement it) that does this?
I think a JS API would be a clear benefit of XJSLT over SaxonJS, which afaik does not do any API. This would also open the door to an online 'fiddle'! And of course finish with an NPM package!
Hey @egh!
I'm trying to use XJSLT in a project where we run XSLTs to transform dita content. We are in a NodeJS flow, so XJSLT is a great fit to circumvent any Java / JDK dependencies that we do not yet need!
My idea for a workflow:
beforeof the testWould you be up for some rough API proposal + documentation (I'd be willing to implement it) that does this?
I think a JS API would be a clear benefit of XJSLT over SaxonJS, which afaik does not do any API. This would also open the door to an online 'fiddle'! And of course finish with an NPM package!