https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2012-04-27T01:43:23ZSaxonica Developer CommunitySaxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14602012-04-27T01:43:23ZPhilip Fearonpgfearo@gmail.com
<ul></ul><p>Thanks for reporting this - beta 0.1 has a number of namespace issues on the HTML side (see <a class="issue tracker-1 status-3 priority-3 priority-highest closed" title="Bug: Limitations in namespace-awareness when reading/writing the HTML DOM (Closed)" href="https://saxonica.plan.io/issues/1455">#1455</a>), but this was thought to be less marked with XHTML. I'll check out your test-case on our latest Saxon-CE build (where namespace handling has been re-worked) when I get into the office.</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14612012-04-27T05:51:15ZManfred Staudingermanfredstaudinger@gmail.com
<ul></ul><p>Not sure anymore the problem is namespace or use element related (it was a bit late when I wrote the issue). When you add</p>
<pre><code> <xsl:result-document href="#clip-path" method="ixsl:append-content" xmlns="http://www.w3.org/2000/svg">
<use xlink:href="#_1474"/>
</xsl:result-document>
</code></pre> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14622012-04-27T06:39:56ZPhilip Fearonpgfearo@gmail.com
<ul></ul><p>First, I'll address the namespace problem - because it was definitely an issue in beta 0.1 in certain use cases (though perhaps it's just a contributory factor here):</p>
<p>With the beta 0.2 (pre-release) I get this result in the log - this is, both xsl:message outputs are true:</p>
<p><img src="https://external.planio.media/i/http://saxonica.com/ce/redmine/issues/svg-t5-v2-log-r.png" data-orig-src="http://saxonica.com/ce/redmine/issues/svg-t5-v2-log-r.png" alt=""></p>
<p>For info, to achieve this in beta 0.2 I had to: 1) add the namespace declaration for xhtml 2) add the xpath-default-namespace attribute for xhtml and 3) add <code>svg:</code> prefixes for svg name-tests in the XPath. (These extra namespace declarations are what you would expect for a namespace-aware browser, but weren't necessary in beta 0.1). So, the final XSLT looks like this:</p>
<pre><code><?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="2.0"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:ixsl="http://saxonica.com/ns/interactiveXSLT"
xmlns:prop="http://saxonica.com/ns/html-property"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
extension-element-prefixes="ixsl"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xpath-default-namespace="http://www.w3.org/1999/xhtml"
>
<xsl:variable name="svg" select="ixsl:page()/html/body/svg:svg" as="element()"/>
<xsl:variable name="g" select="$svg/svg:g/svg:g/svg:g" as="element()+"/>
<xsl:template match="/">
<xsl:message select="boolean($g/svg:g[@id='&lt;Raumtrennung&gt;_2'])"/>
<xsl:message select="boolean($g/svg:use[@xlink:href='#Ohne_Bezeichnung_1'])"/>
<xsl:result-document href="#title" method="ixsl:replace-content">
<xsl:value-of select="$svg/title"/>
</xsl:result-document>
</xsl:template>
</xsl:transform>
</code></pre>
<p>I'll now check out the second part - writing the <code>use</code> element with an xlink:href attribute...</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14632012-04-27T07:13:19ZPhilip Fearonpgfearo@gmail.com
<ul></ul><p>Testing (in beta 0.2 pre-release) your modified XSLT that replaces clip-path content with the use element is added fine. This case is similar to an SVG test-case I had created.</p>
<p>Note that SVG elements referenced in this way, with xlink:href, are technically outside the DOM, so user-events for these require special handling by Saxon-CE (see issue <a class="issue tracker-1 status-3 priority-1 priority-lowest closed" title="Bug: Events from elements referenced using xlink:href from svg:use element not raised within Saxon-CE (Closed)" href="https://saxonica.plan.io/issues/1456">#1456</a>). From the XSLT developer's perspective the behaviour is the same as if the referenced elements were within the DOM, so you can use ixsl:event handdling templates in the usual way.</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14642012-04-27T07:17:42ZPhilip Fearonpgfearo@gmail.com
<ul><li><strong>Assignee</strong> set to <i>Philip Fearon</i></li><li><strong>Priority</strong> changed from <i>Low</i> to <i>Normal</i></li><li><strong>Sprint/Milestone</strong> set to <i>Beta 0.2</i></li><li><strong>Found in version</strong> set to <i>Beta 0.1</i></li><li><strong>Fixed in version</strong> set to <i>Beta 0.2</i></li></ul><p>I'm marking this issue as a consequence of a wider Beta 0.1 namespace issue that's now resolved for Beta 0.2</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14662012-04-27T10:59:30ZManfred Staudingermanfredstaudinger@gmail.com
<ul></ul><p>This is very good news! These are the last pieces I would need to implement dynamic clipping (I've checked it statically). Thank you!</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14702012-04-30T10:39:14ZPhilip Fearonpgfearo@gmail.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14722012-04-30T20:47:07ZManfred Staudingermanfredstaudinger@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/134">console.txt</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/134/console.txt">console.txt</a> added</li></ul><p>When I try this with Beta 0.2 it seems not to start the transformation. I've appended the console log.</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14732012-05-01T00:25:33ZPhilip Fearonpgfearo@gmail.com
<ul></ul><p>Thanks for sending in this log.</p>
<p>Firstly, the 'Failed Attribute' warnings that appear are not Saxon-CE issues they're just a browser complaint because we're using a script element in an unrecognised way - that the browser doesn't need to care about.</p>
<p>Here's the key part of the log:</p>
<p>SaxonCE.XSLT20Processor 00:19:32.375 FINE: Aynchronous GET for: file:/E:/saxon-ce/Plaene/test3/svg-t5-011.svg</p>
<p>SaxonCE.XSLT20Processor 00:19:34.272 FINE: Compiling Stylesheet...</p>
<p>SaxonCE.XSLT20Processor 00:19:36.939 FINE: Stylesheet compiled OK</p>
<hr>
<p>The log appears to finish at this point, but Saxon-CE is still waiting on a response from the asynchronous get for svg-t5-011.svg - the next line should be a 'Response Received' line and then a 'Starting transform...' line.</p>
<p>No response was logged for the asynchronous get, and I don't know quite why - if there was an HTTP error, then this should appear in Saxon-CE's log, but the browser console should report the HTTP error independently also.</p>
<p>I will try this out also as soon as I can, but here are a few things to check:</p>
<ol>
<li>
<p>Are you still using Opera?</p>
</li>
<li>
<p>Have you explicitly cleared your browser's cache? - Opera tends to hang on to files a bit longer than other browsers</p>
</li>
<li>
<p>Is the reported URI for the svg file good?</p>
</li>
<li>
<p>Have you tried this in another browser - did it fail there also?</p>
</li>
<li>
<p>As reported earlier in this thread, there were breaking changes in beta 0.2 regarding namespaces, which would definitely require changes to your XSLT - have you updated your XSLT/XPaths for the XHTML and SVG namespaces? (I ask this last, because this won't yet be the main issue - even with namespace issues - we should still see 'Response Received' and 'Transform Started' log entries.)</p>
</li>
</ol> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14742012-05-01T01:00:26ZPhilip Fearonpgfearo@gmail.com
<ul></ul><p>I missed this earlier:</p>
<p>The URI for the SVG is a file-system URI: file:/E:/saxon-ce/Plaene/test3/svg-t5-011.svg</p>
<p>You are probably going to get strange behaviour with browsers on the file-system (instead of using HTTP) because of security issues, but also because I'm not sure (i.e. it's un-tested) how well XMLHTTPRequest behaves asynchronously in this scenario.</p>
<p>One further point, the timings in the log seem incredibly slow, you have intervals measured in seconds when they should be (at least, from my tests) in milliseconds, e.g. there's nearly a 2 second interval between the GET and the start of the compile. Is this a hardware issue, or were other tasks running in the 'background'?</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14752012-05-01T04:54:54ZManfred Staudingermanfredstaudinger@gmail.com
<ul></ul><p>First the good news: the test works fine on http! To your questions:</p>
<p>1., 4. The console log is from Opera 11.62 <em>and</em> Firfox 11.0</p>
<ol start="2">
<li>
<p>Browser cache is cleared.</p>
</li>
<li>
<p>The svg file is good.</p>
</li>
<li>
<p>I simply copied the xsl you modified.</p>
</li>
</ol>
<p>I don't think it's a security issue, as I have</p>
<p>Firefox, about:config security.fileuri.strict_origin_policy;false</p>
<p>Opera, opera:config#UserPrefs Allow File XMLHttpRequest</p>
<p>About the timings, it's only Firefox that slow, Opera is just fine.</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14762012-05-01T05:45:32ZPhilip Fearonpgfearo@gmail.com
<ul></ul><p>Now we know this isn't a security issue, the most likely cause is that XMLHTTPRequest doesn't work properly with the 'file' protocol in asynchronous mode. I will try adding a patch that checks the URI for the protocol and switches to synchronous mode for this case.</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=14772012-05-01T06:01:34ZPhilip Fearonpgfearo@gmail.com
<ul></ul><p>I've opened a new issue for this, see <a class="issue tracker-1 status-3 priority-2 priority-default closed" title="Bug: Issue with asynchronous XMLHTTPRequest when using file-system URIs instead of HTTP (Closed)" href="https://saxonica.plan.io/issues/1507">#1507</a>.</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=20682013-02-22T09:47:51ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>Fixed in version</strong> changed from <i>Beta 0.2</i> to <i>1.0</i></li></ul><p>Fixed in Saxon-CE version 1.0</p> Saxon-CE - Bug #1503: Attribute in xlink namespace not recognized (Firefox)https://saxonica.plan.io/issues/1503?journal_id=20912013-02-22T09:57:32ZO'Neil Delprattoneil@saxonica.com
<ul><li><strong>Sprint/Milestone</strong> changed from <i>Beta 0.2</i> to <i>Release 1.0</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul>