Support #5169
closedCannot set recover policy using javax.xml.transform.TransformerFactory API
100%
Description
Working to integrate Saxon 10 with Oxygen XML Editor, sorry if I'm being rusty.
Setting something like this in our code:
transformerFactory.setAttribute(net.sf.saxon.lib.FeatureKeys.RECOVERY_POLICY,Configuration.RECOVER_WITH_WARNINGS)
does not seem to work anymore.
Somehow the recover policy would need to propagate to "net.sf.saxon.trans.SimpleMode.reportAmbiguity(Item, Rule, Rule, XPathContext)" but I do not see how it would propagate there.
Is there an alternate API to using javax.xml.transform.TransformerFactory to set the policy on the transformer?
Updated by Radu Coravu over 2 years ago
I'm attempting to set DO_NOT_RECOVER on the FeatureKeys.RECOVERY_POLICY but still if the XSLT stylesheet has ambiguous rule matches, the transformation fails.
Updated by Radu Coravu over 2 years ago
The method net.sf.saxon.style.XSLMode.prepareAttributes() does not seem to be called from anywhere. The new XSLMode instance is created on net.sf.saxon.style.XSLApplyTemplates.validate(ComponentDeclaration).
Updated by Michael Kay over 2 years ago
This configuration property was introduced before the 3.0 attribute xsl:mode/@on-multiple-match
came along, and the preferred way to control it is now using the 3.0 syntax.
More specifically, the configuration property controlled what happened on "recoverable errors" - a concept that existed in 1.0, was retained in much reduced form in 2.0, and no longer exists in 3.0.
As regards XSLMode.prepareAttributes()
, see also bug #5118; and there's some history in bug #3184
Updated by Radu Coravu over 2 years ago
So the "Feature.RECOVERY_POLICY" is not used at all anymore by Saxon 10, and we should remove all our settings to control the recover policy from the Oxygen user's interface, is this correct?
Updated by Michael Kay over 2 years ago
Yes, that's correct. I've made changes to the documentation to record it as obsolete.
Updated by Radu Coravu over 2 years ago
Great, I'm happy, I like deleting code from our side, especially if it makes the user's interface simpler.
Updated by Michael Kay over 2 years ago
- Status changed from New to Resolved
- Assignee set to Michael Kay
Closing this. Documentation has been improved.
Updated by Radu Coravu over 2 years ago
How about the command line flag -warnings silent|recover|fatal ? Is this flag no longer useful as well? It still seems to be present as an option in the Saxon 10 command line.
Updated by Debbie Lockett about 2 years ago
- Status changed from Resolved to In Progress
Revisiting this issue which was never actually closed; there seems to be more to follow up on.
Firstly, the documentation fixes were made on the saxon11 branch (in tools/featureKeys/FeatureKeys.xml), but not on the saxon10 branch. The changes should be retrofitted to saxon10, and the Saxon 10 documentation updated, too.
So the documentation will say that the command line option -warnings
is ignored from Saxon 10. But should there be a warning if it is used? Or could it actually be fully removed as an option?
Also, xslt/@recoveryPolicy
is currently still found in the configuration file schema and example (on saxon10 and saxon11 branches). I assume it is just ignored. But maybe it should actually be removed now?
Updated by Debbie Lockett about 2 years ago
I have copied over the documentation changes to the saxon10 branch (in tools/featureKeys/FeatureKeys.xml and src/userdoc/using-xsl.xml), and updated the Saxon 10 documentation online. (See using-xsl/commandline, configuration/config-features, and Feature and FeatureKeys javadoc and dotnetdoc.)
Still to do: update configuration file example and schema.
Updated by Michael Kay almost 2 years ago
- Status changed from In Progress to Resolved
- Applies to branch 11, trunk added
- Fix Committed on Branch 11, trunk added
- Platforms .NET, Java added
I have made the required updates to the configuration schema, examples, and documentation on the 11.x and 12.x branches.
Updated by Debbie Lockett almost 2 years ago
- Applies to branch 10 added
- Fix Committed on Branch 10 added
Latest updates to the configuration schema, examples, and documentation, copied to the 10 branch too.
Updated by Debbie Lockett over 1 year ago
- Fixed in Maintenance Release 11.4 added
Bug fix applied in the Saxon 11.4 maintenance release. (Issue remains open awaiting Saxon 10 maintenance release.)
Updated by O'Neil Delpratt over 1 year ago
- Fixed in Maintenance Release 12.0 added
Bug fix applied in the Saxon 12.0 major release. (Issue remains open awaiting Saxon 10 maintenance release.)
Updated by O'Neil Delpratt about 1 year ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 10.9 added
Bug fix applied in the Saxon 10.9 maintenance release.
Please register to edit this issue