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