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