raster image of conf-reader-201-t

This test checks that namespace prefixes are handled correctly.

First, a random 20-character string is generated. The string only contains characters that are valid NCName letters. This string is then used as a custom prefix for an 'href' attribute in the XLink namespace. An 'image' element is created and two image references are added, one is in the "" namespace, and one is in the XLink namespace. Only the attribute with the 20-character prefix is actually in the XLink namespace, which means that that link should be the one that is used when rendering the 'image' element. This first subtest is using the setAttributeNS method.

The second subtest generates a new prefix string, and makes sure it's not equal to the first prefix string. Then an svg fragment is generated as a string, to be parsed by a call to the parseXML method. The 'xlink' prefix is bound to the "" namespace, and the generated prefix is bound to the XLink namespace. Similar to the first subtest, the image has two references but only one attribute is actually in the XLink namespace. The fragment is parsed and the result is inserted into the document, which should make the 'image' element visible. If an exception is thrown during the parsing or the insertion of the result output will be shown in the status part of the testcase.

The testcase has passed if after the script execution has taken place these conditions are met: