This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
When an anchor contains both an href with a Javascript URI and an event attribute, the OBJECTS_OR_SCRIPT-3 WARN on the event attribute is triggered, but not the OBJECTS_OR_SCRIPT-3 FAIL on the javascript link. Ex: <a href="javascript:test()" onmouseout="mouseOut();">link</a> I added a test in the test suite to track the bug: ObjectsOrScriptTest/6/index.xhtml The error occurs because two XSLT templates match the link, which creates an ambiguous rule match that gets silently recovered by Saxon. Saxon basically chooses one of the templates, and not the one we want in our case, since there should be a FAIL, and only a WARN is retrieved! The error is signaled by Saxon as: [[[ Error XTRE0540: Ambiguous rule match for /moki/primaryDoc[1]/XHTMLDocInfo[1]/docContent[1]/html[1]/body[1]/div[2]/div[3]/div[1]/div[2]/div[1]/span[1]/a[2] Matches both "html:a[starts-with(lower-case(@href),'javascript:')]" on line 71 of mobileok-ref/build/org/w3c/mwi/mobileok/basic/xslt/ObjectsOrScriptTest.xsl and "html:*[@onload or @onunload or @onclick or @ondblclick or @onmousedown or @onmouseup or @onmouseover or @onmousemove or @onmouseout or @onfocus or @onblur or @onkeypress or @onkeydown or @onkeyup or @onsubmit or @onreset or @onselect or @onchange]" on line 189 of mobileok-ref/build/org/w3c/mwi/mobileok/basic/xslt/ObjectsOrScriptTest.xsl ]]]
I removed the ambiguity in the template rules in: ObjectOrScriptsTest.xsl StyleSheetsUseTest.xsl The solution I used was to define a named template, e.g. checkStyleAttribute that gets called explicitly whenever an html:[foo] element gets processed.