Annotation of parser3/tests/142.html, revision 1.4
1.4 ! misha 1: @main[]
! 2: $xdoc[^xdoc::create[doc]]
! 3:
! 4: $elem[^xdoc.createElement[paf]]
! 5: $dummy[^xdoc.firstChild.appendChild[$elem]]
! 6:
! 7: ^dump[$xdoc]
! 8:
! 9: $elem[^xdoc.createTextNode[this is text node (will be removed later)]]
! 10: $appendedTextNode[^xdoc.firstChild.firstChild.appendChild[$elem]]
! 11:
! 12: ^dump[$xdoc]
! 13:
! 14: $elem[^xdoc.createComment[this is comment, must go before text node(will be replaced later)]]
! 15: $insertedComment[^xdoc.firstChild.firstChild.insertBefore[$elem;$appendedTextNode]]
! 16:
! 17: ^dump[$xdoc]
! 18:
! 19: $cdata[^xdoc.createCDATASection[this is CDATA, it replaced comment here!]]
! 20: $dummy[^xdoc.firstChild.firstChild.replaceChild[$cdata;$insertedComment]]
! 21:
! 22: ^dump[$xdoc]
! 23:
! 24: $removedNode[^xdoc.firstChild.firstChild.removeChild[$xdoc.firstChild.firstChild.firstChild.nextSibling]]
! 25: =$removedNode.nodeName|$removedNode.nodeValue=
! 26:
! 27: ^dump[$xdoc]
! 28:
! 29: $elem[^xdoc.createProcessingInstruction[this is target;this is pi]]
! 30: $dummy[^xdoc.firstChild.firstChild.replaceChild[$elem;$cdata]]
! 31:
! 32: ^dump[$xdoc]
! 33:
! 34: $attr[^xdoc.createAttribute[attname]]
! 35: $dummy[^xdoc.firstChild.setAttributeNode[$attr]]
! 36:
! 37: ^dump[$xdoc]
! 38:
! 39: $attr.nodeValue[attvalue]
! 40:
! 41: ^dump[$xdoc]
! 42:
! 43: $EntityReference[^xdoc.createEntityReference[nbsp]]
! 44: $dummy[^xdoc.firstChild.appendChild[$EntityReference]]
! 45:
! 46: ^dump[$xdoc]
! 47:
! 48: $elem[^xdoc.createElement[paf]]
! 49: $dummy[^xdoc.firstChild.firstChild.firstChild.appendChild[$elem]]
! 50:
! 51: ^dump[$xdoc]
! 52:
! 53: $NodeList[^xdoc.getElementsByTagName[paf]]
! 54: paf count=^NodeList._count[]
! 55: <hr><hr>
! 56:
! 57: @dump[xdoc]
! 58: ^show_xdoc2[$xdoc]<hr>
! 59: ^show_xnode1[$xdoc]<hr>
! 60: <hr>
! 61:
! 62: @show1[array]
! 63: ^for[i](0;$array-1){
! 64: $x[$array.$i]
! 65: $x.firstChild.nodeValue:
! 66: $pattributes[$x.parentNode.attributes]
! 67: ^if(^pattributes._count[]){
! 68: $pattributes.id.name=$pattributes.id.nodeValue
! 69: }
! 70: <br>
! 71: }
! 72:
! 73: @show_xnodes1[array][i]
! 74: ^for[i](0;^array._count[]-1){
! 75: ^show_xnode1[$array.$i;0;1]
! 76: }
! 77:
! 78: @show_xnode1[x;level;single][l]
! 79: ^if(def $x){
! 80: ^for[l](0;$level-1){ ^; ^; ^; ^;}
! 81: ^if($x.nodeType == $xnode:ELEMENT_NODE){
! 82: <^;$x.nodeName
! 83: $pairs[$x.attributes]
! 84: ^if(def $pairs){
! 85: $names[^pairs._keys[]]
! 86: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
! 87: }
! 88: >^;
! 89: }{
! 90: [$x.nodeType]
! 91: }
! 92:
! 93: ^if(def $x.nodeValue){$x.nodeValue}<br>
! 94: ^show_xnode1[$x.firstChild]($level+1)
! 95: ^if(!$single){
! 96: ^show_xnode1[$x.nextSibling]($level)
! 97: }
! 98:
! 99: ^if($x.nodeType == $xnode:ELEMENT_NODE){
! 100: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
! 101: }
! 102: }
! 103:
! 104: @show_xdoc2[xdoc]
! 105: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
! 106: <pre>^taint[html][^xdoc.string[
! 107: $.method[html]
! 108: # $.encoding[utF-8]
! 109: # $.omit-xml-declaration[yes]
! 110: # $.standalone[no]
! 111: # -$.doctype-public[-//W3C//DTD XHTML]
! 112: # -$.doctype-system[/a/b/c/]
! 113: # $.indent[yes]
! 114: # $.media-type[text/paf]
! 115: ]]
! 116: </pre>
E-mail: