debugger missing empty templates
Are you missing a feature? Request its implementation here.
-
- Posts: 2
- Joined: Wed Sep 23, 2009 3:19 pm
debugger missing empty templates
Post by xmlhelpline »
Greetings,
our team is working on lots of XSLT templates and using the debugger frequently. We frequently pick up code created by other users.
problem:
In working with the debugger if you encounter a template that does nothing, the debugger will not be able to "step through" it. It simply skips over it (even though it is actually processed).
background:
We have elements that may initially have no target mapping. So an element template for it is initially empty. Later, a mapping is found and we need to change it so that the template provides target output.
Take a template like this:
<xsl:template match="someElement"/>
It provides no target output. It absolutely is fired in the processing.
You can do a full stack trace to find that this template actually fired. However, if you step through the templates in the Oxygen debugger you will never see that this template was actually fired. It simply skips over it and moves on to the next template. Even if you set break points and "step" one step at a time.
So we are having to do a maddening analysis of "which of hundreds of templates is empty and needs to be changed with target output". And oxygen is no help.
submitted respectfully. We love the debugger.
our team is working on lots of XSLT templates and using the debugger frequently. We frequently pick up code created by other users.
problem:
In working with the debugger if you encounter a template that does nothing, the debugger will not be able to "step through" it. It simply skips over it (even though it is actually processed).
background:
We have elements that may initially have no target mapping. So an element template for it is initially empty. Later, a mapping is found and we need to change it so that the template provides target output.
Take a template like this:
<xsl:template match="someElement"/>
It provides no target output. It absolutely is fired in the processing.
You can do a full stack trace to find that this template actually fired. However, if you step through the templates in the Oxygen debugger you will never see that this template was actually fired. It simply skips over it and moves on to the next template. Even if you set break points and "step" one step at a time.
So we are having to do a maddening analysis of "which of hundreds of templates is empty and needs to be changed with target output". And oxygen is no help.
submitted respectfully. We love the debugger.
Re: debugger missing empty templates
This has been a source of frustration for me as well; I've worked around it by adding content to the template, i.e.,
<xsl:template match="someElement">
<xsl:comment>empty template</xsl:comment>
</xsl:template>
In order to step through in debugger, but it would be nice if it could stop on empty templates.
<xsl:template match="someElement">
<xsl:comment>empty template</xsl:comment>
</xsl:template>
In order to step through in debugger, but it would be nice if it could stop on empty templates.
Re: debugger missing empty templates
Hello,
Thank you for the feedback.
I've submitted an issue to investigate if this can be improved. Note that this may very well depend on the capabilities of the transformer engine (Saxon/Xalan, etc).
From what I tested, when debugging with Xalan (XSLT 1.0), Step Into also stops in empty templates. However, Saxon doesn't seem to do the same.
BTW, a simpler workaround for this that does not affect the content is to use xsl:message.
e.g.
Regards,
Adrian
Thank you for the feedback.
I've submitted an issue to investigate if this can be improved. Note that this may very well depend on the capabilities of the transformer engine (Saxon/Xalan, etc).
From what I tested, when debugging with Xalan (XSLT 1.0), Step Into also stops in empty templates. However, Saxon doesn't seem to do the same.
BTW, a simpler workaround for this that does not affect the content is to use xsl:message.
e.g.
Code: Select all
<xsl:template match="someElement">
<xsl:message>msg</xsl:message>
</xsl:template>
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Wed Sep 23, 2009 3:19 pm
Re: debugger missing empty templates
Post by xmlhelpline »
thank you for your prompt reply. we are using saxon.
unfortunately we cannot use that workaround as we can't have tons of xsl:messages occur in production code that has no value. some templates remain empty for good reason. others get reworked as new data comes in.
if this is a saxon thing, please let me know and let's see if we can propose any adjustments.
unfortunately we cannot use that workaround as we can't have tons of xsl:messages occur in production code that has no value. some templates remain empty for good reason. others get reworked as new data comes in.
if this is a saxon thing, please let me know and let's see if we can propose any adjustments.
Re: debugger missing empty templates
Hi,
From what our developers investigated, it seems to be a Saxon API issue (or limitation?) as Saxon does not notify the trace listener of the empty templates. This issue has been reported to Saxonica:
Somehow notify TraceListener that an empty xsl:template is being matched
Regards,
Adrian
From what our developers investigated, it seems to be a Saxon API issue (or limitation?) as Saxon does not notify the trace listener of the empty templates. This issue has been reported to Saxonica:
Somehow notify TraceListener that an empty xsl:template is being matched
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Re: debugger missing empty templates
Hello!
We released oXygen XML Editor version 20 and the problem reported here was fixed, by integration of the latest Saxon version.
So, the empty templates are no longer skipped when using "Step into" or breakpoints for debugging.
You can download the build from here:
https://www.oxygenxml.com/xml_editor/do ... ditor.html
Regards,
Teo
We released oXygen XML Editor version 20 and the problem reported here was fixed, by integration of the latest Saxon version.
So, the empty templates are no longer skipped when using "Step into" or breakpoints for debugging.
You can download the build from here:
https://www.oxygenxml.com/xml_editor/do ... ditor.html
Regards,
Teo
Teodor Timplaru
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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