3

I'm compiling stylesheets (XSL) for use with the SaxonJS into their compiled form (SEP).

$ java -jar saxon9ee.jar -target:JS -xsl:child.xsl -export:child.sef.xml -nogo

I would like to use the compiled child stylesheet in another parent stylesheet via an include.

<xsl:include href="child.sef.xml"/>

But when I compile the parent stylesheet, I get errors.

$ java -jar saxon9ee.jar -target:JS -xsl:parent.xsl -export:parent.sef.xml -nogo
Static error at package on line 2 column 352 of child.sef.xml:
  XTSE0150: The supplied file does not appear to be a stylesheet
Errors were reported during stylesheet compilation

I do not want to have to deliver the child.xsl to the team composing the parent.xsl, only the compiled version, child.sep.xml.

dacracot
  • 22,002
  • 26
  • 104
  • 152
  • 1
    Have you considered to convert the child.xsl into a package that you use with `xsl:use-package` in the `parent.xsl`? – Martin Honnen Sep 15 '17 at 18:52
  • @MartinHonnen - That is the same advice that I got from Michael Kay on the Saxonica forum earlier today. I've never explored how to make packages before. Do you know of a good XSLT 3.0 tutorial resource so that I can learn? – dacracot Sep 15 '17 at 18:56
  • 1
    I am afraid there is not much about this available yet (well, I don't know whether the Pluralsight course https://www.pluralsight.com/courses/xslt-3-0-whats-new-part1 has been updated to cover the finalized spec of this year). The spec talks you through an example though with https://www.w3.org/TR/xslt-30/#packages-csv-library-example. – Martin Honnen Sep 15 '17 at 19:04

0 Answers0