script-listener-201-t

raster image of script-listener-201-t

This test tests the assertion from the Namespaces in XML specification, "The namespace prefix, unless it is xml or xmlns, MUST have been declared in a namespace declaration attribute in either the start-tag of the element where the prefix is used or in an ancestor element (i.e. an element in whose content the prefixed markup occurs)." The root element doesn't declare the XML Event namespace for the prefix "ev".

The test has passed if handlers are implemented (the handler with xml:id="passhandler" has run) but the handler with xml:id="failhandler" has not run. If the handler is run then the text in the testcase will show "Test failed: magic prefixes!". If handlers are not implemented at all, the testcase will show "Test failed: handlers not implemented."

The test is also passed if the implementation states somehow that the test case is not namespace well formed (by overlaying it on the image, informing the user in the error console, not showing the document at all, etc.).