Page 1 of 1

Viewing xsl:message from external stylesheet called by fn:transform

Posted: Wed Aug 25, 2021 10:22 pm
by mdean
Hi all,

I'm calling an XSLT stylesheet using fn:transform and am wondering if it's possible to view <xsl:message> output from the called stylesheet in the oXygen Messages window. oXygen is currently only displaying <xsl:message> output from the calling stylesheet that contains fn:transform, but I'd also like to see the messages from the stylesheet that's called.

I have the following, simplified template (main.xsl) that runs an external stylesheet (import.xsl).

main.xsl

Code: Select all

<xsl:template name="xsl:initial-template">
   <xsl:message>I'm a message from main.xsl</xsl:message>
		
   <xsl:sequence select="transform(map{
      'stylesheet-location':'imports/import.xsl',
      'enable-messages':boolean('true')
   })?output"/>

</xsl:template>
import.xsl

Code: Select all

<xsl:template name="xsl:initial-template">
   <xsl:message>I'm a message from import.xsl</xsl:message>
   <xsl:sequence>I'm the results from import.xsl</xsl:sequence>
</xsl:template>
If I run the main.xsl, I only see the message from that stylesheet ("I'm a message from main.xsl"). The results from the sequence in import.xsl appears in the output results, but the message doesn't appear in oXygen (as far as I can see).

I'm using XSLT 3.0, Saxon EE 9.9.1.7, oXygen 23.1.

Any ideas, or am I missing something?

Thanks!

Re: Viewing xsl:message from external stylesheet called by fn:transform

Posted: Thu Aug 26, 2021 1:44 pm
by tavy
Hello,

Thanks for your feedback.
Yes, it seems that the messages from the "import.xsl" file are not collected by Oxygen. I added an issue on our issue tracker to investigate this problem. We will update this thread when the issue will be solved.
It seems that also if I run with Saxon 9.9.1.7 from command line the messages are not displayed. Therefore, it is possible that Saxon does not collect this messages and we need to address this issue to them.

Best Regards,
Octavian

Re: Viewing xsl:message from external stylesheet called by fn:transform

Posted: Fri Aug 27, 2021 4:13 pm
by mdean
Ok, thanks for the update!