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