--- parser3/www/htdocs/Attic/_bug.html 2004/08/03 11:18:22 1.61
+++ parser3/www/htdocs/Attic/_bug.html 2005/12/16 15:08:53 1.113
@@ -1,89 +1,101 @@
-# 20040623 paf@design.ru
+@main[]
+$xdoc[^xdoc::create{
+
+
+
+
+ ПИФ^taint[&]
+
+
+ P«^;AF B
+
+
+}]
+
+^dump[$xdoc]
-#neptune: parser upgraded, $.bind[
-#$.name[^taint[uri][]] %xx%xx...
+^xdoc.documentElement.firstChild.nextSibling.getAttributeNS[http://parser.ru/first;attrname]!
+^xdoc.documentElement.lastChild.previousSibling.setAttributeNS[http://parser.ru/second;second:attrname2;value 2]
-@main[]
-^connect[oracle://igs:pwd@oracle]{
+^dump[$xdoc]
+
+^rem{
+^㧥.removeAttributeNS[namespaceURI;localName] [3.1.1]
-^rem{
- $vars[
- $.puserisn(1)
- $.poper[create]
- $.pform[name1=value1&name2=value2]
- $.pPremium(0)
- $.pid(0)
- $.pisn(0)
- ]
- ^void:sql{call iagency.doMotorAgr(
- :puserisn, -- (),
- :poper, -- calc - , create -
- :pform, -- =&:
- :pPremium, --
- :pid, -- ( )
- :pisn, -- ( )
- null, --
- null --
- )}[
- $.bind[$vars]
- ]
- ^show[puserisn]
- ^show[poper]
- ^show[pid]
- ^show[pisn]
-
+$Attr[^㧥.getAttributeNodeNS[namespaceURI;localName]] [3.1.1]
- OK
-}
+$Attr[^㧥.setAttributeNodeNS[$newAttr]] [3.1.1]
- $varsl[
- $.pname[igs]
- $.pwd[create]
- $.pisn[x]
- $.pres[]
- ]
-
- ^void:sql{call iagency.login(
- :pname,
- :pwd,
- :pisn,
- :pres
- )}[
- $.bind[$varsl]
- ]
-
- $varsl.pisn
- $varsl.pres
+$NodeList[^㧥.getElementsByTagNameNS[namespaceURI;localName]]
+^if(^㧥.hasAttribute[name]){:} [3.1.1]
+^if(^㧥.hasAttributeNS[namespaceURI;localName]){:} [3.1.1]
+
+^show_xnode1[$xdoc.doctype]
+}
+
+
+@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[name]
-$name=$vars.$name
-
-
-@x[]
- $MotorBrands[
- $.v[2]
- ]
-
- $a[^table::sql{
- SELECT
- isn,
- shortname name,
- nvl(code,'0') code
- FROM
- ais.dicti
- WHERE
- parentisn=:v
- and active is not null
- ORDER BY
- shortname
- }[
- $.bind[$MotorBrands]
- ]
- ]
+@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]
+]]
+