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

Here should go questions about transforming XML with XSLT and FOP.
mdean
Posts: 2
Joined: Wed Aug 25, 2021 10:06 pm

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

Post 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!
tavy
Posts: 388
Joined: Thu Jul 01, 2004 12:29 pm

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

Post 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
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
mdean
Posts: 2
Joined: Wed Aug 25, 2021 10:06 pm

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

Post by mdean »

Ok, thanks for the update!
Post Reply