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