XSLT debugger output not updated
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Adrian,
The output is not necessary generated after the debugger passes over an element in the stylesheet. For instance the processor does not emit anything when it encounters the test element below:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<test>
<a>
<b> some text content </b>
</a>
</test>
</xsl:template>
</xsl:stylesheet>
The reason for this is that there can be attributes defined next with xsl:attribute that should be emited before closing the start tag. Therefore the test start tag will be emmited when the next start tag is encountered, that is a.
If you still have problems you may consider posting a cut down sample stylesheet and eventually source document to allow us to reproduce the behavior.
Best Regards,
George
The output is not necessary generated after the debugger passes over an element in the stylesheet. For instance the processor does not emit anything when it encounters the test element below:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<test>
<a>
<b> some text content </b>
</a>
</test>
</xsl:template>
</xsl:stylesheet>
The reason for this is that there can be attributes defined next with xsl:attribute that should be emited before closing the start tag. Therefore the test start tag will be emmited when the next start tag is encountered, that is a.
If you still have problems you may consider posting a cut down sample stylesheet and eventually source document to allow us to reproduce the behavior.
Best Regards,
George
-
- Posts: 5
- Joined: Mon Jul 19, 2004 8:45 pm
here is a testcase
Hi George,
Here is the input XML:
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="123">
<para />
<para />
<para />
</root>
Here is the processing XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="123" xmlns:out="abc" version="1.0">
<xsl:output cdata-section-elements="out:text" />
<xsl:template match="/">
<out:text>
<xsl:apply-templates select="src:root/src:para" />
</out:text>
</xsl:template>
<xsl:template match="src:para">
para
</xsl:template>
</xsl:stylesheet>
Here is the expected output XML:
<?xml version="1.0" encoding="utf-8"?><out:text xmlns:out="abc" xmlns:src="123"><![CDATA[
para
para
para
]]></out:text>
Using the debugger's stepping feature, it was expected to see the text "para" showing one after another - but it shows once at the end of the debugging session.
It seems that the problem is the combination of the "xsl:output" element and the namespaces. Try to take out one or another or both and the debugger works as expected.
Hope it helps,
Adrian.
BTW, I think I deserve a free license for my effort
You can send me the activation code at bmf1972_at_icqmail.com - thank you very much!
Here is the input XML:
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="123">
<para />
<para />
<para />
</root>
Here is the processing XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:src="123" xmlns:out="abc" version="1.0">
<xsl:output cdata-section-elements="out:text" />
<xsl:template match="/">
<out:text>
<xsl:apply-templates select="src:root/src:para" />
</out:text>
</xsl:template>
<xsl:template match="src:para">
para
</xsl:template>
</xsl:stylesheet>
Here is the expected output XML:
<?xml version="1.0" encoding="utf-8"?><out:text xmlns:out="abc" xmlns:src="123"><![CDATA[
para
para
para
]]></out:text>
Using the debugger's stepping feature, it was expected to see the text "para" showing one after another - but it shows once at the end of the debugging session.
It seems that the problem is the combination of the "xsl:output" element and the namespaces. Try to take out one or another or both and the debugger works as expected.
Hope it helps,
Adrian.
BTW, I think I deserve a free license for my effort

You can send me the activation code at bmf1972_at_icqmail.com - thank you very much!
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi Adrian,
Oxygen presents the output as the XSLT processor emits that output., more this is XSLT processor dependent.
In the sample you presented you defined the out:text content to be a CDATA section, therefore Saxon will buffer internally the content of the element and then emits it to the output once the element closing tag is encountered.
If you will try Xalan you will see that it generates the "para" one after another, as you expected.
Best Regards,
George
Oxygen presents the output as the XSLT processor emits that output., more this is XSLT processor dependent.
In the sample you presented you defined the out:text content to be a CDATA section, therefore Saxon will buffer internally the content of the element and then emits it to the output once the element closing tag is encountered.
If you will try Xalan you will see that it generates the "para" one after another, as you expected.
Best Regards,
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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