Send messages to results pane from XQuery Refactor?

Oxygen general issues.
ekimbernow
Posts: 2
Joined: Sat Feb 04, 2023 6:06 pm

Send messages to results pane from XQuery Refactor?

Post 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?
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Send messages to results pane from XQuery Refactor?

Post 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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
ekimbernow
Posts: 2
Joined: Sat Feb 04, 2023 6:06 pm

Re: Send messages to results pane from XQuery Refactor?

Post 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.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Send messages to results pane from XQuery Refactor?

Post by Radu »

Hi,

Thanks for updating the post with your solution.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: Send messages to results pane from XQuery Refactor?

Post by Radu »

Hi,
As an update, Oxygen 25.1 should present such trace function messages in the results view.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply