https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2019-05-01T19:59:11ZSaxonica Developer CommunitySaxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=135262019-05-01T19:59:11ZMichael Kaymike@saxonica.com
<ul></ul><p>Confirmed that this also affects XQuery - added test case StringConstructor-027 which does</p>
<pre><code><a>Today is `{adjust-date-to-timezone(current-date(), ())}`</a>
</code></pre>
<p>This means we can't solve it simply by disabling this tokenization logic when doing XPath.</p> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=135272019-05-01T20:08:58ZMichael Kaymike@saxonica.com
<ul></ul><p>We also need to test perverse cases like</p>
<pre><code><a>This: {``[is `{``[text]``}`]``}`</a>
</code></pre> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=135282019-05-01T20:51:18ZMichael Kaymike@saxonica.com
<ul></ul><p>In both string constructors, where we have embedded expression of the form</p>
<pre><code>`{expr}`
</code></pre>
<p>and value templates (XSLT/XQuery) where we have embedded expressions of the form</p>
<pre><code>{expr}
</code></pre>
<p>we are relying on the tokenizer to deliver a terminal token ( "}" or "}`......" . Now, the problem is that the "}" at the end of a value template can validly be followed by a backtick. So for the tokenizer to do this correctly, it needs to know which delimiter is expected; but that's not a simple state setting because either of these expressions can be nested in the other, recursively.</p>
<p>So it looks as if we are asking too much of the tokenizer.</p>
<p>I think we probably need a complete change of strategy for parsing StringConstructors, handling them more like we handle direct element constructors, where the parser switches into reading individual characters from the input, with tokenization disabled. Unfortunately this is a pretty complex solution.</p> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=135292019-05-01T22:45:03ZMichael Kaymike@saxonica.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</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>Resolved this by a rather ugly hack where the parsing of an XQuery StringConstructor is divided awkwardly between the parser and tokenizer. But it's no uglier than some of the parsing for element constructors...</p>
<p>Test cases added to both QT3 and XSLT3.</p> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=135302019-05-02T10:14:21ZMartin Honnenmartin.honnen@gmx.de
<ul></ul><p>The bug also exists in 9.8.</p>
<p>Not sure what the current policy in terms of that branch is but it would be nice if it also gets the fix as without it using text value templates in XSLT 3 to create Markdown output where the backtick is an important character is not possible and one has to go back to use <code>xsl:text</code>/<code>xsl:value-of</code>.</p> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=136202019-05-15T10:40:36ZO'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.3</i> added</li></ul><p>Bug fix applied to the Saxon 9.9.1.3 maintenance release</p> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=139212019-08-13T10:05:29ZMichael Kaymike@saxonica.com
<ul></ul><p>@Martin, I think it's unlikely there will be any further maintenance releases for 9.8. We would do one only if such a patch is the only way to keep a customer on the road, which would imply (a) there's something stopping the customer moving to 9.9, and (b) there's no practical workaround. In general, we are no longer committing 9.8 versions of patches as a matter of course. If we were to make another 9.8 build for general release, we would review the set of bugs that are candidates for retro-fitting.</p> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=140482019-08-23T16:32:07ZEvan Lenzevan@lenzconsulting.com
<ul></ul><p>As a minor data point, I ran into this problem as well (also while creating Markdown-like output), and I'm glad to have found the explanation here so I can appropriately tailor the workaround. I'm also using Saxon-HE 9.8 due to problems with Saxon 9.9 that I haven't isolated yet (an uncaught java.lang.UnsupportedOperationException: "Cannot copy a variable
reference whose binding is unknown") and based on the Saxon home page's indication that 9.8 is the most stable version. I'll try to create a report about the other issue.</p> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=140492019-08-23T16:46:21ZDebbie Lockettdebbie@saxonica.com
<ul></ul><p>@Evan, can I ask where you got the information that 9.8 is most stable? You should find that <a href="http://www.saxonica.com/download/download_page.xml" class="external">http://www.saxonica.com/download/download_page.xml</a> says that 9.9 is most stable (this was updated some time ago, I think with the 9.9.1.2 release). Thanks.</p> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=140502019-08-23T17:16:54ZMartin Honnenmartin.honnen@gmx.de
<ul></ul><p>@Debbie, I don't know where Evan looked but for the HE edition people do consult <a href="http://saxon.sourceforge.net/" class="external">http://saxon.sourceforge.net/</a> and that continues to say "The most stable version is version 9.8"</p> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=140512019-08-23T17:17:52ZEvan Lenzevan@lenzconsulting.com
<ul></ul><p>@Debbie, the fifth paragraph on <a href="http://saxon.sourceforge.net/" class="external">http://saxon.sourceforge.net/</a> reads:</p>
<p>"The most stable version is version 9.8, first released on 8 June 2018 (the same day as the XSLT 3.0 Recommendation), and regularly updated with maintenance releases."</p> Saxon - Bug #4208: In XSLT value templates, closing brace is not recognized when followed by backtickhttps://saxonica.plan.io/issues/4208?journal_id=140522019-08-23T17:21:22ZDebbie Lockettdebbie@saxonica.com
<ul></ul><p>Ah ha, thank you both - that information clearly needs updating...</p>