--- parser3/www/htdocs/Attic/_bug.html 2004/03/25 11:51:19 1.35 +++ parser3/www/htdocs/Attic/_bug.html 2005/12/16 15:08:53 1.113 @@ -1,66 +1,101 @@ -@auto[] -$request:charset[windows-1251] -$response:charset[windows-1251] +@main[] +$xdoc[^xdoc::create{ + + + + + ПИФ^taint[&] + + + P«^;AF B + + +}] +^dump[$xdoc] -@main[] -$table[^table::create{pet -cat milk}] -$hash[^table.hash[pet]] -^display[$hash] +^xdoc.documentElement.firstChild.nextSibling.getAttributeNS[http://parser.ru/first;attrname]! -@main[] -^connect[mysql://root@localhost/paf]{ +^xdoc.documentElement.lastChild.previousSibling.setAttributeNS[http://parser.ru/second;second:attrname2;value 2] -$hash[^hash::sql{select 'cat' as pet -#, 'milk' as food -}] -^display_hash[$hash] +^dump[$xdoc] +
+^rem{ -} +^㧥.removeAttributeNS[namespaceURI;localName] [3.1.1] -@main[] -^connect[mysql://root@localhost/paf]{ - $participants[^hash::sql{select 'feodor' as participant }] -} +$Attr[^㧥.getAttributeNodeNS[namespaceURI;localName]] [3.1.1] -#: : -$participantsZ[ - $.alex(1) - $.boris(1) -] - -#: , , : -$person[feodor] -$person ^if($participants.$person){}{ } -} +$Attr[^㧥.setAttributeNodeNS[$newAttr]] [3.1.1] +$NodeList[^㧥.getElementsByTagNameNS[namespaceURI;localName]] -@display_hash[hash] -#$hash.a.a -^hash.foreach[k;v]{hash $k=( -^if($v is hash){^display_hash[$v]}{ -^if($v is bool){bool ^if($v){true;false}}{string $v} -} -}[,] +^if(^㧥.hasAttribute[name]){:} [3.1.1] -)^#0A}] +^if(^㧥.hasAttributeNS[namespaceURI;localName]){:} [3.1.1] +^show_xnode1[$xdoc.doctype] +} +
-@main[] -$name[ ] -"$name" -"^name.trim[]" +@dump[xdoc] +^show_xdoc2[$xdoc]
+^show_xnode1[$xdoc]
+
+ +@show1[array] +^for[i](0;$array-1){ + $x[$array.$i] + $x.firstChild.nodeValue: + $pattributes[$x.parentNode.attributes] + ^if(^pattributes._count[]){ + $pattributes.id.name=$pattributes.id.nodeValue + } +
+} + +@show_xnodes1[array][i] +^for[i](0;^array._count[]-1){ + ^show_xnode1[$array.$i;0;1] +} -$path[/section/subsection/] -^path.trim[end;/] +@show_xnode1[x;level;single][l] +^if(def $x){ + ^for[l](0;$level-1){ ^; ^; ^; ^;} + ^if($x.nodeType == $xnode:ELEMENT_NODE){ + <^;$x.nodeName + $pairs[$x.attributes] + ^if(def $pairs){ + $names[^pairs._keys[]] + ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"} + } + >^; + }{ + [$x.nodeType] + } + + ^if(def $x.nodeValue){$x.nodeValue}
+ ^show_xnode1[$x.firstChild]($level+1) + ^if(!$single){ + ^show_xnode1[$x.nextSibling]($level) + } + + ^if($x.nodeType == $xnode:ELEMENT_NODE){ + ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;
+ } +} -@main[] -$xdoc[^xdoc::create{ - - string - -}] -$xdoc.search-namespaces.s[urn:special] -^xdoc.selectString[string(//s:code)] +@show_xdoc2[xdoc] +#$response:body[^xdoc.file[ $.media-type[text/paf] ]] +
^taint[html][^xdoc.string[
+#	$.method[html]
+#	$.encoding[utF-8]
+#  	$.omit-xml-declaration[yes]
+#	$.standalone[no]
+#	-$.doctype-public[-//W3C//DTD XHTML]
+#	-$.doctype-system[/a/b/c/]
+#	$.indent[yes]
+#	$.media-type[text/paf]
+]]
+