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