|
From: Julian J. <jul...@ad...> - 2024-06-26 10:01:00
|
Hi Florian,
I’m afraid that doesn’t work in my test, a least not as I would anticipate.
I used exactly your snippet for the expath:package, and tried loading
the XSLT using doc('CMIF-base.xsl') and doc('./CMIF-base.xsl'), neither
of which worked.
Thanks for the suggestion nevertheless!
Best,
Julian
Am 25.06.24 um 17:04 schrieb Florian Schmitt:
> Hi Julian,
>
> maybe expanding your library-package/expath-pkg.xml definition would
> work, too? I didn't test myself, but the EXPath Packaging System
> explicitly allows for referencing XSLT stylesheets:
>
> http://expath.org/spec/pkg#xslt
>
> So, maybe the following would work, too:
>
> ...
> <title>CMIFerator</title>
> <xquery>
> <namespace>http://www.digitale-akademie.de/cmiferator</namespace>
> <file>cmiferator.xqm</file>
> </xquery>
> <xslt>
>
> <import-uri>http://www.digitale-akademie.de/cmiferator/CMIF-base.xsl</import-uri>
>
> <file>CMIF-base.xsl</file>
> </xslt>
> ...
>
> Greetings,
> Florian
>
>
> Am 24.06.24 um 11:18 schrieb Julian Jarosch:
>> Hello everyone,
>>
>> I’m trying to use XSLT stylesheets in an XQuery module in a library
>> package, along the lines of (simplified example):
>>
>> declare variable $template := doc('./CMIF-base.xsl');
>>
>> The current actual code is here:
>>
>> https://github.com/digicademy/cmiferator/blob/78b2725bf9fcc163fc48df0a96c436fadeefcef6/library-package/content/cmiferator.xqm#L25
>>
>>
>> I had successfully tested this as an XQuery module written directly
>> in eXist/eXide. It stopped working when I installed it as a library
>> package, as far as I can tell.
>>
>> By “stopped working” I mean that the variable which is supposed to
>> contain the stylesheet document ($template in the example) remains
>> empty and the transform:transform() function fails because of a
>> missing stylesheet argument.
>>
>> Currently, it seems to me that the cause is with the library package?
>> Is it even possible to include XSLTs in a library package in a manner
>> that they can be loaded into XQuery?
>>
>> Thanks for any guidance – presumably for pointing out an egregious
>> oversight on my end :-)
>>
>> Kind regards,
>> Julian
>>
>>
>>
>> _______________________________________________
>> Exist-open mailing list
>> Exi...@li...
>> https://lists.sourceforge.net/lists/listinfo/exist-open
>
>
>
> _______________________________________________
> Exist-open mailing list
> Exi...@li...
> https://lists.sourceforge.net/lists/listinfo/exist-open
|