XSLT Debugger Messages View
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 17
- Joined: Fri Aug 21, 2020 5:40 pm
XSLT Debugger Messages View
Post by Fiona Chen »
Hello, I need to debug my XSL program.
When I turn on the Oxygen debugging sessions, the Messages View doesn't display any message. Below is a example.
When I turn on the Oxygen debugging sessions, the Messages View doesn't display any message. Below is a example.
image.png
Did I miss anything?You do not have the required permissions to view the files attached to this post.
Last edited by Fiona Chen on Fri Jan 15, 2021 10:00 pm, edited 1 time in total.
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: XSLT Debugger Messages View
Hello,
From what I tested, with <oXygen/> XML Editor 23.0, build 2020111805, the debugging works fine for me.
What version of Oxygen XML do you use?
Can you send me also the XML document used in the debugging process, or a sample on which you reproduce the problem?
What engine do you use for debugging?
Best Regards,
Octavian
From what I tested, with <oXygen/> XML Editor 23.0, build 2020111805, the debugging works fine for me.
What version of Oxygen XML do you use?
Can you send me also the XML document used in the debugging process, or a sample on which you reproduce the problem?
What engine do you use for debugging?
Best Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 17
- Joined: Fri Aug 21, 2020 5:40 pm
Re: XSLT Debugger Messages View
Post by Fiona Chen »
Hello, Octavian:
<oXygen/> XML Editor 23.0, build 2020121712
A very simple XSL:
A very simple XML:
XSLT Debugger Perspective -> Messages -> Blank Screen
<oXygen/> XML Editor 23.0, build 2020121712
A very simple XSL:
Code: Select all
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:template match="/">
<xsl:message>Test Message</xsl:message>
</xsl:template>
</xsl:stylesheet>
Code: Select all
<source>
<chapter>Chapter A</chapter>
<chapter>Chapter B</chapter>
<chapter>Chapter C</chapter>
<chapter>Chapter D</chapter>
</source>
-
- Posts: 17
- Joined: Fri Aug 21, 2020 5:40 pm
Re: XSLT Debugger Messages View
Post by Fiona Chen »
My goal is to use XSLT3.0 | :
work in Oxygen. Either case throws blank screen.
Code: Select all
xsl:assert
Code: Select all
xsl:try & catch
- Strictly validate the transformation results: the transformation involves large amount of data movement and complex calculation
- Should any of the transformed element count or value doesn't match, the module throws the exception and terminates the program immediately. It is similar to the application of Java | C# exception throwing
Code: Select all
assert | try/catch
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: XSLT Debugger Messages View
Hello,
Unfortunately I cannot reproduce the problem. I tested with the same version that you used <oXygen/> XML Editor 23.0, build 2020121712. I used Saxon HE 9.9.1.7 for debugging with the default options, and I get the test message in the Messages view.
What engine do you use for debugging? Maybe you have some options set for the processor. Do you use a Saxon configuration file?
The "try/catch" works fine in Oxygen from what I tested. For the "xsl:assert" instruction you need to enable the assertions from the Saxon-PE/EE Options. For this you need to use Saxon-PE or EE, and check the Enable assertions ("-ea") from the Advanced Saxon XSLT Transformation Options. If you run the transformation from Debugger, you can change this option from XSLT / XQuery engine advanced options toolbar button:
https://www.oxygenxml.com/doc/versions/ ... olbar.html
If you are using a transformation scenario set the option from the advance options:
https://www.oxygenxml.com/doc/versions/ ... ed-options
You can find more details about Saxon options in our user manual:
https://www.oxygenxml.com/doc/versions/ ... ee_options
Unfortunately I cannot reproduce the problem. I tested with the same version that you used <oXygen/> XML Editor 23.0, build 2020121712. I used Saxon HE 9.9.1.7 for debugging with the default options, and I get the test message in the Messages view.
What engine do you use for debugging? Maybe you have some options set for the processor. Do you use a Saxon configuration file?
debug.png
The "try/catch" works fine in Oxygen from what I tested. For the "xsl:assert" instruction you need to enable the assertions from the Saxon-PE/EE Options. For this you need to use Saxon-PE or EE, and check the Enable assertions ("-ea") from the Advanced Saxon XSLT Transformation Options. If you run the transformation from Debugger, you can change this option from XSLT / XQuery engine advanced options toolbar button:
https://www.oxygenxml.com/doc/versions/ ... olbar.html
If you are using a transformation scenario set the option from the advance options:
https://www.oxygenxml.com/doc/versions/ ... ed-options
You can find more details about Saxon options in our user manual:
https://www.oxygenxml.com/doc/versions/ ... ee_options
You do not have the required permissions to view the files attached to this post.
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 17
- Joined: Fri Aug 21, 2020 5:40 pm
Re: XSLT Debugger Messages View
Post by Fiona Chen »
Hello, Octavian:
I deleted the Oxygen & plugin Options & Project state related files in the FS.
Miraculously, it produced the expected message in the simple template...Eh
The processor is ALWAYS the same:
Not sure if it is because :
I use ${currentFileURL} as XML URL in the transformation scenario. Notice the debugger perspective doesn't display input XML if you use ${currentFileURL}.
Can you test this:
create a template using source-document, use ${currentFileURL} as XML URL , and then execute it in Debugger perspective.
And please let me know if your Oxygen can emit the message or not?
Thank you!!
I deleted the Oxygen & plugin Options & Project state related files in the FS.
Miraculously, it produced the expected message in the simple template...Eh
image.png
(Notice: The UI is different from my previous image after the cleanup. )The processor is ALWAYS the same:
image.png
However, the system can't emit the message when the template is complex. Not sure if it is because :
I use ${currentFileURL} as XML URL in the transformation scenario. Notice the debugger perspective doesn't display input XML if you use ${currentFileURL}.
Can you test this:
create a template using source-document, use ${currentFileURL} as XML URL , and then execute it in Debugger perspective.
Code: Select all
<xsl:template match="/">
<xsl:message>TEST MESSAGE</xsl:message>
<xsl:source-document href="foo.xml">
<xsl:apply-templates select="foo-sth" mode="val"/>
</xsl:source-document>
</xsl:template>
Thank you!!
You do not have the required permissions to view the files attached to this post.
-
- Posts: 17
- Joined: Fri Aug 21, 2020 5:40 pm
Re: XSLT Debugger Messages View
Post by Fiona Chen »
My latest discovery is that the presence of the input XML coincides with the presence of the xsl:message:
If I open the input XML on the screen then edit/start a debug session, the system returns the xsl:message.
I will let you know if I encounter issue with xsl:assert and try/catch.
Thank you !!
If I open the input XML on the screen then edit/start a debug session, the system returns the xsl:message.
I will let you know if I encounter issue with xsl:assert and try/catch.
Thank you !!
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: XSLT Debugger Messages View
Hello,
From what I tested the message is presented also when the ${currentFileURL} is used as XML URL.
If you create a transformation scenario for an XSL and you use the ${currentFileURL} for both XML URL and XSL URL, the ${currentFileURL} editor variable will be expended to the location of the XSL. Therefore, the XSL will be used also as XML input. Because in your template example you match just the root and display a message, the template message should be presented correctly.
From what I tested the message is presented also when the ${currentFileURL} is used as XML URL.
If you create a transformation scenario for an XSL and you use the ${currentFileURL} for both XML URL and XSL URL, the ${currentFileURL} editor variable will be expended to the location of the XSL. Therefore, the XSL will be used also as XML input. Because in your template example you match just the root and display a message, the template message should be presented correctly.
image.png
You do not have the required permissions to view the files attached to this post.
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 17
- Joined: Fri Aug 21, 2020 5:40 pm
Re: XSLT Debugger Messages View
Post by Fiona Chen »
Interesting Point...
Scenario One:
Saxon EE -> Enable streaming mode -> Debug -> no message
Scenario Two:
Saxon EE -> Disable streaming mode -> Debug -> xsl:message
Saxon HE | PE works as well
Is this Oxygen's incompatibility with Streaming or did I misinterpret the functionality of Oxygen/Saxon?
Scenario One:
Saxon EE -> Enable streaming mode -> Debug -> no message
image.png
Scenario Two:
Saxon EE -> Disable streaming mode -> Debug -> xsl:message
Saxon HE | PE works as well
image.png
Please let me know if you see different results based on above two scenarios from your end!Is this Oxygen's incompatibility with Streaming or did I misinterpret the functionality of Oxygen/Saxon?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 388
- Joined: Thu Jul 01, 2004 12:29 pm
Re: XSLT Debugger Messages View
Hello,
Thanks for your feedback.
Yes, it seems that when Saxon is in streaming mode the xsl:message is not presented in the Messages view. The message is presented in the console view, if open you have opened Oxygen from a console you will see the message there.
I added an issue on our issue tracker to investigate this problem. I will update this thread when I have a conclusion.
Thanks for your feedback.
Yes, it seems that when Saxon is in streaming mode the xsl:message is not presented in the Messages view. The message is presented in the console view, if open you have opened Oxygen from a console you will see the message there.
I added an issue on our issue tracker to investigate this problem. I will update this thread when I have a conclusion.
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 17
- Joined: Fri Aug 21, 2020 5:40 pm
Re: XSLT Debugger Messages View
Post by Fiona Chen »
Excellent!
Below should be the aligned output in Oxygen/SaxonEE with Streaming mode.
On-success message:
Notice that the system is in Editor perspective not Debug. It gives the clarity as if the validation is actually acted out exactly as instructed.
I am reviewing different solutions of comprehensive validation and exception throwing.
Below should be the aligned output in Oxygen/SaxonEE with Streaming mode.
On-success message:
SaxEE-editor-onsuccessprint-message.jpg
On-failure message:SaxEE-editor-onfailure-message.jpg
On-termination exception:
SaxEE-editor-onterminate.jpg
This is the preliminary validation. Notice that the system is in Editor perspective not Debug. It gives the clarity as if the validation is actually acted out exactly as instructed.
I am reviewing different solutions of comprehensive validation and exception throwing.
You do not have the required permissions to view the files attached to this post.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service