Add exception handling to schematron
Posted: Wed Apr 08, 2015 9:58 am
Hi,
currently it can be quite difficult to find the responsible code when an exception occurs during schematron validation.
Thus, I modified the skeleton script to support queryBinding "xslt3". In this mode the execution of each pattern is surrounded by an xsl:try. In the xsl:catch it reports the error description together with the id/title of the pattern and also finds the responsible schematron code (by evaluating $err:line-number and identify the element in the stylesheet itself with the same line number and use the @oxy:elementLine).
This works fine when running the generated xslt manually. However, when overwriting the builtin skeleton stylesheets and validate my xml, it complains about "Unknown XSLT element: try". This confuses me, since I configured oXygen to use Saxon EE (which supports xslt 3.0) for schematron validation and the generated stylesheet has version set to 3.0!?
Is it not possible to use XSLT v3.0 within schematron or is there anything I can do about it?
Thanks and regards,
Patrik
currently it can be quite difficult to find the responsible code when an exception occurs during schematron validation.
Thus, I modified the skeleton script to support queryBinding "xslt3". In this mode the execution of each pattern is surrounded by an xsl:try. In the xsl:catch it reports the error description together with the id/title of the pattern and also finds the responsible schematron code (by evaluating $err:line-number and identify the element in the stylesheet itself with the same line number and use the @oxy:elementLine).
This works fine when running the generated xslt manually. However, when overwriting the builtin skeleton stylesheets and validate my xml, it complains about "Unknown XSLT element: try". This confuses me, since I configured oXygen to use Saxon EE (which supports xslt 3.0) for schematron validation and the generated stylesheet has version set to 3.0!?
Is it not possible to use XSLT v3.0 within schematron or is there anything I can do about it?
Thanks and regards,
Patrik