Re: XSLT 3.0 packages in Saxon 9 and 10
Christophe Marchand <cmarchand-qd3G5cUq/[email protected]> Mon, 11 Jan 2021 21:35:30 +0100
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <[email protected]> |
In addition to this question, a PackageResolver mechanism would be a great enhancement. Sometime, you want to change a dependency version, without recompiling or modifying the XSL that uses a package from this dependency. Other way to say it, I'm not happy with specifying the version of a package where I use it ; I'd prefer manage version outside of code. For this purpose, a PackageResolver would be an interesting entry point. I'm not sure if this request is Saxon specific, or if such a mechanism could be added to XSLT 3+ recommandation ; something like "Implementors should provide a way to customize package resolution". Best regards, Christophe Le 11/01/2021 à 18:45, Jeremy Cronk a écrit : > > Hi, > > I’ve spent a lot of time experimenting and reading the API docs and > I’m confused, so I’ll just ask: What’s the “preferred” way in Saxon to > load a set of XSLT package files (say, from a jar file) for use in > transformations?  I see you can compile and add packages with > XsltCompiler, but it looks like it would make more sense to use a > PackageLibrary. However, I haven’t successfully been able to add > packages to one, so I’m sure I’m missing something really obvious. If > I call addPackage and pass in an .xsl file as a File, it doesn’t > complain, but if I call getPackages on the same PackageLibrary, it > returns an empty list. It looks like the same thing happens with .sef > files. > > Is there something like “XSLT 3.0 Packages for Absolute Morons” out > there somewhere that I could read and follow? I’m having trouble > understanding the intent of the different ways to load packages, not > to mention the issue of getting it to work. What I’d love to be able > to do is store the SEF files in a jar and load everything in the jar > as a package, and it looks like in order to do that, I need to compile > them with “relocatable” turned on, stick them in a jar, and > then…something with PackageLibrary? > > Also, is it correct to say that a package compiled on Saxon 9 won’t > work on Saxon 10? When I tried this, I got a NPE, but after compiling > the stylesheet with Saxon 10, it worked fine (on 10; I didn’t try it > again on 9). > > Jeremy > > > > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > [email protected] > https://lists.sourceforge.net/lists/listinfo/saxon-help _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help