Annotation of parser3/tests/142.html, revision 1.2
1.1 paf 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:
1.2 ! paf 19: $cdata[^xdoc.createCDATASection[this is CDATA, it replaced comment here!]]
! 20: $dummy[^xdoc.firstChild.firstChild.replaceChild[$cdata;$insertedComment]]
1.1 paf 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]]
1.2 ! paf 30: $dummy[^xdoc.firstChild.firstChild.replaceChild[$elem;$cdata]]
1.1 paf 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:
58: @dump[xdoc]
59: ^show_xdoc2[$xdoc]<hr>
60: ^show_xnode1[$xdoc]<hr>
61: <hr>
62:
63: @show1[array]
64: ^for[i](0;$array-1){
65: $x[$array.$i]
66: $x.firstChild.nodeValue:
67: $pattributes[$x.parentNode.attributes]
68: ^if(^pattributes._count[]){
69: $pattributes.id.name=$pattributes.id.nodeValue
70: }
71: <br>
72: }
73:
74: @show_xnodes1[array][i]
75: ^for[i](0;^array._count[]-1){
76: ^show_xnode1[$array.$i;0;1]
77: }
78:
79: @show_xnode1[x;level;single][l]
80: ^if(def $x){
81: ^for[l](0;$level-1){ ^; ^; ^; ^;}
82: ^if($x.nodeType == $xnode:ELEMENT_NODE){
83: <^;$x.nodeName
84: $pairs[$x.attributes]
85: ^if(def $pairs){
86: $names[^pairs._keys[]]
87: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
88: }
89: >^;
90: }{
91: [$x.nodeType]
92: }
93:
94: ^if(def $x.nodeValue){$x.nodeValue}<br>
95: ^show_xnode1[$x.firstChild]($level+1)
96: ^if(!$single){
97: ^show_xnode1[$x.nextSibling]($level)
98: }
99:
100: ^if($x.nodeType == $xnode:ELEMENT_NODE){
101: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
102: }
103: }
104:
105: @show_xdoc2[xdoc]
106: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
107: <pre>^taint[html][^xdoc.string[
108: $.method[html]
109: # $.encoding[utF-8]
110: # $.omit-xml-declaration[yes]
111: # $.standalone[no]
112: # -$.doctype-public[-//W3C//DTD XHTML]
113: # -$.doctype-system[/a/b/c/]
114: # $.indent[yes]
115: # $.media-type[text/paf]
116: ]]
117: </pre>
E-mail: