Skip to content

Use XJSLT as a package in a greater app #2

@DrRataplan

Description

@DrRataplan

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:

  1. Use JEST as a testing framework
  2. Compile the XSLT to a function in the before of the test
  3. Use multiple test cases to one-by-one transform some input XML DOM (slimdom nodes)
  4. 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
  5. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions