Annotation of parser3/www/htdocs/index.html, revision 1.42

1.42    ! paf         1: @USE
        !             2: t.p
1.15      paf         3: 
                      4: @autoz[]
                      5: $request:charset[windows-1251]
                      6: $response:charset[windows-1251]
                      7: $response:content-type[$.value[text/html]$.charset[$response:charset]]
                      8: 
1.38      paf         9: #@postprocess[body]
                     10: #<b>$body</b>
                     11: #$result[123]
1.37      paf        12: 
1.15      paf        13: @main[]
1.42    ! paf        14: ^b:method[]
        !            15: #^main[]
1.41      paf        16: #^errort[]
1.40      paf        17: #^tselectNumber[]
1.39      paf        18: #$result[hello]
1.36      paf        19: #^invaliddate2[]
                     20: #^process2[]
                     21: #^casehashtext[]
1.35      paf        22: #^subjvaltest[]
                     23: #^tableselect0[]
1.34      paf        24: #^memnotest1[]
1.33      paf        25: #^transparams[]
1.32      paf        26: #^voidparams[]
1.31      paf        27: #^rolls2[]
1.30      paf        28: #^cacheexpireschanging[]
1.29      paf        29: #^cacheexpiresfixed[]
                     30: #^dateoffsets[]
                     31: #^exceptionTypes[]
1.28      paf        32: #^roll2[]
1.27      paf        33: #^rolls[]
1.25      paf        34: #^exceptions1[]
1.22      paf        35: #^locate_by_expr[]
1.18      paf        36: #^method_junction_params{...}
1.17      paf        37: #^verifyCookie[paf]
1.37      paf        38: #^execlangs[]
1.16      paf        39: #$t[^tobjeresult[]]$t.a
                     40: #^xmlprobs[]
1.15      paf        41: #^doubleprobs[]
                     42: #^math:random(-10)
                     43: #^divnamestop[]
                     44: #^arrayclone[]
                     45: #^operator_tricks[]
                     46: #^xoutputrusattr[]
                     47: #^xdocset1[]
                     48: #^regexp3[]
                     49: #^exec2[]
                     50: #^tlock[]
                     51: #^xmloutattrwithoutvalue[]
                     52: #^precisionProblem[]
                     53: #^xpath[]
                     54: #^ttablesetlang[]
                     55: #^mail3[]
                     56: #^ttime[]
                     57: #^tupper[]
                     58: #^treplace[]
                     59: #^xslt2[]
                     60: #^tcache2[]
                     61: #$ORIGINS(1)
                     62: #$t[^table::set{a b} ^table::set{c d}]
                     63: #^ttaintuntaint[]
                     64: #^tappend2[]
                     65: #^badvsnprintf[]
                     66: #^badoracequoting[]
                     67: #^badconstructors[]
                     68: #^xloadwrongtable[]
                     69: #^xsetwrongtable[]
                     70: #^if($form:test){y}{n}
                     71: #^tablecolumnerror[]
                     72: #^roll[]
                     73: #^cookie2[]
                     74: #^tableset[]
                     75: #^math:PI.format{%.30f}
                     76: #^xchildren[]
                     77: #^thashforeach3[]
                     78: #^thashforeach2[]
                     79: #^thashforeach[]
                     80: #^thashdelete[]
                     81: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
                     82: #^tappend[]
                     83: #^sappend[]
                     84: #^eval(10\3)<br>
                     85: #^tform[]
                     86: #^formattest[]
                     87: #^filelist[]
                     88: #^connect[mysql://user:pass@host]{ }
                     89: #^безнадёжна_попытка_поправить_непоправимое[]
                     90: #^tcache[]
                     91: #^thashfileexp[]
                     92: #^tcounter[]
                     93: #^tablehash[]
                     94: #j^hashfile[]
                     95: #^formclass[]
                     96: #^hren[]
                     97: #^domedit[]
                     98: #^domxslt[]
                     99: #^lsplit2[]
                    100: #^faceesize[]
                    101: #^imageresize[]
                    102: #^ifassignhash[]
                    103: #^tintdefault[]
                    104: #$response:status[404]
                    105: #^ifpasshash[]
                    106: #^movedir[]
                    107: #^replace[]
                    108: #^set[]
                    109: #^hash[]<hr>
                    110: #$t[^methresult[]] ->$t
                    111: #^terror[]
                    112: #^ssave[]
                    113: #^calendar[]
                    114: #^thash[]
                    115: #^tdef[]
                    116: #^ford[]
                    117: #^tif[]
                    118: #^image[]
                    119: #^mail2[]
                    120: #^cookie[]
                    121: #^response[]
                    122: #^regexp2[]
                    123: #^ttablerem[]
                    124: #^pcre[]
                    125: #^regexp[]<hr>
                    126: #^mail[]
                    127: #^exec[]
                    128: #^fori[]
                    129: #^tconnect[]
                    130: #^xslt[]
                    131: #^xml[]
                    132: #^header[]
                    133: <hr>
                    134: OK
1.40      paf       135: 
                    136: @errort[]
1.42    ! paf       137: ^xdoc::create[a]
1.40      paf       138: #^throw[user;here;this]
                    139: 
                    140: @tselectNumber[]
                    141: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет" n="123"/>}]
                    142: ^d.selectString[string(d/@attr)]<br>
                    143: ^d.selectNumber[2*2]<br>
                    144: ^d.selectNumber[number(/d/@n)+1]<br>
                    145: 
1.34      paf       146: 
1.36      paf       147: @invaliddate2[]
                    148: $d[^date::create(1018946575/60/60)] ^d.sql-string[]
                    149: 
                    150: @process2[]
                    151: ^^process{
                    152:        ^process{
                    153:                ^$a[^^if(0){^$.k[y]}{^$.k[^^hren[]n]}] ^$a.k
                    154:        }
                    155: }
                    156: 
1.35      paf       157: @casehashtext[]
                    158: $tt[1]
                    159: $tmp[
                    160:         ^switch[$tt]{
                    161:                 ^case[1]{
                    162:                         $.aaa[123]
                    163:                 }
                    164:                 ^case[DEFAULT]{
                    165:                         $.bbb[456]
                    166:                 }
                    167:         }
1.36      paf       168:         shit!
1.35      paf       169: ]
1.36      paf       170: #$tmp
1.35      paf       171: $tmp.aaa
                    172: 
                    173: @subjvaltest[]
                    174: $a12[val]
                    175: $b[12]
                    176: $a$b
                    177: 
1.34      paf       178: @tableselect0[]
                    179: $person[^table::create{name    height
                    180: paf    1.77
                    181: шохин  2.07
                    182: moko   1.77
                    183: }]
                    184: $nottoohigh[^person.select($person.height<2)]
                    185: ^nottoohigh.menu{$nottoohigh.name<br>}
1.32      paf       186: 
                    187: @transparams[]
                    188: $idoc[^xdoc::create{<?xml version="1.0" ?><doc/>}]
                    189: $odoc[^idoc.transform[global.xsl;
                    190:        $.param1['1']
                    191:        $.param2['2']
                    192: ]]
                    193: <pre>^taint[^odoc.string[$.method[html]]]
                    194: 
                    195: @memnotest1[]
                    196: ^for[i](0;4000){
                    197: 
                    198:  $xxxx[$i]
                    199:  $xxxx
                    200: 
                    201: }
                    202: 
                    203: @memnotest1notes[]
                    204: одна итерация цикла:
                    205: [Mon Apr  8 20:12:02 2002] execution-------------------------|
1.35      paf       206: '469641+=28 wcodeframe -> 0 !optimize[3]''469669+=49 string от {} -> 0 optimize[3]'
1.32      paf       207: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                    208: [Mon Apr  8 20:12:02 2002]  "|| "
                    209: [Mon Apr  8 20:12:02 2002] 12:WITH_ROOT
                    210: [Mon Apr  8 20:12:02 2002] 13:VALUE
                    211: [Mon Apr  8 20:12:02 2002]  "xxxx" string
1.35      paf       212: [Mon Apr  8 20:12:02 2002] 14:CREATE_EWPOOL'469377+=24 wcodeframe -> 0 !optimize[1]''469401+=49 string -> 41 !optimize[7]'
1.32      paf       213: [Mon Apr  8 20:12:02 2002] 16:WITH_READ
                    214: [Mon Apr  8 20:12:02 2002] 17:VALUE
                    215: [Mon Apr  8 20:12:02 2002]  "i" string
                    216: [Mon Apr  8 20:12:02 2002] 18:GET_ELEMENT
1.35      paf       217: [Mon Apr  8 20:12:02 2002] 17:WRITE_VALUE'469452+=40 MAX_NUMBER -> !~2 actual digits''469492+=49 -> 41 !'
                    218: [Mon Apr  8 20:12:02 2002] 16:REDUCE_EWPOOL'469541+=24 VString -> 0 optimize[5]'
1.32      paf       219: [Mon Apr  8 20:12:02 2002] 15:CONSTRUCT_VALUE
                    220: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
                    221: [Mon Apr  8 20:12:02 2002]  "| "
                    222: [Mon Apr  8 20:12:02 2002] 12:WITH_READ
                    223: [Mon Apr  8 20:12:02 2002] 13:VALUE
                    224: [Mon Apr  8 20:12:02 2002]  "xxxx" string
                    225: [Mon Apr  8 20:12:02 2002] 14:GET_ELEMENT
                    226: [Mon Apr  8 20:12:02 2002] 13:WRITE_VALUE'469573+=41 string expand nothing for now'
                    227: [Mon Apr  8 20:12:02 2002] 12:STRING__WRITE
1.35      paf       228: [Mon Apr  8 20:12:02 2002]  "||"'469617+=24 VString -> 0 !optimize[6]'
1.32      paf       229: [Mon Apr  8 20:12:02 2002] <-ja returned
                    230: [Mon Apr  8 20:12:02 2002] ja->
                    231: 
                    232: 201/328=0.612804878049 %%optimized
                    233: 
                    234: 1.
                    235: CREATE_*POOL
                    236:     сделать
                    237: *POOL_POOLED+CODE
                    238:     где
                    239:         wwrapper
                    240:         и(возможно) wcodeframe
                    241:         +string
                    242:         стековая переменная
                    243: 
                    244: 2.
                    245: избавиться от обёртки при возврате результата process [см. тело _for]
                    246: 
                    247: 3.
                    248: сделать callback для process, чтобы вынести invariants из _for & co.
                    249: 
                    250: 4.
                    251:  @todo склеить get_element и write_value (при вставлении? write_value)
                    252: 
                    253: 5.
                    254: reduce_*pool -> вариант получить именно string, без VString обёртки [часто
                    255: обёртка сразу выбрасывается = не нужна]
                    256: 
                    257: 6.
                    258: process вариант получить именно string, без VString обёртки [часто обёртка
                    259: сразу выбрасывается = не нужна]
                    260: 
                    261: 7.
                    262: string head, убить 8 байт неправильной link
1.31      paf       263: 
                    264: @voidparams[]
                    265: ^voidparamsm[$form:field]
                    266: 
                    267: @voidparamsm[p]
                    268: ^p.int(123)
1.29      paf       269: 
1.30      paf       270: @rolls2[]
                    271: $now[^date::now[]]
                    272: $d[^date::create($now.year;$now.month)] ^d.sql-string[]<br>
                    273: ^for[i](1;12){
                    274:        ^d.roll[month](-1) ^d.sql-string[]<br>
                    275: }
                    276: 
1.29      paf       277: @cacheexpireschanging[]
                    278: ^cache[$DB_HOME/keyключ][^date::now(+1)]{ ^rem{1 day}
                    279:     ^cache[^date::now(+4/24/60/60)]
                    280: #    ^cache(2)
1.30      paf       281: #    ^cache(0)
1.29      paf       282:        ^math:random(100)
                    283: }
                    284: 
                    285: 
                    286: 
                    287: @cacheexpiresfixed[]
                    288: ^cache[$DB_HOME/keyключ][^date::now(+2/24/60/60)]{
                    289:        ^math:random(100)
                    290: }
                    291: 
                    292: @dateoffsets[]
                    293: $d[^date::create(^date::now[]+1/24/60)]
                    294: #$d[^date::now(+1/24/60)]
                    295: ^d.sql-string[]
                    296: #$d
1.26      paf       297: 
1.28      paf       298: @exceptionTypes[]
                    299: #    parser.compile       ^test[}                компиляция (непарная скобка, ...)
                    300: #    parser.runtime       ^if(0).                параметры (больше/меньше, чем нужно, не тех типов, ...)
                    301: #    number.zerodivision  ^eval(1/0) ^eval(1%0)
                    302: #    number.format        ^eval(abc*5)
                    303: #    file.missing         ^file:delete[delme]                       not found
                    304: #    file.access          ^table::load[.]                       no rights
                    305: #    image.format         ^image::measure[index.html]                        not gif/jpg
                    306: #    sql.connect          ^connect[mysql://baduser:pass@host/db]{}                       not found/timeout
                    307: #    sql.execute          ^connect[mysql://okuser:pass@host/db]{^void:sql{select bad}}                       syntax error
                    308: #    xml                  ^xdoc::create{<forgot?>}                       any error in xml/xslt libs
                    309: #    smtp.connect                                not found/timeout
                    310: #    smtp.execute                                communication error
                    311: 
1.26      paf       312: @roll2[]
                    313: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
1.27      paf       314: ^d.roll[day](+365*3+1) ^d.sql-string[]<br>
1.26      paf       315: 
1.25      paf       316: 
                    317: @rolls[]
                    318: $d[^date::create(2002;4;4)]
                    319: ^d.sql-string[]<br>
                    320: ^for[i](1;7){
                    321: ^d.roll[day](-1)
                    322: ^d.sql-string[]<br>
                    323: }
                    324: <hr>
                    325: $d[^date::create(2002;3;28)]
                    326: ^d.sql-string[]<br>
                    327: ^for[i](1;7){
                    328: ^d.roll[day](+1)
                    329: ^d.sql-string[]<br>
                    330: }
                    331: <hr>
                    332: $d[^date::create(2002;12;3)]
                    333: ^d.sql-string[]<br>
                    334: ^for[i](1;14){
                    335: ^d.roll[day](-1)
                    336: ^d.sql-string[]<br>
                    337: }
                    338: <hr>
                    339: $d[^date::create(2002;10;19)]
                    340: ^d.sql-string[]<br>
                    341: ^for[i](1;14){
                    342: ^d.roll[day](+1)
                    343: ^d.sql-string[]<br>
                    344: }
                    345: 
                    346: 
                    347: 
                    348: 
                    349: 
1.22      paf       350: 
                    351: @exceptions1[]
                    352: ^try{
                    353:        aaa
1.24      paf       354:        ^throw[custom1;paf;is stupid]
1.22      paf       355: }{
1.24      paf       356:        ^if($exception.type eq custom1){
1.28      paf       357: #              $exception.handled(1)
                    358:        ^throw[$exception]
1.24      paf       359:                type=$exception.type<br>
                    360:            source=$exception.source<br>
                    361:            file=$exception.file<br>
                    362:            lineno=$exception.lineno<br>
                    363:        comment=$exception.comment<br>
                    364:        }
1.22      paf       365: }
1.21      paf       366: 
                    367: @locate_by_expr[]
                    368: $t[^table::create{a    b
                    369: 1      nok
                    370: 2      ok
                    371: 3      nok
                    372: }]
                    373: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17      paf       374: 
                    375: @method_junction_params[param]
                    376: ^if($param is junction){junction}{ne junction}
                    377: 
                    378: @verifyCookie[value] 
                    379: ^if($cookie:dummyvote eq $value){ 
                    380:        $result(1) 
                    381: }{ 
                    382:        $cookie:dummyvote[$value] 
                    383:        $result(0) 
                    384: }
1.16      paf       385: 
                    386: @execlangs[]
1.20      paf       387: $f[^file::exec[test.pl]]
1.36      paf       388: err:$f.stderr<br>
1.16      paf       389: ^process{$f.text}
                    390: #$c[^t.columns[]]
                    391: #^c.menu{
                    392: #* $c.column<br>
                    393: #}
1.36      paf       394: c:$t.c<br>
1.16      paf       395: 
                    396: @tobjeresult[]
                    397: ^table::create{a
                    398: 12}
1.15      paf       399: 
                    400: @xmlprobs[]
                    401: $xmlDataType[^xdoc::load[program.xml]]
                    402: #<pre>^taint[^xmlDataType.string[]]
                    403: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
                    404: #=^xmlDataTypes._count[]=
                    405: =^xmlDataTypes.0.getAttribute[type-id]=
                    406: 
                    407: @doubleprobs[]
                    408: $1(^math:radians(180))
                    409: $2($math:PI)
                    410: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
                    411: ^if($1==$2){y;n}
                    412: ^if(^math:radians(180)==$math:PI){y;n}
                    413: 
                    414: 
                    415: @divnamestop[]
                    416: $a(10)
                    417: ^eval($a\3)
                    418: 
                    419: @arrayclone[]
                    420: $t[^table::create{a    b
                    421: 1      11
                    422: 2      22
                    423: }]
                    424: $c[^table::create[$t]]
                    425: ^c.append{2    33}
                    426: ^t.count[]
                    427: ^c.count[]
                    428: 
                    429: @operator_tricks[]
                    430: ^if(1){$a[^t[]]}
                    431: $a!
                    432: $a($b)
                    433: ^if(1){y}{n}
                    434: $MAIN:a(^t[] eq OK)
                    435: #$MAIN:a(1)
                    436: ^if($a){y}{n}
                    437: #^if(1){y}{n}
                    438: $form:if
                    439: $a[$.n[1]]
                    440: $a.if
                    441: 
                    442: @xoutputrusattr[]
                    443: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
                    444: ^show_xdoc2[$d]
                    445: 
                    446: @xdocset1[]
                    447: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
                    448: ^show_xdoc2[$d]
                    449: 
                    450: @regexp3[]
                    451: $s[abcАБВ]
                    452: ^if(^s.match[][i]){y}{n}
                    453: 
                    454: 
                    455: @exec2[]
                    456: $a[^file::exec[bin/t.cmd]]
                    457: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
                    458: 
                    459: 
                    460: @tlock[]
                    461: ^file:lock[lockfile]{
                    462:        code
                    463: }
                    464: 
                    465: @xmloutattrwithoutvalue[]
                    466: #$ORIGINS(1)
                    467: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
                    468: $doc[^doc.transform[global.xsl]]
                    469: =^taint[html][^doc.string[$.method[html]]]=
                    470: 
                    471: 
                    472: 
                    473: @precisionProblem[]
                    474: $a[123456789012345678901234567890]
                    475: $b(^a.double[])
                    476: ^b.format{%.20E}
                    477: <hr>
                    478: ^eval(2*2)
                    479: 
                    480: @xpath[]
                    481: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    482: <document><block><p>привет</p></block></document>
                    483: }]
                    484: #^show_xdoc2[$xdoc]
                    485: $node[^xdoc.selectSingle[/document/block/p]]
                    486: ^if(def $node){
                    487:        ^if($node is string){
                    488:                $node
                    489:        }{
                    490:        ^if($node is hash){
                    491:                ^node._count[]
                    492:        }{
                    493:                $node.nodeType
                    494:        }
                    495:        }
                    496: #$node.firstChild.nodeValue
                    497: }{
                    498:        node not found
                    499: }
                    500: 
                    501: 
                    502: @ttablesetlang[]
                    503: $a-tab-b[a     b
                    504: 1      2]
                    505: 
                    506: $t[^table::set{$a-tab-b}]
                    507: =$t.a=
                    508: <hr>
                    509: 
                    510: $t[^table::set[nameless]{^taint[$a-tab-b]}]
                    511: =$t.0=
                    512: <hr>
                    513: 
                    514: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
                    515: =$t.a=
                    516: 
                    517: #^t.append{1   2}
                    518: 
                    519: @mail3[]
                    520: ^mail:send[
                    521:        $.from[Александр Петросян <paf@design.ru>]
                    522:        $.to[Александр Петросян <paf@design.ru>]
                    523:        $.subject[проверка4]
                    524:        $.body[
                    525:                $.text[
                    526:                        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                    527:                        $.body[проверка]
                    528:                ]
                    529:                $.attachment[
                    530:                        $.value[^file::load[text;index.html]]
                    531:                        $.file-name[привет всем.html]                   
                    532:                ]
                    533:        ]
                    534: ]
                    535: 
                    536: 
                    537: @ttime[]
                    538: $now[^date::now[]]
                    539: $now.hour:$now.minute
                    540: 
                    541: @tupper[]
                    542: $t[abcABCабвАБВ]
                    543: $t<br>
                    544: ^t.upper[]
                    545: 
                    546: @treplace[]
                    547: $copy-paste-clean[^table::set{a b
                    548: .      _
                    549: ,      _
                    550: +      _
                    551: &      _
                    552: ?      _
                    553: =      _}]
                    554: 
                    555: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
                    556: # почему-то этот replace роняет апач в 500 ошибку :(
                    557: #^cache_key.replace[$copy-paste-clean]
                    558: $test[abc]
                    559: ^test.save[$cache_key]saved<br>
                    560: $cache[^file:list[.;\.cache^$]]
                    561: ^file:delete[$cache_key]deleted($cache.name)<br>
                    562: 
                    563: 
                    564: 
                    565: @xslt2[]
                    566: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    567: <document><block><p>привет</p></block></document>
                    568: }]
                    569: ^show_xdoc2[$xdoc]
                    570: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
                    571: <hr>
                    572: 
                    573: 
                    574: @tcache2[]
                    575: ^cache[$DB_HOME/keyключ](2){
                    576:        ^math:random(100)
                    577: }
                    578: 
                    579: @ttaintuntaint[]
                    580: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
                    581: 
                    582: ]zz
                    583: <hr>
                    584: ^untaint[html]{1^taint[  ]2  3}
                    585: 
                    586: 
                    587: @tappend2[]
                    588: $t[^table::set{a       b}]^t.append{1  2}$t.a
                    589: 
                    590: @badvsnprintf[]
                    591: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
                    592: }
                    593: 
                    594: 
                    595: @badoracequoting[]
                    596: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
                    597: ^connect[$SQL.connect-string]{
                    598: ^void:sql{delete from paf}
                    599: ^void:sql{insert into paf values (1, '$form:text')}
                    600: $paf[^table::sql{select * from paf}]
                    601: ^paf.menu{
                    602:        $paf.id: ^untaint{$paf.block}<hr>
                    603: 
                    604: }
                    605: <hr>
                    606: 
                    607: 
                    608: ^rem{
                    609: $news[^table::sql{select description from news}[$.limit(3)]]
                    610: ^news.menu{
                    611:        ^untaint{$news.description}<hr>
                    612: 
                    613: }
                    614: <hr>
                    615: }
                    616: 
                    617: $tables[^table::sql{select table_name from user_tables}]
                    618: ^tables.menu{
                    619: $tables.table_name<br>
                    620: }
                    621: 
                    622: }
                    623: <hr>
                    624: $env:PATH
                    625: 
                    626: @badconstructors[]
                    627: $bred[^string::length[]]
                    628: $bred[^response::clear[]]
                    629: $bred[^int::int[]]
                    630: 
                    631: 
                    632: @xloadwrongtable[]
                    633: $constr[^xdoc::load[wrongtable.xml]]
                    634: ^show_xdoc2[$constr]
                    635: 
                    636: @xsetwrongtable[]
                    637: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
                    638: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    639: 
                    640: 
                    641: @tablecolumnerror[]
                    642: $t[^table::set{a}]
                    643: $t.$a
                    644: 
                    645: @roll[]
                    646: #$date[^date::set(1970;1;2)]
                    647: #^date.roll[month](-1)
                    648: $date[^date::set(2038;1;1)]
                    649: ^date.roll[month](+1)
                    650: $date.year  $date.month  $date.day
                    651: 
                    652: @cookie2[]
                    653: #=$cookie:clientType[$.value[test]]=<br>
                    654: =$cookie:clientType=<br>
                    655: 
                    656: 
                    657: @tableset[]
                    658: $a[^table::set{a
                    659: 1
                    660: 2}]
                    661: ^eval(100\$a)
                    662: 
                    663: 
                    664: 
                    665: @zzz[]
                    666: 
                    667: 
                    668: $constructor[
                    669: <block1 name="main_srvr" type="0" label="Основное тело" />
                    670: <block2 name="main_srvr2" type="0" label="Основное тело" />
                    671: ]
                    672: 
                    673: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
                    674: <block-list>^untaint[as-is]{$constructor}</block-list>}]
                    675: 
                    676: $children[$constr.documentElement.childNodes]
                    677: ^if($children){
                    678: ^for[i](1;^children._count[]){
                    679:        $node[$children.$i]
                    680:        $node.nodeName<br>
                    681: }
                    682: }
                    683:    
                    684: 
                    685: @thashforeach3[]
                    686: $h[
                    687:        $.a[1] 
                    688:        $.b[2]
                    689: ]
                    690: $c[^table::set{a
                    691: ^h.foreach[key;value]{$value
                    692: }}]
                    693: $c.a
                    694: 
                    695: @thashforeach2[]
                    696: $h[
                    697:        $.a[1] 
                    698:        $.b[2]
                    699: ]
                    700: $c[
                    701: ^h.foreach[key;value]{
                    702:        $.$key[$value]
                    703: }
                    704: ]
                    705: $c.b
                    706: 
                    707: @thashforeach[]
                    708: $h[
                    709:        $.a[1] 
                    710:        $.b[2]
                    711: ]
                    712: ^h.foreach[key;value]{
                    713:        $key=$value<br>
                    714: }
                    715: 
                    716: @thashdelete[]
                    717: $h[$.a[1] $.b[2]]
                    718: was:<br>
                    719: count=^h._count[] <br>
                    720: b='$h.b' <br>
                    721: 
                    722: ^h.delete[b] 
                    723: 
                    724: now:<br>
                    725: count=^h._count[] <br>
                    726: b='$h.b' 
                    727: 
                    728: @sappend[]
                    729: $test[123]
                    730: ^test.save[test]
                    731: ^test.save[append;test]
                    732: 
                    733: @tappend[]
                    734: $test[^table::set{a    b
                    735: a1     b1}]
                    736: ^test.save[test]
                    737: $test[^table::set{a    b
                    738: a2     b2}]
                    739: ^test.save[append;test]
                    740: 
                    741: 
                    742: @tform[]
                    743: ^if(def $form:new_file){y}{n}
                    744: <form method="post" enctype="multipart/form-data">
                    745: <input type="file" name="new_file" />
                    746: <input type=submit>
                    747: </input>
                    748: 
                    749: @formattest[]
                    750: $size(15.124)
                    751: 
                    752: ^size.format{%.2f}
                    753: 
                    754: @filelist[]
                    755: $html[^file:list[.;\.html^$]]
                    756: ^html.menu{
                    757:        $html.name<br>
                    758: }
                    759: <hr>
                    760: 
                    761: @безнадёжна_попытка_поправить_непоправимое[]
                    762: $dom_from_disk[^xdoc::load[input.xml]]
                    763: $dom_created_in_air[^xdoc::create[doc]]
                    764: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
                    765: ^show_xdoc2[$dom_created_in_air]
                    766: 
                    767: 
                    768: @tcache[]
                    769: #^hashfile:clear[cache]
                    770: $code[^hashfile::open[$DB_HOME;cache]]
                    771: ^code.cache[key](2){
                    772:        ^math:random(100)
                    773: #      ^code.delete[]
                    774: }
                    775: 
                    776: @thashfileexp[]
                    777: $hf[^hashfile::open[$DB_HOME;hashfile]]
                    778: $hf.paf[$.value[крут] $.expires(3)]
                    779: paf=$hf.paf
                    780: <hr>
                    781: ^hf.foreach[key;value]{
                    782:        $key=$value<br>
                    783: }
                    784: <hr>
                    785: $hash[^hf.hash[]]
                    786: =$hash.paf=
                    787: <hr>
                    788: 
                    789: @tcounter[]
                    790: ^tcounterone[$DB_HOME]
                    791: other root:
                    792: ^tcounterone[${DB_HOME}2]
                    793: again, first:
                    794: ^tcounterone[$DB_HOME]
                    795: 
                    796: @tcounterone[DB_HOME]
                    797: $counter[^hashfile::open[$DB_HOME;counter]]
                    798: #^counter.clear[]
                    799: ^counter.transaction{
                    800: #      $counter.value(10)
                    801:        $counter.value($counter.value+1)
                    802: #      ^counter.delete[value]
                    803:        $counter.value
                    804: }
                    805: <hr>
                    806: ^rem{
                    807: $hash[^counter.hash[]]
                    808: =$hash.value=
                    809: <hr>
                    810: }
                    811: 
                    812: @tablehash[]
                    813: $productList[^table::set{id    name
                    814: 1      носки
                    815: 2      валенки
                    816: 3      ушанка
                    817: }]
                    818: 
                    819: #скажем, у первого дилера
                    820: $firstPriceList[^table::set{id price
                    821: 1      0.3
                    822: 3      1000
                    823: }]
                    824: 
                    825: $firstPriceHash[^firstPriceList.hash[id]]
                    826: 
                    827: ^productList.menu{
                    828:     продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
                    829: }
                    830: 
                    831: 
                    832: @hashfile[]
                    833: $hf[^hashfile::assign[hashfile]]
                    834: #$hf.paf[крут5]
                    835: paf=$hf.paf
                    836: 
                    837: @formclass[]
                    838: ^$form:CLASS.a=$form:CLASS.a
                    839: 
                    840: @domdata[]
                    841: ^if(1){
                    842: #      $a{^hren[]}
                    843: }
                    844: $a
                    845: $xdoc[^xdoc::create[doc]]
                    846: $doc[$xdoc.documentElement]
                    847: $name[^doc.appendChild[^xdoc.createElement[name]]]
                    848: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
                    849: ^untaint[as-is]{=$text.nodeValue=}
                    850: 
                    851: @domedit[]
                    852: ^domdata[]
                    853: #$paf.nodeName<br>
                    854: #$doc.documentElement.nodeName<br>
                    855: 
                    856: ^show_xnode1[$xdoc.documentElement;0;1]
                    857: <hr>
                    858: ^show_xdoc2[$xdoc]
                    859: <hr>
                    860: 
                    861: @domxslt[]
                    862: ^domdata[]
                    863: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
                    864: <hr>
                    865: 
                    866: @lsplit2[]
                    867: $path[/optics/]
                    868: $pathTable[^path.lsplit[/]]
                    869: ^pathTable.menu{
                    870:        ^if(def $pathTable.piece){
                    871:                =$pathTable.piece=
                    872:        }
                    873: }
                    874: 
                    875: 
                    876: @faceesize[]
                    877: $k(2)
                    878: $pict[^image::load[paf.gif]]
                    879: $small[^image::create($pict.width/$k;$pict.height/$k)]
                    880: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
                    881: $response:body[^small.gif[]]
                    882: 
                    883: @imageresize[]
                    884: $k(2)
                    885: $pict[^image::create(400*$k;200*$k)]
                    886: $pict.line-width(2)
                    887: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                    888: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
                    889: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                    890: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
                    891: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
                    892: $response:body[^pict.gif[]]
                    893: 
                    894: #$small[^image::create($pict.width/$k;$pict.height/$k)]
                    895: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
                    896: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
                    897: 
                    898: #$response:body[^small.gif[]]
                    899: 
                    900: 
                    901: @tintdefault[]
                    902: #$abc[abc]
                    903: $abc[33]
                    904: ^abc.int[z]
                    905: #^abc.int(123)
                    906: 
                    907: @ifassignhash[]
                    908: $h[^if(1){$.a(1);$.a(2)}]
                    909: $h.a
                    910: 
                    911: @ifpasshash[]
                    912: $a[$.e[a]]
                    913: $b[$.e[b]]
                    914: ^ifpasshashdest[^if(1){$a;$b}]
                    915: #$x[^if(1){$a}{$b}]
                    916: #^ifpasshashdest[$x]
                    917: 
                    918: @ifpasshashdest[p]
                    919: $p.e
                    920: 
                    921: @movedir[]
                    922: ^file:move[a;deeper/a]
                    923: 
                    924: @replace[]
                    925: $a[12^;3]
                    926: ^a.replace[^table::set{from    to
                    927: 2^;    !
                    928: }]
                    929: 
                    930: 
                    931: @set[]
                    932: ^setdata[]
                    933: ^a.add[$b]
                    934: add:$a.3<br>
                    935: 
                    936: ^setdata[]
                    937: ^a.sub[$b]
                    938: sub2:$a.2<br>
                    939: sub1:$a.1<br>
                    940: 
                    941: ^setdata[]
                    942: $c[^a.union[$b]]
                    943: union3:$c.3<br>
                    944: union2:$c.2<br>
                    945: 
                    946: ^setdata[]
                    947: $c[^a.intersection[$b]]
                    948: intersection3:$c.3<br>
                    949: intersection2:$c.2<br>
                    950: 
                    951: ^setdata[]
                    952: intersects:^if(^a.intersects[$b]){y;n}<br>
                    953: intersects2:^if(^a.intersects[ ]){y;n}<br>
                    954: 
                    955: 
                    956: <hr>
                    957: 
                    958: @setdata[]
                    959: $a[$.1[a1] $.2[a2]]
                    960: $b[        $.2[b2] $.3[b3]]
                    961: 
                    962: 
                    963: @hash[]
                    964: $h[^hash::create[$._default[123]]]
                    965: $h.paf[not kretin]
                    966: $h.paf<br>
                    967: =$h.that=<br>
                    968: 
                    969: @methresult[]
                    970: $result[^table::set{1}]
                    971: 
                    972: @terror[]
                    973: ^error[method z must be called with z]
                    974: 
                    975: @syntax1[]
                    976: #^a[^b]
                    977: 
                    978: @syntax2[]
                    979: #^a[
                    980: 
                    981: @ssave[]
                    982: $abc[abc]
                    983: ^abc.save[abc]
                    984: 
                    985: @calendar[]
                    986: 2001;11:<br>
                    987: $week_days[^date:calendar[rus](2001;11)]
                    988: <pre>
                    989: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday;&nbsp^;&nbsp^;} }<br>}
                    990: </pre>
                    991: 
                    992: @thash[]
                    993: $table[^table::set{id  name    age
                    994: 1      paf     278
                    995: 2      пиф     234
                    996: }]
                    997: $hash[^table.hash[id;^table::set[nameless]{id
                    998: name}]]
                    999: $hash.2.id $hash.2.name $hash.2.age
                   1000: 
                   1001: @tdef[]
                   1002: $s[0]
                   1003: if 0=^if($s){}{n}<br>
                   1004: if def 0=^if(def $s){y}{}<br>
                   1005: <hr>
                   1006: 
                   1007: @ford[]
                   1008: ^for[i](0;5){$i}{($i)}
                   1009: 
                   1010: @tif[]
                   1011: ^if[def]{y;n}
                   1012: 
                   1013: @image[]
                   1014: $pict[^image::create(400;200)]
                   1015: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
                   1016: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
                   1017: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
                   1018: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
                   1019: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
                   1020: $response:body[^pict.gif[]]
                   1021: 
                   1022: 
                   1023: 
                   1024: @mail2[]
                   1025: ^mail:send[
                   1026:        $.content-type[$.value[text/plain] $.charset[windows-1251]]
                   1027:        $.from[Александр Петросян <paf@design.ru>]
                   1028:        $.to[Александр Петросян <paf@design.ru>]
                   1029:        $.subject[проверка]
                   1030:        $.body[проверка]
                   1031: ]
                   1032: 
                   1033: @cookie[]
                   1034: $env:HTTP_COOKIE<br>
                   1035: 
                   1036: #$cookie:переменная[test тест ТЕСТ2]
                   1037: =$cookie:переменная=<br>
                   1038: #$cookie:переменная2[test тест ТЕСТ3]
                   1039: =$cookie:переменная2=<br>
                   1040: =$cookie:CLASS.переменная2=<br>
                   1041: 
                   1042: @response[]
                   1043: #^if($form:reload){
                   1044:        $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
                   1045: #}
                   1046: 
                   1047: @xslt[]
                   1048: ^xdata[]
                   1049: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
                   1050: ^show_xdoc2[$transformed]
                   1051: 
                   1052: @regexp2[]
                   1053: $s[  select]
                   1054: $s[^s.match[^^\s*][]{!}]
                   1055: $s
                   1056: 
                   1057: @header[]
                   1058: $response:refresh[
                   1059:        $.value[0]
                   1060:        $.url[http://design.ru?a=^taint[123]]
                   1061: ]
                   1062: 
                   1063: @ttablerem[]
                   1064: $table[^table::load[a.cfg]]
                   1065: ^table.menu{$table.a}
                   1066: 
                   1067: @tconnect[]
                   1068: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
                   1069: $tables[^table::sql{show tables}]
                   1070: #$cols[^tables.columns[]]
                   1071: #$cols.column
                   1072: ^tables.menu{
                   1073:        $tables.[Tables_in_test]<br>
                   1074: }
                   1075: }
                   1076: 
                   1077: @pcre[]
                   1078: $s[1 2]
                   1079: ^s.match[\s;ig]{!}
                   1080: #^s.match[\d;ig]{!}
                   1081: 
                   1082: 
                   1083: @regexp[]
                   1084: $s[abcАБВ]
                   1085: ^if(^s.match[б][i]){y}{n}
                   1086: 
                   1087: @mail[]
                   1088: #$ORIGINS(1)
                   1089: ^mail:send[
                   1090:        $.from[paf@design.ru]
                   1091:        $.to[paf@design.ru]
                   1092:        $.body[1
                   1093:        
                   1094:        2
                   1095:        
                   1096:        
                   1097:                3]
                   1098: ]
                   1099: 
                   1100: @exec[]
                   1101: $a[^file::exec[fc.exe;;a;b]]
                   1102: $a.status|$a.stderr<hr>
                   1103: 
                   1104: @fori[][i]
                   1105: ^for[i](1;3){... =$i= ...}
                   1106: 
                   1107: @xdata0[]
                   1108: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                   1109: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
                   1110: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   1111: <people>
                   1112:        <man id="1" имя="word слово">
                   1113:                <name>P&#171^;AF        B</name>
                   1114:        </man>
                   1115:                <man id="2">
                   1116:                        <name>ПИФ^taint[&]</name>
                   1117:                </man>
                   1118: </people>
                   1119: }]
                   1120: 
                   1121: @xdata[]
                   1122: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
                   1123: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
                   1124: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
                   1125: <people>
                   1126:        <man id="1" имя="word слово">
                   1127:                <name>P&#171^;AF        B</name>
                   1128:        </man>
                   1129:                <man id="2">
                   1130:             <name>ПИФ^taint[&]</name>
                   1131:                </man>
                   1132: </people>
                   1133: }}]
                   1134: 
                   1135: @xml[]
                   1136: ^xdata[]
                   1137: 
                   1138: ^show_xdoc2[$xdoc]<hr>
                   1139: #^show_xnode1[$xdoc]<hr>
                   1140: $people[^xdoc.select[*/man]]
                   1141: #^show1[]
                   1142: ^show_xnodes1[$people]<hr>
                   1143: #^people.0.owner.hren[]
                   1144: 
                   1145: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
                   1146: 
                   1147: by id:
                   1148: ^show_xnode1[^xdoc.getElementById[1];0;1]
                   1149: <hr>
                   1150: 
                   1151: @show1[array]
                   1152: ^for[i](0;^array._count[]-1){
                   1153:     $x[$array.$i]
                   1154:        $x.firstChild.nodeValue: 
                   1155:                $pattributes[$x.parentNode.attributes]
                   1156:                ^if(^pattributes._count[]){
                   1157:                        $pattributes.id.name=$pattributes.id.nodeValue
                   1158:                }
                   1159:        <br>
                   1160: }
                   1161:        
                   1162: @show_xnodes1[array][i]
                   1163: ^for[i](0;^array._count[]-1){
                   1164:        ^show_xnode1[$array.$i;0;1]
                   1165: }
                   1166: 
                   1167: @show_xnode1[x;level;single][l]
                   1168: ^if(def $x){
                   1169:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
                   1170:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   1171:        &lt^;$x.nodeName
                   1172:            $pairs[$x.attributes]
                   1173:            ^if(def $pairs){
                   1174:                $names[^pairs._keys[]]
                   1175:                ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
                   1176:            }
                   1177:            &gt^;
                   1178:     }{
                   1179:        [$x.nodeType]
                   1180:     }
                   1181:     
                   1182:     ^if(def $x.nodeValue){$x.nodeValue}<br>
                   1183:     ^show_xnode1[$x.firstChild]($level+1)
                   1184:     ^if(!$single){
                   1185:            ^show_xnode1[$x.nextSibling]($level)
                   1186:     }
                   1187: 
                   1188:     ^if($x.nodeType == $xnode:ELEMENT_NODE){
                   1189:     ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
                   1190:     }
                   1191: }
                   1192: 
                   1193: @show_xdoc2[xdoc]
                   1194: ^xdoc.save[out/save.xml;
                   1195: #      $.encoding[utf-8]
                   1196:        $.method[xml]
                   1197: ]
                   1198: $file[^xdoc.file[
                   1199:        $.encoding[utf-8]
                   1200:        $.method[html]
                   1201: ]]
                   1202: ^file.save[text;out/save_file.html]
                   1203: #$response:body[^xdoc.file[    $.media-type[text/paf]  ]]
                   1204: <pre>^taint[html][^xdoc.string[
                   1205:        $.method[html]
                   1206: #      $.encoding[utF-8]
                   1207: #      $.omit-xml-declaration[yes]
                   1208: #      $.standalone[no]
                   1209: #      -$.doctype-public[-//W3C//DTD XHTML]
                   1210: #      -$.doctype-system[/a/b/c/]
                   1211: #      $.indent[yes]
                   1212: #      $.media-type[text/paf]
                   1213: ]]
                   1214: </pre>

E-mail: