Re: XSLT 3.0 packages in Saxon 9 and 10

Martin Honnen <[email protected]> Tue, 12 Jan 2021 10:03:11 +0100
Newsgroups gmane.text.xml.saxon.help
Message-ID <[email protected]>
On 11.01.2021 18:45, Jeremy Cronk wrote:
>
> 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?
>

I think one way is to use a configuration file which uses the
XsltPackages element section to declare the packages you want to use:
https://www.saxonica.com/html/documentation/configuration/configuration-file/config-xsltPackages.html

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help