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