<P:Child id="test4childId" P:PruebA="Valor" />
</P:Parent>
*/
StringBuilder code = new StringBuilder();
ScriptUtil util = itsNatDoc.getScriptUtil();
code.append( "try{" );
code.append( "var elem = null;" );
code.append( "var attr = null;" );
Element testElem1 = doc.getElementById("test1Id");
code.append( "elem = " + util.getNodeReference(testElem1) + ";" );
code.append( "attr = elem.getAttributeNodeNS('http://www.w3.org/2000/svg','PruebA');");
code.append( "if (attr == null) alert('WRONG test 1'); ");
code.append( "else if (attr.name != 'P:PruebA') alert('WRONG test 1 (2)'); ");
Element testChildElem1 = doc.getElementById("test1childId");
code.append( "elem = " + util.getNodeReference(testChildElem1) + ";" );
code.append( "if (elem.namespaceURI != 'http://www.w3.org/2000/svg') alert('WRONG test child 1'); ");
code.append( "if (elem.tagName != 'P:Prueba') alert('WRONG test child 1 (2)'); ");
Element testElem2 = doc.getElementById("test2Id");
code.append( "elem = " + util.getNodeReference(testElem2) + ";" );
code.append( "attr = elem.getAttributeNodeNS('http://prueba.org/prueba','PruebA');");
code.append( "if (attr == null) alert('WRONG test 2'); ");
code.append( "else if (attr.name != 'P:PruebA') alert('WRONG test 2 (2)'); ");
Element testElem3 = doc.getElementById("test3Id");
code.append( "elem = " + util.getNodeReference(testElem3) + ";" );
code.append( "attr = elem.getAttributeNodeNS('http://prueba.org/prueba','PruebA');");
code.append( "if (attr == null) alert('WRONG test 2'); ");
code.append( "else if (attr.name != 'P:PruebA') alert('WRONG test 2 (2)'); ");
ItsNatDocumentTemplate template = itsNatDoc.getItsNatDocumentTemplate();
String mime = template.getMIME();
if (mime.equals("text/html")) // testeamos el itsnat:ignorens que s�lo tiene sentido en text/html
{
Element testElem4 = doc.getElementById("test4Id");
code.append( "elem = " + util.getNodeReference(testElem4) + ";" );
code.append( "if (elem.namespaceURI == 'http://prueba.org/prueba') alert('WRONG test 4'); ");
code.append( "if (elem.tagName.toLowerCase() != 'p:parent') alert('WRONG test 4 (2)'); ");
Element testChildElem4 = doc.getElementById("test4childId");
code.append( "elem = " + util.getNodeReference(testChildElem4) + ";" );
code.append( "if (elem.namespaceURI == 'http://prueba.org/prueba') alert('WRONG test 4 child'); ");
code.append( "if (elem.tagName.toLowerCase() != 'p:child') alert('WRONG test 4 child (2)'); ");
code.append( "attr = elem.getAttributeNode('p:prueba');");
code.append( "if (attr == null) alert('WRONG test 4 child (3)'); ");