--- parser3/www/htdocs/Attic/_bug.html 2004/06/23 08:59:52 1.51 +++ parser3/www/htdocs/Attic/_bug.html 2005/12/16 15:08:53 1.113 @@ -1,123 +1,101 @@ @main[] -^connect[oracle://mts_imprimatur2:imp2@mts]{ -# ^in[] -# ^out[] -# ^inout[] -# ^ex[] -# ^ex2[] -# ^ex3[] - ^ex4[] - OK -} +$xdoc[^xdoc::create{ + + + + + ПИФ^taint[&] + + + P«^;AF B + + +}] + +^dump[$xdoc] + +^xdoc.documentElement.firstChild.nextSibling.getAttributeNS[http://parser.ru/first;attrname]! + +^xdoc.documentElement.lastChild.previousSibling.setAttributeNS[http://parser.ru/second;second:attrname2;value 2] + +^dump[$xdoc] + +
+^rem{ + +^㧥.removeAttributeNS[namespaceURI;localName] [3.1.1] + +$Attr[^㧥.getAttributeNodeNS[namespaceURI;localName]] [3.1.1] -@inp[] -create table pif(a integer); -create or replace procedure paf(a in integer) as begin -insert into pif (a) values (:a); -end; -/ - -@in[] -# ^void:sql{create table paf(a clob)} -# ^void:sql{insert into paf (a) values (/**a**/'a')} -# ^void:sql{insert into paf (a) values (:unk)} - ^void:sql{delete from pif} - ^void:sql{call paf(:a)}[ - $.bind[ - $.a[2] - ] - ] - ^int:sql{select count(*) from pif} - "^string:sql{select a from pif}" - -# ^string:sql{select a from paf} - -@outp[] -create or replace procedure pafm(ai in integer,ao out integer) as begin -ao:=ai; -end; -/ -@out[] - $vars[ - $.ai(2222) - $.ao[sad] - ] - ^void:sql{call pafm(:ai,:ao)}[ - $.bind[$vars] - ] - "$vars.ai" - "$vars.ao" - -# ^string:sql{select a from paf} - -@inoutp[] -create or replace procedure pafio(aio in out integer) as begin -aio:=aio*2; -end; -/ -@inout[] - $vars[ - $.aio(2222) - ] - before "$vars.aio"
- ^void:sql{call pafio(:aio)}[ - $.bind[$vars] - ] - after "$vars.aio" - -# ^string:sql{select a from paf} - -@exp[] -create or replace procedure pafex is -begin -DECLARE - out_of_stock EXCEPTION; -begin - raise out_of_stock; - end; -end; -/ -@ex[] -^void:sql{ -begin -pafex^; -end^; +$Attr[^㧥.setAttributeNodeNS[$newAttr]] [3.1.1] + +$NodeList[^㧥.getElementsByTagNameNS[namespaceURI;localName]] + +^if(^㧥.hasAttribute[name]){:} [3.1.1] + +^if(^㧥.hasAttributeNS[namespaceURI;localName]){:} [3.1.1] + +^show_xnode1[$xdoc.doctype] } -@ex[] -^void:sql{call pafex()} +
-@exp2[] -create or replace procedure pafex2 is -begin - raise ZERO_DIVIDE; -end; -/ -@ex2[] -^void:sql{call pafex2()} - - -@exp3[] -create or replace procedure pafex3 is -begin -DECLARE - out_of_stock EXCEPTION; - PRAGMA EXCEPTION_INIT(out_of_stock, -333); -begin - raise out_of_stock; - end; -end; -/ -@ex3[] -^void:sql{call pafex3()} - - -@exp4[] -create or replace procedure pafex4 is -begin - raise_application_error(-20444, 'Salary is missing'); -end; -/ -@ex4[] -^void:sql{call pafex4()} +@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] +} +@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>^;
+ } +} +@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]
+]]
+