XSL try/catch does not prevent runtime error in Oxygen
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 87
- Joined: Tue Jan 01, 2013 3:19 pm
XSL try/catch does not prevent runtime error in Oxygen
Hi all,
i have a very simple XSLT transformation data.xsl. Inside, a boolean attribute is calculated as a comparison of a given value timestamp against current-dateTime. So timestamp has to be of type xs:dateTime. Transformation will fail with a runtime error if the input document is not validatend against a corresponding XSD Schema.
Next, i wrote an xsl stylesheet which calls fn:transform to invoke the transformation in data.xsl like this:
Applying this on a input-document which ist not validated against any schema (disable schema validation) gives me the message Runtime Error as expected. However, the whole Transformation fails with a Runtime Error in Oxygen:
So, the try/catch Expression has not the desired result (which would be success and a copy of the input document).
Is this a bug, or do i miss something?
Sincerely,
Frank Steimke
i have a very simple XSLT transformation data.xsl. Inside, a boolean attribute is calculated as a comparison of a given value timestamp against current-dateTime. So timestamp has to be of type xs:dateTime. Transformation will fail with a runtime error if the input document is not validatend against a corresponding XSD Schema.
Next, i wrote an xsl stylesheet which calls fn:transform to invoke the transformation in data.xsl like this:
Code: Select all
<xsl:template match="document-node(element(input))">
<xsl:variable name="options" as="map(*)">
<xsl:map>
<xsl:map-entry key="'source-node'" select="."/>
<xsl:map-entry key="'stylesheet-node'" select="doc('data.xsl')"/>
</xsl:map>
</xsl:variable>
<xsl:try>
<xsl:sequence select="transform($options)('output')"/>
<xsl:catch>
<xsl:message>Runtime Error</xsl:message>
<xsl:copy-of select="."/>
</xsl:catch>
</xsl:try>
</xsl:template>
Code: Select all
System ID: C:\tmp\xslt-try\data.xsl
Scenario: main
XSL file: C:\tmp\xslt-try\main.xsl
XML file: C:\tmp\xslt-try\input.xml
Engine name: Saxon-EE 9.7.0.15
Severity: fatal
Description: XPTY0004: Cannot compare xs:untypedAtomic to xs:dateTime
URL: http://www.w3.org/TR/xpath20/#ERRXPTY0004
Is this a bug, or do i miss something?
Sincerely,
Frank Steimke
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: XSL try/catch does not prevent runtime error in Oxygen
Hi Frank,
What exact version of Oxygen are you using? You should first try upgrading to the latest 19.1.
If you still have problems please send us (support@oxygenxml.com) a complete small sample (XML + XSL) to reproduce the problem on our side.
Regards,
Radu
What exact version of Oxygen are you using? You should first try upgrading to the latest 19.1.
If you still have problems please send us (support@oxygenxml.com) a complete small sample (XML + XSL) to reproduce the problem on our side.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 87
- Joined: Tue Jan 01, 2013 3:19 pm
Re: XSL try/catch does not prevent runtime error in Oxygen
Hi Radu,
sorry, i forgot. It was 19.0 an Windows 10 32 bit. Same thing after upgrading to 19.1. I will send the whole project to the support address.
Thanks,
Frank
sorry, i forgot. It was 19.0 an Windows 10 32 bit. Same thing after upgrading to 19.1. I will send the whole project to the support address.
Thanks,
Frank
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: XSL try/catch does not prevent runtime error in Oxygen
Hi Frank,
Thanks for the samples, I can reproduce the problem on my side and indeed Oxygen should not report the transformation as failed in this case. I will add an internal issue to look into this and we'll update this forum thread when we find a fix for this, probably in a future Oxygen version.
Regards,
Radu
Thanks for the samples, I can reproduce the problem on my side and indeed Oxygen should not report the transformation as failed in this case. I will add an internal issue to look into this and we'll update this forum thread when we find a fix for this, probably in a future Oxygen version.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: XSL try/catch does not prevent runtime error in Oxygen
Hi Frank,
The Oxygen XML Editor version 20 we just released should have a fix for your reported problem. It also comes bundled with Saxon 9.8.
Regards,
Radu
The Oxygen XML Editor version 20 we just released should have a fix for your reported problem. It also comes bundled with Saxon 9.8.
Regards,
Radu
Radu Coravu
<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)
- ↳ 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