Page 1 of 1

Send messages to results pane from XQuery Refactor?

Posted: Sat Feb 04, 2023 6:18 pm
by ekimbernow
I am implementing XQuery refactors and need to be able to send messages to the results pane as I can using xsl:message with XSLT refactors.
I tried using trace() but that appeared to have no effect.
I have two requirements:
1. Use messages for debugging refactors during development
2. Use messages to report status for longer-running, more-involved refactors.
Is there a way to emit messages with XQuery refactors?

Re: Send messages to results pane from XQuery Refactor?

Posted: Tue Feb 07, 2023 10:59 am
by Radu
Hi Eliot,

I added an internal issue to catch all such trace messages and display them in a "Messages" view similarly to how we display xsl:messages, pasting the issue ID below for future reference:

EXM-52388 Add trace function listener for XQuery XML refactoring processor

But the displayed trace messages will not have location, clicking them will not take you to the place in the XQuery where the message was issued.
One more thing, if you start Oxygen using the "oxygenMac.sh" script I think you should find the trace messages are being output in the Terminal window.

Regards,
Radu

Re: Send messages to results pane from XQuery Refactor?

Posted: Tue Feb 07, 2023 2:05 pm
by ekimbernow
I verified that error(fn:QName('ERRORNUM'), "This is my error message") ends the refactor processing and puts a message in the result pane.

Re: Send messages to results pane from XQuery Refactor?

Posted: Tue Feb 07, 2023 2:25 pm
by Radu
Hi,

Thanks for updating the post with your solution.

Regards,
Radu

Re: Send messages to results pane from XQuery Refactor?

Posted: Fri Mar 17, 2023 9:27 am
by Radu
Hi,
As an update, Oxygen 25.1 should present such trace function messages in the results view.
Regards,
Radu