https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2019-09-22T17:40:37ZSaxonica Developer CommunitySaxon - Bug #4315: Named output ignored in 9.9 when using result-document with format attributehttps://saxonica.plan.io/issues/4315?journal_id=142412019-09-22T17:40:37ZMichael Kaymike@saxonica.com
<ul></ul><p>Thanks for reporting it. This area underwent considerable redesign in 9.9, and the case of xsl:result-document with no @href attribute was one of the hardest things to get right. It seems we are combining the serialization properties on the (empty) principal output with the properties on the xsl:result-document secondary output, and the former are taking precedence if both are explicitly specified. It's not clear that the properties of the principal output should be considered at all, let alone taking precedence: though there may be a problem here that by the time the xsl:result-document is evaluated, we can't tell which of the serialization properties on the principal output came from the stylesheet, and which came from the API or command line.</p> Saxon - Bug #4315: Named output ignored in 9.9 when using result-document with format attributehttps://saxonica.plan.io/issues/4315?journal_id=142422019-09-22T19:43:14ZMichael Kaymike@saxonica.com
<ul></ul><p>It looks as if the problem is specific to running from the command line, which would explain why we didn't catch it in testing.</p>
<p>The Javadoc for the Serializer class suggests that the properties held in the Serializer are those supplied explicitly by the application, and exclude properties defined in the stylesheet. However, this isn't the case when the serializer is created via the transformer, using xslt30Transformer.newSerializer() - which is what the command line code is doing. This initiallizes the serializer with properties from the unnamed output format in the stylesheet, which are subsequently treated as if they were application-supplied, and therefore take precedence over the values supplied when a secondary output destination is created.</p> Saxon - Bug #4315: Named output ignored in 9.9 when using result-document with format attributehttps://saxonica.plan.io/issues/4315?journal_id=142432019-09-22T19:48:09ZMichael Kaymike@saxonica.com
<ul></ul><p>Changing the Transform command line to use <code>Processor.newSerializer()</code> rather than <code>Xslt30Transformer.newSerializer()</code> solves this particular problem, but the change needs careful regression testing to ensure that it has no unwelcome side-effects.</p> Saxon - Bug #4315: Named output ignored in 9.9 when using result-document with format attributehttps://saxonica.plan.io/issues/4315?journal_id=142442019-09-22T21:58:01ZMichael Kaymike@saxonica.com
<ul><li><strong>Category</strong> set to <i>Serialization</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Assignee</strong> set to <i>Michael Kay</i></li><li><strong>Priority</strong> changed from <i>Low</i> to <i>Normal</i></li><li><strong>Applies to branch</strong> <i>9.9, trunk</i> added</li><li><strong>Fix Committed on Branch</strong> <i>9.9, trunk</i> added</li></ul><p>I have satisfied myself that this change is OK. Added some command-line unit tests.</p> Saxon - Bug #4315: Named output ignored in 9.9 when using result-document with format attributehttps://saxonica.plan.io/issues/4315?journal_id=145862019-12-05T17:28:14ZO'Neil Delprattoneil@saxonica.com
<ul></ul><p>Added a further fix in the setOutputProperty method in the class IdentityTransformer to ignore unknown namespaces as we saw regression in the Saxon-HE product.</p> Saxon - Bug #4315: Named output ignored in 9.9 when using result-document with format attributehttps://saxonica.plan.io/issues/4315?journal_id=145942019-12-06T13:47:53ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>Fixed in Maintenance Release</strong> <i>9.9.1.6</i> added</li></ul><p>Patch committed to the Saxon 9.9.1.6 maintenance release.</p> Saxon - Bug #4315: Named output ignored in 9.9 when using result-document with format attributehttps://saxonica.plan.io/issues/4315?journal_id=149792020-03-02T16:21:56ZMichael Kaymike@saxonica.com
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>In Progress</i></li></ul><p>The supplied test case is not working in 9.9.1.6; therefore re-opening.</p> Saxon - Bug #4315: Named output ignored in 9.9 when using result-document with format attributehttps://saxonica.plan.io/issues/4315?journal_id=149802020-03-02T16:45:30ZMichael Kaymike@saxonica.com
<ul></ul><p>While debugging I noticed a bug that turns out not to be relevant (and may be symptomless): <code>SerializationProperties.getProperty()</code> should call <code>properties.getProperty()</code> rather than <code>properties.get()</code>. It makes a difference when the <code>Properties</code> object is layered, with an under-layer providing default values.</p>
<p>But this isn't enough, because at the time we call result-document, the Serializer is already initialised with method="text" and that is taking precedence over the new value.</p>
<p>It looks like I tested the patch on the development branch and then applied it incorrectly to the 9.9 branch. On 9.9, the change from <code>transformer.newSerializer()</code> to <code>processor.newSerializer()</code> was made only in the code handling -a invocation, which is not relevant to this test case (though the same change should probably be made there too). Making the same change on the "normal" path (<code>Transform.processFile()</code>) solves the problem.</p> Saxon - Bug #4315: Named output ignored in 9.9 when using result-document with format attributehttps://saxonica.plan.io/issues/4315?journal_id=149812020-03-02T16:48:20ZMichael Kaymike@saxonica.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li></ul><p>New patch committed.</p> Saxon - Bug #4315: Named output ignored in 9.9 when using result-document with format attributehttps://saxonica.plan.io/issues/4315?journal_id=149982020-03-05T10:09:40ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li><li><strong>Fixed in Maintenance Release</strong> <i>9.9.1.7</i> added</li><li><strong>Fixed in Maintenance Release</strong> deleted (<del><i>9.9.1.6</i></del>)</li></ul><p>Patch applied in the 9.9.1.7 maintenance release.</p>