<?xml version="1.0" encoding="UTF-8"?>
<!--book xmlns="http://docbook.org/ns/docbook" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="5.0"-->
<book xmlns="http://docbook.org/ns/docbook" xmlns:xhtml="http://www.w3.org/1999/xhtml" version="5.0">
<xhtml:style>
test { color: red; display: block }
test:before { content: 'FAILED' }
*[test="0"] { color: green; }
*[test="0"]:before { content: 'PASSED' }
</xhtml:style>
<xhtml:div id="description">This test checks whether CSS21 attribute selectors are re-evaluated after attribute changes in xml elements.</xhtml:div>
<test test="1"></test>
<xhtml:script>
function change() {
var element = document.getElementsByTagName('test')[0];
element.attributes.test.value = 0;
if (window.testRunner)
testRunner.notifyDone();
}
window.onload = function () {
if (window.testRunner)
testRunner.waitUntilDone();
// Trigger an attribute change after all load processing is done. Doing the change
// here immediately does not exhibit the problem.
setTimeout("change();", 0);
}
</xhtml:script>
</book>