Annotation of parser3/tests/143.html, revision 1.1
1.1 ! paf 1: @main[]
! 2: $xdoc[^xdoc::create[doc]]
! 3:
! 4: $foreign[^xdoc::create{<?xml version="1.0" encoding="$request:charset"?>
! 5: <!--some comment-->
! 6: <people>
! 7: <man id="2">
! 8: <name>ПИФ^taint[&]</name>
! 9: </man>
! 10: <man id="1" имя="word слово">
! 11: <name>P«^;AF B</name>
! 12: </man>
! 13: </people>
! 14: }]
! 15:
! 16: #first <man>, no attributes
! 17: $imported[^xdoc.importNode[$foreign.firstChild.nextSibling.firstChild.nextSibling](false)]
! 18: $dummy[^xdoc.firstChild.appendChild[$imported]]
! 19:
! 20: ^dump[$xdoc]
! 21:
! 22: #second <man>, with attributes and other children
! 23: $imported[^xdoc.importNode[$foreign.firstChild.nextSibling.firstChild.nextSibling.nextSibling.nextSibling](true)]
! 24: $dummy[^xdoc.firstChild.appendChild[$imported]]
! 25:
! 26: ^dump[$xdoc]
! 27:
! 28: @dump[xdoc]
! 29: ^show_xdoc2[$xdoc]<hr>
! 30: ^show_xnode1[$xdoc]<hr>
! 31: <hr>
! 32:
! 33: @show1[array]
! 34: ^for[i](0;$array-1){
! 35: $x[$array.$i]
! 36: $x.firstChild.nodeValue:
! 37: $pattributes[$x.parentNode.attributes]
! 38: ^if(^pattributes._count[]){
! 39: $pattributes.id.name=$pattributes.id.nodeValue
! 40: }
! 41: <br>
! 42: }
! 43:
! 44: @show_xnodes1[array][i]
! 45: ^for[i](0;^array._count[]-1){
! 46: ^show_xnode1[$array.$i;0;1]
! 47: }
! 48:
! 49: @show_xnode1[x;level;single][l]
! 50: ^if(def $x){
! 51: ^for[l](0;$level-1){ ^; ^; ^; ^;}
! 52: ^if($x.nodeType == $xnode:ELEMENT_NODE){
! 53: <^;$x.nodeName
! 54: $pairs[$x.attributes]
! 55: ^if(def $pairs){
! 56: $names[^pairs._keys[]]
! 57: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
! 58: }
! 59: >^;
! 60: }{
! 61: [$x.nodeType]
! 62: }
! 63:
! 64: ^if(def $x.nodeValue){$x.nodeValue}<br>
! 65: ^show_xnode1[$x.firstChild]($level+1)
! 66: ^if(!$single){
! 67: ^show_xnode1[$x.nextSibling]($level)
! 68: }
! 69:
! 70: ^if($x.nodeType == $xnode:ELEMENT_NODE){
! 71: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
! 72: }
! 73: }
! 74:
! 75: @show_xdoc2[xdoc]
! 76: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
! 77: <pre>^taint[html][^xdoc.string[
! 78: $.method[html]
! 79: # $.encoding[utF-8]
! 80: # $.omit-xml-declaration[yes]
! 81: # $.standalone[no]
! 82: # -$.doctype-public[-//W3C//DTD XHTML]
! 83: # -$.doctype-system[/a/b/c/]
! 84: # $.indent[yes]
! 85: # $.media-type[text/paf]
! 86: ]]
! 87: </pre>
E-mail: