Annotation of parser3/src/www/htdocs/index.html, revision 1.478

1.399     parser      1: @main[]
1.477     paf         2: ^badoracequoting[]
                      3: #^badconstructors[]
1.475     paf         4: #^xloadwrongtable[]
1.476     paf         5: #^xsetwrongtable[]
1.473     paf         6: #^if($form:test){y}{n}
1.472     paf         7: #^tablecolumnerror[]
                      8: #^roll[]
1.471     paf         9: #^cookie2[]
1.470     paf        10: #^tableset[]
1.469     paf        11: #^math:PI.format{%.30f}
1.462     paf        12: #^xchildren[]
                     13: #^thashforeach3[]
1.461     paf        14: #^thashforeach2[]
                     15: #^thashforeach[]
1.458     paf        16: #^thashdelete[]
1.456     paf        17: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
1.454     paf        18: #^tappend[]
1.453     paf        19: #^sappend[]
1.452     paf        20: #^eval(10\3)<br>
1.450     paf        21: #^tform[]
1.448     paf        22: #^formattest[]
1.447     paf        23: #^filelist[]
1.443     paf        24: #^connect[mysql://user:pass@host]{ }
1.431     paf        25: #^безнадёжна_попытка_поправить_непоправимое[]
1.430     parser     26: #^tcache[]
1.460     paf        27: #^thashfileexp[]
1.468     paf        28: #^tcounter[]
1.423     parser     29: #^tablehash[]
1.443     paf        30: #j^hashfile[]
1.417     parser     31: #^formclass[]
1.415     parser     32: #^hren[]
1.475     paf        33: #^domedit[]
                     34: #^domxslt[]
1.402     parser     35: #^lsplit2[]
1.401     parser     36: #^faceesize[]
1.445     paf        37: #^imageresize[]
1.399     parser     38: #^ifassignhash[]
                     39: #^tintdefault[]
                     40: #$response:status[404]
1.390     parser     41: #^ifpasshash[]
1.387     parser     42: #^movedir[]
                     43: #^replace[]
1.416     parser     44: #^set[]
1.385     parser     45: #^hash[]<hr>
1.384     parser     46: #$t[^methresult[]] ->$t
1.382     parser     47: #^terror[]
1.378     parser     48: #^ssave[]
1.377     parser     49: #^calendar[]
1.376     parser     50: #^thash[]
1.373     parser     51: #^tdef[]
1.375     parser     52: #^ford[]
1.371     parser     53: #^tif[]
1.383     parser     54: #^image[]
1.369     parser     55: #^mail2[]
1.413     parser     56: #^cookie[]
1.365     parser     57: #^response[]
1.364     parser     58: #^regexp2[]
                     59: #^ttablerem[]
                     60: #^pcre[]
                     61: #^regexp[]<hr>
                     62: #^mail[]
                     63: #^exec[]
                     64: #^fori[]
1.468     paf        65: #^tconnect[]
1.470     paf        66: #^xslt[]
                     67: #^xml[]
1.364     parser     68: #^header[]
1.477     paf        69: <hr>
1.364     parser     70: OK
1.477     paf        71: 
                     72: @badoracequoting[]
                     73: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                     74: ^connect[$SQL.connect-string]{
1.478   ! paf        75: ^void:sql{delete from paf}
        !            76: ^void:sql{insert into paf values (1, '^taint[1'2'3]')}
        !            77: $paf[^table::sql{select * from paf}]
        !            78: ^paf.menu{
        !            79:        $paf.id: $paf.block<hr>
        !            80: 
1.477     paf        81: }
1.478   ! paf        82: <hr>
        !            83: 
1.477     paf        84: 
1.478   ! paf        85: ^rem{
1.477     paf        86: $news[^table::sql{select description from news}[$.limit(3)]]
                     87: ^news.menu{
                     88:        ^untaint{$news.description}<hr>
                     89: 
                     90: }
1.478   ! paf        91: <hr>
        !            92: }
        !            93: 
        !            94: $tables[^table::sql{select table_name from user_tables}]
        !            95: ^tables.menu{
        !            96: $tables.table_name<br>
        !            97: }
        !            98: 
1.477     paf        99: }
                    100: <hr>
                    101: $env:PATH
1.476     paf       102: 
                    103: @badconstructors[]
                    104: $bred[^string::length[]]
                    105: $bred[^response::clear[]]
                    106: $bred[^int::int[]]
                    107: 
1.475     paf       108: 
                    109: @xloadwrongtable[]
                    110: $constr[^xdoc::load[wrongtable.xml]]
                    111: 
                    112: @xsetwrongtable[]
                    113: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
                    114: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    115: 
1.471     paf       116: 
1.472     paf       117: @tablecolumnerror[]
                    118: $t[^table::set{a}]
                    119: $t.$a
                    120: 
1.471     paf       121: @roll[]
1.472     paf       122: #$date[^date::set(1970;1;2)]
                    123: #^date.roll[month](-1)
                    124: $date[^date::set(2038;1;1)]
1.471     paf       125: ^date.roll[month](+1)
                    126: $date.year  $date.month  $date.day
1.470     paf       127: 
                    128: @cookie2[]
                    129: #=$cookie:clientType[$.value[test]]=<br>
                    130: =$cookie:clientType=<br>
                    131: 
1.469     paf       132: 
                    133: @tableset[]
                    134: $a[^table::set{a
                    135: 1
                    136: 2}]
                    137: ^eval(100\$a)
                    138: 
                    139: 
                    140: 
                    141: @zzz[]
                    142: 
1.462     paf       143: 
                    144: $constructor[
                    145: <block1 name="main_srvr" type="0" label="Основное тело" />
                    146: <block2 name="main_srvr2" type="0" label="Основное тело" />
                    147: ]
                    148: 
                    149: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    150: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    151: 
                    152: $children[$constr.documentElement.childNodes]
                    153: ^if($children){
                    154: ^for[i](1;^children._count[]){
                    155:        $node[$children.$i]
                    156:        $node.nodeName<br>
                    157: }
                    158: }
                    159:    
1.461     paf       160: 
                    161: @thashforeach3[]
                    162: $h[
                    163:        $.a[1] 
                    164:        $.b[2]
                    165: ]
                    166: $c[^table::set{a
                    167: ^h.foreach[key;value]{$value
                    168: }}]
                    169: $c.a
                    170: 
                    171: @thashforeach2[]
                    172: $h[
                    173:        $.a[1] 
                    174:        $.b[2]
                    175: ]
                    176: $c[
                    177: ^h.foreach[key;value]{
                    178:        $.$key[$value]
                    179: }
                    180: ]
                    181: $c.b
1.458     paf       182: 
                    183: @thashforeach[]
                    184: $h[
                    185:        $.a[1] 
                    186:        $.b[2]
                    187: ]
                    188: ^h.foreach[key;value]{
                    189:        $key=$value<br>
                    190: }
1.457     paf       191: 
                    192: @thashdelete[]
                    193: $h[$.a[1] $.b[2]]
                    194: was:<br>
                    195: count=^h._count[] <br>
                    196: b='$h.b' <br>
                    197: 
                    198: ^h.delete[b] 
                    199: 
                    200: now:<br>
                    201: count=^h._count[] <br>
                    202: b='$h.b' 
1.452     paf       203: 
                    204: @sappend[]
                    205: $test[123]
                    206: ^test.save[test]
                    207: ^test.save[append;test]
                    208: 
1.453     paf       209: @tappend[]
                    210: $test[^table::set{a    b
                    211: a1     b1}]
                    212: ^test.save[test]
                    213: $test[^table::set{a    b
                    214: a2     b2}]
                    215: ^test.save[append;test]
1.452     paf       216: 
1.448     paf       217: 
                    218: @tform[]
1.449     paf       219: ^if(def $form:new_file){y}{n}
                    220: <form method="post" enctype="multipart/form-data">
                    221: <input type="file" name="new_file" />
1.448     paf       222: <input type=submit>
                    223: </input>
1.447     paf       224: 
                    225: @formattest[]
                    226: $size(15.124)
                    227: 
                    228: ^size.format{%.2f}
1.446     paf       229: 
                    230: @filelist[]
                    231: $html[^file:list[.;\.html^$]]
                    232: ^html.menu{
                    233:        $html.name<br>
                    234: }
                    235: <hr>
1.431     paf       236: 
                    237: @безнадёжна_попытка_поправить_непоправимое[]
                    238: $dom_from_disk[^xdoc::load[input.xml]]
                    239: $dom_created_in_air[^xdoc::create[doc]]
                    240: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
                    241: ^show-xdoc2[$dom_created_in_air]
                    242: 
1.426     parser    243: 
1.428     parser    244: @tcache[]
                    245: #^hashfile:clear[cache]
1.459     paf       246: $code[^hashfile::open[$DB_HOME;cache]]
1.430     parser    247: ^code.cache[key](2){
                    248:        ^math:random(100)
                    249: #      ^code.delete[]
1.428     parser    250: }
                    251: 
                    252: 
1.426     parser    253: @thashfileexp[]
1.459     paf       254: $hf[^hashfile::open[$DB_HOME;hashfile]]
1.428     parser    255: $hf.paf[$.value[крут] $.expires(3)]
                    256: paf=$hf.paf
1.459     paf       257: <hr>
                    258: ^hf.foreach[key;value]{
                    259:        $key=$value<br>
                    260: }
1.427     parser    261: <hr>
                    262: $hash[^hf.hash[]]
                    263: =$hash.paf=
                    264: <hr>
1.420     parser    265: 
1.423     parser    266: @tcounter[]
1.440     paf       267: ^tcounterone[$DB_HOME]
1.466     paf       268: other root:
                    269: ^tcounterone[${DB_HOME}2]
                    270: again, first:
                    271: ^tcounterone[$DB_HOME]
1.432     paf       272: 
                    273: @tcounterone[DB_HOME]
                    274: $counter[^hashfile::open[$DB_HOME;counter]]
1.440     paf       275: #^counter.clear[]
1.423     parser    276: ^counter.transaction{
                    277: #      $counter.value(10)
                    278:        $counter.value($counter.value+1)
                    279: #      ^counter.delete[value]
                    280:        $counter.value
                    281: }
1.424     parser    282: <hr>
1.432     paf       283: ^rem{
1.424     parser    284: $hash[^counter.hash[]]
1.425     parser    285: =$hash.value=
1.424     parser    286: <hr>
1.432     paf       287: }
1.423     parser    288: 
                    289: @tablehash[]
                    290: $productList[^table::set{id    name
                    291: 1      носки
                    292: 2      валенки
                    293: 3      ушанка
                    294: }]
                    295: 
                    296: #скажем, у первого дилера
                    297: $firstPriceList[^table::set{id price
                    298: 1      0.3
                    299: 3      1000
                    300: }]
                    301: 
                    302: $firstPriceHash[^firstPriceList.hash[id]]
                    303: 
                    304: ^productList.menu{
                    305:     продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
                    306: }
                    307: 
                    308: 
1.420     parser    309: @hashfile[]
                    310: $hf[^hashfile::assign[hashfile]]
1.423     parser    311: #$hf.paf[крут5]
1.420     parser    312: paf=$hf.paf
1.402     parser    313: 
1.417     parser    314: @formclass[]
                    315: ^$form:CLASS.a=$form:CLASS.a
                    316: 
1.406     parser    317: @domdata[]
1.418     parser    318: ^if(1){
1.422     parser    319: #      $a{^hren[]}
1.418     parser    320: }
1.419     parser    321: $a
1.408     parser    322: $xdoc[^xdoc::create[doc]]
                    323: $doc[$xdoc.documentElement]
1.473     paf       324: $name[^doc.appendChild[^xdoc.createElement[name]]]
1.474     paf       325: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
1.435     paf       326: ^untaint[as-is]{=$text.nodeValue=}
1.406     parser    327: 
                    328: @domedit[]
                    329: ^domdata[]
1.404     parser    330: #$paf.nodeName<br>
                    331: #$doc.documentElement.nodeName<br>
                    332: 
1.406     parser    333: ^show-xnode1[$xdoc.documentElement;0;1]
                    334: <hr>
                    335: ^show-xdoc2[$xdoc]
1.411     parser    336: <hr>
1.406     parser    337: 
                    338: @domxslt[]
                    339: ^domdata[]
1.405     parser    340: ^show-xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
1.411     parser    341: <hr>
1.401     parser    342: 
                    343: @lsplit2[]
                    344: $path[/optics/]
                    345: $pathTable[^path.lsplit[/]]
                    346: ^pathTable.menu{
                    347:        ^if(def $pathTable.piece){
                    348:                =$pathTable.piece=
                    349:        }
                    350: }
                    351: 
1.395     parser    352: 
1.397     parser    353: @faceesize[]
                    354: $k(2)
                    355: $pict[^image::load[paf.gif]]
                    356: $small[^image::create($pict.width/$k;$pict.height/$k)]
1.398     parser    357: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
1.397     parser    358: $response:body[^small.gif[]]
                    359: 
1.395     parser    360: @imageresize[]
                    361: $k(2)
                    362: $pict[^image::create(400*$k;200*$k)]
                    363: $pict.line-width(2)
1.444     paf       364: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                    365: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
1.395     parser    366: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1.444     paf       367: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
                    368: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
                    369: $response:body[^pict.gif[]]
1.395     parser    370: 
1.443     paf       371: #$small[^image::create($pict.width/$k;$pict.height/$k)]
1.396     parser    372: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
1.443     paf       373: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
1.395     parser    374: 
1.443     paf       375: #$response:body[^small.gif[]]
1.395     parser    376: 
1.388     parser    377: 
                    378: @tintdefault[]
                    379: #$abc[abc]
                    380: $abc[33]
                    381: ^abc.int[z]
                    382: #^abc.int(123)
1.390     parser    383: 
                    384: @ifassignhash[]
                    385: $h[^if(1){$.a(1);$.a(2)}]
                    386: $h.a
1.387     parser    387: 
                    388: @ifpasshash[]
                    389: $a[$.e[a]]
                    390: $b[$.e[b]]
1.389     parser    391: ^ifpasshashdest[^if(1){$a;$b}]
1.387     parser    392: #$x[^if(1){$a}{$b}]
                    393: #^ifpasshashdest[$x]
                    394: 
                    395: @ifpasshashdest[p]
                    396: $p.e
                    397: 
                    398: @movedir[]
                    399: ^file:move[a;deeper/a]
1.386     parser    400: 
                    401: @replace[]
                    402: $a[12^;3]
                    403: ^a.replace[^table::set{from    to
                    404: 2^;    !
                    405: }]
                    406: 
1.385     parser    407: 
                    408: @set[]
                    409: ^setdata[]
                    410: ^a.add[$b]
                    411: add:$a.3<br>
                    412: 
                    413: ^setdata[]
                    414: ^a.sub[$b]
                    415: sub2:$a.2<br>
                    416: sub1:$a.1<br>
                    417: 
                    418: ^setdata[]
                    419: $c[^a.union[$b]]
                    420: union3:$c.3<br>
                    421: union2:$c.2<br>
                    422: 
                    423: ^setdata[]
                    424: $c[^a.intersection[$b]]
                    425: intersection3:$c.3<br>
                    426: intersection2:$c.2<br>
                    427: 
                    428: ^setdata[]
                    429: intersects:^if(^a.intersects[$b]){y;n}<br>
                    430: intersects2:^if(^a.intersects[ ]){y;n}<br>
                    431: 
                    432: 
                    433: <hr>
                    434: 
                    435: @setdata[]
                    436: $a[$.1[a1] $.2[a2]]
                    437: $b[        $.2[b2] $.3[b3]]
                    438: 
1.383     parser    439: 
1.384     parser    440: @hash[]
                    441: $h[^hash::create[$._default[123]]]
                    442: $h.paf[not kretin]
                    443: $h.paf<br>
                    444: =$h.that=<br>
                    445: 
                    446: @methresult[]
                    447: $result[^table::set{1}]
1.377     parser    448: 
1.381     parser    449: @terror[]
                    450: ^error[method z must be called with z]
                    451: 
1.380     parser    452: @syntax1[]
                    453: #^a[^b]
                    454: 
                    455: @syntax2[]
1.381     parser    456: #^a[
1.379     parser    457: 
1.377     parser    458: @ssave[]
                    459: $abc[abc]
                    460: ^abc.save[abc]
1.376     parser    461: 
                    462: @calendar[]
                    463: 2001;11:<br>
                    464: $week_days[^date:calendar[rus](2001;11)]
                    465: <pre>
                    466: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday;&nbsp^;&nbsp^;} }<br>}
                    467: </pre>
1.372     parser    468: 
1.375     parser    469: @thash[]
                    470: $table[^table::set{id  name    age
                    471: 1      paf     278
                    472: 2      пиф     234
                    473: }]
                    474: $hash[^table.hash[id;^table::set[nameless]{id
                    475: name}]]
                    476: $hash.2.id $hash.2.name $hash.2.age
                    477: 
1.372     parser    478: @tdef[]
                    479: $s[0]
                    480: if 0=^if($s){}{n}<br>
                    481: if def 0=^if(def $s){y}{}<br>
                    482: <hr>
1.371     parser    483: 
                    484: @ford[]
1.374     parser    485: ^for[i](0;5){$i}{($i)}
1.368     parser    486: 
1.370     parser    487: @tif[]
                    488: ^if[def]{y;n}
                    489: 
1.368     parser    490: @image[]
                    491: $pict[^image::create(400;200)]
1.379     parser    492: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                    493: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
                    494: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                    495: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
                    496: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
1.368     parser    497: $response:body[^pict.gif[]]
                    498: 
                    499: 
1.366     parser    500: 
1.369     parser    501: @mail2[]
1.367     parser    502: ^mail:send[
1.369     parser    503:        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                    504:        $.from[Александр Петросян <paf@design.ru>]
1.367     parser    505:        $.to[Александр Петросян <paf@design.ru>]
1.369     parser    506:        $.subject[проверка]
                    507:        $.body[проверка]
1.367     parser    508: ]
                    509: 
1.366     parser    510: @cookie[]
1.367     parser    511: $env:HTTP_COOKIE<br>
                    512: 
                    513: #$cookie:переменная[test тест ТЕСТ2]
                    514: =$cookie:переменная=<br>
                    515: #$cookie:переменная2[test тест ТЕСТ3]
                    516: =$cookie:переменная2=<br>
1.412     parser    517: =$cookie:CLASS.переменная2=<br>
1.365     parser    518: 
                    519: @response[]
                    520: #^if($form:reload){
                    521:        $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
                    522: #}
1.364     parser    523: 
                    524: @xslt[]
                    525: ^xdata[]
1.407     parser    526: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
                    527: ^show-xdoc2[$transformed]
1.364     parser    528: 
                    529: @regexp2[]
                    530: $s[  select]
                    531: $s[^s.match[^^\s*][]{!}]
                    532: $s
                    533: 
                    534: @header[]
                    535: $response:refresh[
                    536:        $.value[0]
                    537:        $.url[http://design.ru?a=^taint[123]]
                    538: ]
                    539: 
                    540: @ttablerem[]
                    541: $table[^table::load[a.cfg]]
                    542: ^table.menu{$table.a}
                    543: 
                    544: @tconnect[]
                    545: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
                    546: $tables[^table::sql{show tables}]
                    547: #$cols[^tables.columns[]]
                    548: #$cols.column
                    549: ^tables.menu{
                    550:        $tables.[Tables_in_test]<br>
                    551: }
                    552: }
                    553: 
                    554: @pcre[]
                    555: $s[1 2]
                    556: ^s.match[\s;ig]{!}
                    557: #^s.match[\d;ig]{!}
                    558: 
                    559: 
                    560: @regexp[]
                    561: $s[abcАБВ]
                    562: ^if(^s.match[б][i]){y}{n}
                    563: 
                    564: @mail[]
                    565: #$ORIGINS(1)
                    566: ^mail:send[
                    567:        $.from[paf@design.ru]
                    568:        $.to[paf@design.ru]
                    569:        $.body[1
                    570:        
                    571:        2
                    572:        
                    573:        
                    574:                3]
                    575: ]
                    576: 
                    577: @exec[]
1.370     parser    578: $a[^file::exec[fc.exe;;a;b]]
1.364     parser    579: $a.status|$a.stderr<hr>
                    580: 
                    581: @fori[][i]
                    582: ^for[i](1;3){... =$i= ...}
                    583: 
                    584: @xdata[]
                    585: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1.468     paf       586: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                    587: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                    588: 
                    589: <people>
                    590:        <man id="1" имя="word слово">
                    591:                <name>P&#171^;AF        B</name>
                    592:        </man>
                    593:                <man id="2">
                    594:                        <name>ПИФ^taint[&]</name>
                    595:                </man>
                    596: </people>
                    597: }]
1.364     parser    598: 
                    599: @xml[]
                    600: ^xdata[]
                    601: 
                    602: ^show-xdoc2[$xdoc]<hr>
                    603: #^show-xnode1[$xdoc]<hr>
                    604: $people[^xdoc.select[*/man]]
                    605: #^show1[]
                    606: ^show-xnodes1[$people]<hr>
                    607: #^people.0.owner.hren[]
                    608: 
1.393     parser    609: ^show-xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
1.364     parser    610: 
                    611: by id:
                    612: ^show-xnode1[^xdoc.getElementById[1];0;1]
                    613: <hr>
                    614: 
                    615: @show1[array]
                    616: ^for[i](0;^array._count[]-1){
                    617:     $x[$array.$i]
                    618:        $x.firstChild.nodeValue: 
                    619:                $pattributes[$x.parentNode.attributes]
                    620:                ^if(^pattributes._count[]){
                    621:                        $pattributes.id.name=$pattributes.id.nodeValue
                    622:                }
                    623:        <br>
                    624: }
                    625:        
                    626: @show-xnodes1[array][i]
                    627: ^for[i](0;^array._count[]-1){
                    628:        ^show-xnode1[$array.$i;0;1]
                    629: }
                    630: 
                    631: @show-xnode1[x;level;single][l]
                    632: ^if(def $x){
                    633:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
                    634:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                    635:        &lt^;$x.nodeName
                    636:            $pairs[$x.attributes]
                    637:            ^if(def $pairs){
                    638:                $names[^pairs._keys[]]
                    639:                ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
                    640:            }
                    641:            &gt^;
                    642:     }{
                    643:        [$x.nodeType]
                    644:     }
                    645:     
                    646:     ^if(def $x.nodeValue){$x.nodeValue}<br>
                    647:     ^show-xnode1[$x.firstChild]($level+1)
                    648:     ^if(!$single){
                    649:            ^show-xnode1[$x.nextSibling]($level)
                    650:     }
                    651: 
                    652:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                    653:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
                    654:     }
                    655: }
                    656: 
                    657: @show-xdoc2[xdoc]
1.473     paf       658: ^xdoc.save[out/save.xml;
1.364     parser    659: #      $.encoding[windows-1251]
                    660:        $.method[xml]
                    661: ]
                    662: $file[^xdoc.file[
                    663: #      $.encoding[windows-1251]
                    664:        $.method[html]
                    665: ]]
1.473     paf       666: ^file.save[text;out/save_file.html]
1.463     paf       667: <pre>^taint[^xdoc.string[]]
1.364     parser    668: #      $.encoding[windows-1251]
1.413     parser    669: #      $.method[html]
1.364     parser    670: #]]
1.413     parser    671: </pre>
1.435     paf       672: 

E-mail: