Annotation of parser3/www/htdocs/index.html, revision 1.108
1.104 paf 1: @USE
1.105 paf 2: /derived.p
1.15 paf 3:
1.72 paf 4: @auto[filespec]
5: $selffilespec[$filespec]
1.63 paf 6: #$form:here
1.84 paf 7: #$request:charset[UTF-8]
8: #$response:charset[windows-1251]
9: #$response:content-type[$.value[text/html]$.charset[$response:charset]]
1.15 paf 10:
1.60 paf 11: #@postprocess[body]
12: #<b>$body</b>
13: #$result[123]
1.37 paf 14:
1.15 paf 15: @main[]
1.72 paf 16: #$a(123)
17: #^a.format[%.10u]
1.71 paf 18: #$result[111]
1.70 paf 19: #^f[a]
1.97 paf 20: #^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
1.88 paf 21: # ^int:sql{select news_id from news where news_id=-1}[
22: ## $.default{2}
23: # ]<br>
24: # ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
1.95 paf 25: # ^file::load[text;^string:sql{select '^^hello[]' }]
26: # ^string:sql{select '^^hello[]' }] $ORIGINS(1)
1.96 paf 27: # ^process{ ^^h[]}
1.97 paf 28: # ^process{^string:sql{select '1
29: # ^^hello[]' }] }
30: #}
1.49 paf 31: #^eval(2)
1.48 paf 32: #^tcrashlocaljunctionsv2[]
1.49 paf 33: #^tcrashlocaljunctions[]
1.50 paf 34: #^tjunctions[]
1.47 paf 35: #^replacetest[]
1.48 paf 36: #^matchoptionpp[]
1.46 paf 37: #^txdocxnodechild[]
1.44 paf 38: #^tclasses[]
1.43 paf 39: #$math:PI
40: #^b:method[]
1.42 paf 41: #^main[]
1.41 paf 42: #^errort[]
1.44 paf 43: #^tselectNumber[]
1.39 paf 44: #$result[hello]
1.36 paf 45: #^invaliddate2[]
46: #^process2[]
47: #^casehashtext[]
1.35 paf 48: #^subjvaltest[]
49: #^tableselect0[]
1.34 paf 50: #^memnotest1[]
1.32 paf 51: #^voidparams[]
1.31 paf 52: #^rolls2[]
1.30 paf 53: #^cacheexpireschanging[]
1.29 paf 54: #^cacheexpiresfixed[]
55: #^dateoffsets[]
56: #^exceptionTypes[]
1.28 paf 57: #^roll2[]
1.27 paf 58: #^rolls[]
1.25 paf 59: #^exceptions1[]
1.22 paf 60: #^locate_by_expr[]
1.18 paf 61: #^method_junction_params{...}
1.17 paf 62: #^verifyCookie[paf]
1.37 paf 63: #^execlangs[]
1.16 paf 64: #$t[^tobjeresult[]]$t.a
65: #^xmlprobs[]
1.15 paf 66: #^doubleprobs[]
67: #^math:random(-10)
68: #^divnamestop[]
69: #^arrayclone[]
70: #^operator_tricks[]
71: #^xoutputrusattr[]
72: #^xdocset1[]
73: #^regexp3[]
74: #^exec2[]
75: #^tlock[]
76: #^xmloutattrwithoutvalue[]
77: #^precisionProblem[]
78: #^xpath[]
79: #^ttablesetlang[]
80: #^ttime[]
81: #^tupper[]
82: #^treplace[]
83: #^xslt2[]
84: #^tcache2[]
85: #$ORIGINS(1)
86: #$t[^table::set{a b} ^table::set{c d}]
87: #^ttaintuntaint[]
88: #^tappend2[]
89: #^badvsnprintf[]
90: #^badoracequoting[]
91: #^badconstructors[]
92: #^xloadwrongtable[]
93: #^xsetwrongtable[]
94: #^if($form:test){y}{n}
95: #^tablecolumnerror[]
96: #^roll[]
97: #^cookie2[]
98: #^tableset[]
99: #^math:PI.format{%.30f}
100: #^xchildren[]
101: #^thashforeach3[]
102: #^thashforeach2[]
103: #^thashforeach[]
104: #^thashdelete[]
105: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
106: #^tappend[]
107: #^sappend[]
108: #^eval(10\3)<br>
109: #^tform[]
110: #^formattest[]
111: #^filelist[]
112: #^connect[mysql://user:pass@host]{ }
113: #^безнадёжна_попытка_поправить_непоправимое[]
114: #^tcache[]
115: #^thashfileexp[]
116: #^tcounter[]
117: #^tablehash[]
118: #j^hashfile[]
119: #^formclass[]
120: #^hren[]
121: #^domedit[]
122: #^domxslt[]
123: #^lsplit2[]
124: #^faceesize[]
125: #^imageresize[]
126: #^ifassignhash[]
127: #^tintdefault[]
128: #$response:status[404]
129: #^ifpasshash[]
130: #^movedir[]
131: #^replace[]
132: #^set[]
133: #^hash[]<hr>
134: #$t[^methresult[]] ->$t
135: #^terror[]
136: #^ssave[]
137: #^thash[]
138: #^tdef[]
139: #^ford[]
140: #^tif[]
1.84 paf 141: #^image[]
1.15 paf 142: #^mail2[]
143: #^cookie[]
144: #^response[]
145: #^regexp2[]
146: #^ttablerem[]
147: #^pcre[]
148: #^regexp[]<hr>
149: #^mail[]
150: #^exec[]
151: #^fori[]
152: #^tconnect[]
153: #^xslt[]
154: #^xml[]
155: #^header[]
1.53 paf 156: #^tablehasht[]
1.54 paf 157: #^datecreatestring[]
1.56 paf 158: #^mssqltypes1[]
159: #^badthrows[]
1.57 paf 160: #^xmlspace[]
161: #^counter[main.counter]
162: #^xpath2[]
163: #^callindirect[]
164: #^junctionprob[]
1.59 paf 165: #^datecreatestring2[]
166: #^tstoredproc[]
167: #^tstoredproc2[]
168: #^forkeys[]
1.60 paf 169: #^pngsize[]
1.61 paf 170: #^checkList[]
1.63 paf 171: #^datetest[]
1.65 paf 172: #^tserge[]
1.69 paf 173: #^envt[]
1.67 paf 174: #^selectt[]
175: #^select2[]
176: #^selectSingle2[]
177: #^selectString2[]
178: #^selectNumber2[]
179: #^selectBool2[]
180: #^xdoccreate[]
181: #^xdoccreatetag[]
1.70 paf 182: #^xdocload[]
1.67 paf 183: #^xdocstring[]
184: #^xdocsave[]
1.68 paf 185: #^div[]
186: #^datecreatestring3[]
1.73 paf 187: #^tfilespec[]
1.77 paf 188: #^tcrypt[]
1.74 paf 189: #^cryptdocsample[]
1.78 paf 190: #^tnormalize[]
1.83 paf 191: #^xmltransformbyxdoc[]
1.81 paf 192: #^sergestrandef[]
1.83 paf 193: #^tstdin[]
194: #^tfind[]
1.86 paf 195: #^mimet[]
1.88 paf 196: #^cgit[]
1.92 paf 197: #^joinlimit[]
1.89 paf 198: #^tableclonelimit[]
1.91 paf 199: #^transparams[]
200: #^sendtests[]
1.93 paf 201: #^wwrapperpass[]
1.95 paf 202: #^badpos[]
1.98 paf 203: #^processtest[]
204: #^mail3[]
1.99 paf 205: #^mail4[]
1.100 paf 206: #^datesaving[]
1.101 paf 207: #^badconstructor[]
1.103 paf 208: #^calendar[]
1.104 paf 209: #^monthdays(8)
210: #^xdoctypetest[]
1.105 paf 211: #^xtabletest[]
1.108 ! paf 212: ^staticstest[]
! 213: #^staticstest2[]
1.77 paf 214: <hr>
1.74 paf 215: OK
1.107 paf 216:
217: @staticstest2[]
218: ^$derived:derived_var=$derived:derived_var<br>
219: ^$derived:a=$derived:a<br>
1.108 ! paf 220: $derived:a[changed] ^$derived:a=$derived:a<br>
1.107 paf 221: $derived:derived_var[changed]
222: ^$derived:derived_var=$derived:derived_var<br>
223:
1.104 paf 224:
1.105 paf 225: @staticstest[]
226: $derived[^derived::create[]]
227: ^derived.test[]
1.106 paf 228: ^$derived.a=$derived.a<br>
229: ^$derived.x=$derived.x<br>
230:
1.105 paf 231:
1.104 paf 232: @xdoctypetest[]
233: $xdoc[^xdoc::create[x]]
234: ^if($xdoc is xdoc){y}{n}
235:
236: @xtabletest[]
237: $xtableo[^xtable::create[]]
238: ^if($xtableo is table){y}{n}
1.105 paf 239: #^xtableo.columns[]
1.100 paf 240:
1.103 paf 241: @monthdays[month]
242: $from[^date::create(2000;$month;1)]
243: $to[^date::create($from)] ^to.roll[month](+1)
244: $result($to-$from)
245:
1.100 paf 246: @badconstructor[]
247: ^date::now[]
1.99 paf 248:
249: @datesaving[]
250: $now[^date::now[]]
251: $now.daylightsaving<br>
252: $now.yearday<br>
253: #
254: $date[^date::create(2002;1;3)]
255: $date.daylightsaving<br>
256: $date.yearday
1.97 paf 257:
1.98 paf 258: @mail4[]
259: ^mail:send[
260: $.from[paf@mail.design.ru]
261: $.to[paf@mail.design.ru]
262: $.subject[^taint[uri][москва]=2]
263: $.text[^taint[uri][москва]=]
264: $.html{<a href=http://there.ru/?city=^taint[uri][Москва]>link</a>}
265: ]
1.97 paf 266: @processtest[]
267: $f[^file::load[text;piece.p]] ^process{$f.text}
268: $ORIGINS(1)
1.93 paf 269:
270:
271: @badpos[]
272: $s[123]
1.94 paf 273: ^s.mid(0;2)
1.92 paf 274:
275: @wwrapperpass[]
276: $h[^hash::create[]]
277: $h.a(1)
278: ^my_method[^if(1){$h}]
279: работает. так и должно быть?
280:
281: @my_method[p]
282: ^p._count[]
283:
1.88 paf 284:
285: @tableclonelimit[]
286: $source[^table::create{a
287: aa
288: bb
289: cc}]
290: ^source.offset(1)
291: #$dest[^table::create[$source]]
292: $dest[^table::create[$source;$.offset(2)]]
293: $dest[^table::create[$source;$.limit(2)]]
294: $dest[^table::create[$source;$.offset(1)$.limit(1)]]
295: $dest[^table::create[$source;$.offset(1)$.limit(2)]]
296: $dest[^table::create[$source;$.offset[cur]$.limit(2)]]
297:
298: ^dest.menu{$dest.a}[,]<br>
299:
300: @joinlimit[]
301: $source[^table::create{a
302: aa
303: bb
304: cc}]
305: ^source.offset(2)
306: $dest[^table::create{a
307: xx
308: }]
309: #^dest.join[$source]
310: #^dest.join[$source;$.offset(2)]
311: #^dest.join[$source;$.limit(2)]
312: #^dest.join[$source;$.offset(1)$.limit(1)]
313: #^dest.join[$source;$.offset(1)$.limit(2)]
1.91 paf 314: #^dest.join[$source;$.offset[cur]$.limit(1)]
315: ^dest.join[$source;$.limit(0)]
1.88 paf 316:
317: ^dest.menu{$dest.a}[,]<br>
1.86 paf 318:
319: @cgit[]
320: $f[^file::cgi[showenv.cmd]]
321: $f.HELLO=<br>
322: $f.CONTENT-TYPE=<br>
323: $f.content-type=<br>
324:
1.83 paf 325:
1.84 paf 326: @mimet[]
1.85 paf 327: $f[^file::stat[a.GIF]]
328: $f.content-type
1.84 paf 329:
330:
1.83 paf 331: @tfind[]
332: ^file:find[index.html]
333:
334: @tstdin[]
335: $f[^file::exec[test.pl;$.stdin[проверка stdin потока]]]
336: <pre>$f.text</pre>
1.80 paf 337:
338: @sergestrandef[]
339: $sQuantity[ ]
340: ^sQuantity.int(10)
1.78 paf 341:
342: @xmltransformbyxdoc[]
343: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
344: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
345: <people>
346: <man id="1" имя="word слово">
347: <name>1 2</name>
348: </man>
349: </people>
350: }}]
351: $sheet[^xdoc::create{<?xml version="1.0"?>
1.79 paf 352: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
353:
354: >
1.78 paf 355: <!--<xsl:output doctype-public ="-//W3C//DTD XHTML" indent="yes"/>-->
356:
1.79 paf 357: <!--<xsl:import href="http://localhost/html.xsl"/>-->
358: <xsl:import href="html.xsl"/>
359:
1.78 paf 360: <xsl:param name="param1">defparam1</xsl:param>
361: <xsl:param name="param2">defparam2</xsl:param>
1.79 paf 362:
1.78 paf 363:
364: <xsl:template match="doc">
365: param1=<xsl:value-of select="^$param1"/><br/>
366: param2=<xsl:value-of select="^$param2"/><br/>
367:
368: test return <something background=""/>
369: </xsl:template>
370:
371: <xsl:template name="test">
1.81 paf 372: test return3
1.78 paf 373: </xsl:template>
374:
375: <xsl:template match="people">
376: <html>
377: <head>z</head>
378: para1=<xsl:copy-of select="^$param1"/>
379: <xsl:apply-templates/>
380: <hr/>
381: <xsl:call-template name="test"/>
382: </html>
383: </xsl:template>
384:
385: <xsl:template match="name">
386: <b><xsl:value-of select="."/></b>
387: </xsl:template>
388: </xsl:stylesheet>
389: }]
390:
391:
392: $xdoc[^xdoc.transform[$sheet]]
393: $string[^xdoc.string[$.method[html]]]
394: ^string.save[a]
395: ^untaint[html]{$string}
396:
397:
1.77 paf 398:
399: @tnormalize[]
400: #s состоит из 1000 фрагментов
401: $s[^for[i](0;999){фрагмент }]
402: #это займет много ресурсов
403: ^s.match[фраг][g]{перга}
404: #это займет меньше ресурсов
405: #$normalized[^s.normalize[]]
406: #^normalized.match[фраг][g]{перга}
1.74 paf 407:
408: @sendtests[]
1.89 paf 409: ^text[]
1.74 paf 410: #^html[]
411: #^text-n-html[]
412: #^file[]
413: #^text-n-file[]
1.89 paf 414: #^text-n-html-n-file[]
1.74 paf 415: #^backwardcomp[]
416:
417: @backwardcomp[]
418: ^mail:send[
419: $.from[paf]
420: $.to[paf]
421: $.body[this is text value]
422: ]
423:
424: @text[]
425: ^mail:send[
426: $.from[paf]
1.90 paf 427: $.to[paf]
1.74 paf 428: $.text[
429: $.value[this is text value]
430: ]
431: ]
432:
433: @html[]
434: ^mail:send[
435: $.from[paf]
436: $.to[paf]
437: $.html{this is <b>html</b> value ^taint[<] 10}
438: ]
439:
440: @text-n-html[]
441: ^mail:send[
442: $.from[paf]
443: $.to[paf]
444: $.text[
445: $.value[this is text value]
446: ]
447: $.html[
448: $.value{this is <b>html</b> value ^taint[<] 10}
449: ]
450: ]
451:
452: @file[]
453: ^mail:send[
454: $.from[paf]
455: $.to[paf]
456: $.file[^file::load[binary;image.jpg]]
457: ]
458:
459: @text-n-file[]
460: ^mail:send[
461: $.from[paf]
462: $.to[paf]
463: $.text[
464: $.value[this is text value]
465: ]
466: $.file[^file::load[binary;image.jpg]]
467: ]
468:
469: @text-n-html-n-file[]
470: ^mail:send[
471: $.from[paf]
472: $.to[paf]
473: $.text[
474: $.value[this is text value]
475: ]
476: $.html[
477: $.COntent-type[$.value[text/html]$.charset[windows-1251xx]]
478: $.value{this is <b>html</b> value ^taint[<] 10}
479: ]
480: $.file[^file::load[binary;image.jpg]]
481: ]
482:
483:
484:
485: @md5salt[]
486: 1234
487:
488: @cryptdocsample[]
489: $users[^table::create{name password
490: alice ***
491: bob ***
492: }]
493:
494: $htpasswd[^table::create[nameless]{}]
495: ^users.menu{
496: ^htpasswd.append{$users.name:^math:crypt[$users.password;^$apr1^$^md5salt[]]}
497: }
498:
499: ^htpasswd.save[nameless;.htpasswd-parser-test]
500:
1.73 paf 501:
502: @tcrypt[]
1.76 paf 503: #^math:crypt[123;^$apr1^$1234567890abcdef]<br>
504: ^math:crypt[123;^$apr1^$]<br>
1.72 paf 505:
506: @tfilespec[]
507: src=$selffilespec<br>
508: dirname=^file:dirname[$selffilespec]<br>
509: basename=^file:basename[$selffilespec]<br>
510: justname=^file:justname[$selffilespec]<br>
511: justext=^file:justext[$selffilespec]<br>
1.68 paf 512:
513: @datecreatestring3[]
514: $new_after[^date::now(-3)]
515: $articles[^table::create{id title last_update
516: 1 привет 2002-07-03}]
517: ^articles.menu{
518: $last_update[^date::create[$articles.last_update]]
519: <a href=${articles.id}.html>$articles.title</a>
520: ^if($last_update > $new_after){новая}
521: <br>
522: }
1.67 paf 523:
524: @div[]
525: $var(5)
526: ^var.inc(7)
527: ^var.dec(3)
528: ^var.div(4)
529: ^var.mul(2)
530: $var
531:
532:
533: @xdocsave[]
534: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
535: <document>
536: строка1<br/>
537: строка2<br/>
538: </document>}]
539: ^document.save[test.xml]
540:
541: @xdocstring[]
542: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
543: <document>
544: строка1<br/>
545: строка2<br/>
546: </document>}]
547: ^document.string[
548: $.method[html]
549: ]
550:
551:
552: @xdocload[]
553: $document[^xdoc::load[article.xml]]
554: $response:body[^document.file[$.media-type[text/xml]]]
555:
556:
557: @xdoccreatetag[]
558: $document[^xdoc::create[document]]
559: $paraNode[^document.createElement[para]]
560: $dummy[^document.documentElement.appendChild[$paraNode]]
561: $response:body[^document.file[$.media-type[text/xml]]]
562:
563:
564: @xdoccreate[]
565: $document[^xdoc::create{<?xml version="1.0" encoding="windows-1251" ?>
566: <document>
567: текст
568: </document>}]
569: $response:body[^document.file[$.media-type[text/xml]]]
570:
571: @selectBool2[]
572: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
573: <t attr="привет" n="123"/>}]
574: ^if(^d.selectBool[/t/@n > 10]){
575: /t/@n больше 10
576: }{
577: не больше
578: }
579:
580:
581: @selectNumber2[]
582: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
583: <t attr="привет" n="123"/>}]
584: ^d.selectNumber[number(/t/@n)+1]<br>
585: ^d.selectNumber[2*2]<br>
586:
587:
588: @selectString2[]
589: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
590: <t attr="привет" n="123"/>}]
591: # результат=привет
592: ^d.selectString[string(t/@attr)]
593:
594:
595: @selectSingle2[]
596: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
597: <t attr="привет" n="123"/>}]
598: # результат=один элемент "t"
599: $element[^d.selectSingle[t]]
600: # результат=2 (количество атрибутов <t>)
601: Количество атрибутов: ^element.attributes._count[]<br>
602: # результат=не существует (нет <x>)
603: ^if(^d.select[x]){
604: x существует
605: }{
606: x не существует
607: }
608:
609: @select2[]
610: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
611: # результат: список из одного элемента "t"
612: $list[^d.select[t]]
613: # результат: 2 = количество атрибутов <t>
614: ^list.0.attributes._count[]<br>
615: ^for[i](0;$list-1){
616: $attr[$list.$i]
617: $attr.nodeName = $attr.nodeType<br>
618: }
619:
620:
621: @selectt[]
622: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><t attr="привет" n="123"/>}]
623: $list[^d.select[t]]
624: ^list.0.attributes._count[]
1.65 paf 625:
626: @envt[]
1.66 paf 627: $f[^file::exec[showenv.cmd;
628: $.bad[value]
629: $.CGI_good[value]
630: ]]
1.65 paf 631: $f.status<br>
632: $f.stderr<br>
633: <pre>$f.text</pre>
634:
1.63 paf 635:
636: @tserge[]
1.64 paf 637: ^if(" 09 "){y}
1.61 paf 638:
639: @datetest[]
640: $f[^file::stat[some.zip]]
641: Размер в байтах: $f.size<br>
642: Год создания: $f.cdate.year<br>
643: $now[^date::now[]]
644: $DAYS_CONSIDERED_NEW(3)
645: Статус: ^if($f.mdate >= $now-$DAYS_CONSIDERED_NEW){новый;старый}
646:
1.60 paf 647:
648: @checkList[]
649: ...^oneOf[a;a,b,c]...<br>
650: #...^oneOf[a;ax,b,c]...<br>
651: ...^oneWord[word]...<br>
652: #...^oneWord[wo rd]...<br>
653:
654:
655: @oneOf[s;list][t] выдаёт строку, если строка она есть в списке(разделенном запятыми)
656: $t[^list.lsplit[,]]
657: ^if(!^t.locate[piece;$s]){^throw[user;$s;unknown]}
658: $result[$s]
659:
660: @oneWord[s]
661: ^if(^s.match[\W]){^throw[user.data;$s;not word]}{$s}
1.59 paf 662:
663: @pngsize[]
664: $i[^image::measure[test.png]]
665: ^i.html[]
666:
667:
668: @forkeys[]
669: $text[^form:fields.foreach[key;val]{$key=$val
670: }]
671: ^text.save[ttt.txt]
672: =$text=
673:
674:
675: @tstoredproc2[]
676: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
677: ^void:sql{exec pafvoid}
678: }
679:
680: @tstoredproc[]
681: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
682: $t[^table::sql{exec pafproc}]
683: # $t[^table::sql{{call pafproc}}]
684: $c[^t.columns[]]
685: ^c.menu{$c.column}[<br>]
686: }
1.57 paf 687:
688: @datecreatestring2[]
1.58 paf 689: <table border=1>
690: ^datecreatestring2show[2000]
691: ^datecreatestring2show[2000-02]
1.59 paf 692: ^datecreatestring2show[2000-2-03]
1.58 paf 693: ^datecreatestring2show[2000-02-03 15]
694: ^datecreatestring2show[2000-02-03 15:30]
695: ^datecreatestring2show[2000-02-03 15:30:04]
696: ^datecreatestring2show[2000-02-03 15:30:04 hren]
697: ^datecreatestring2show[15:30]
698: ^datecreatestring2show[15:30:05]
699: ^datecreatestring2show[15:30:05 hren]
700: </table>
701:
702: @datecreatestring2show[s]
703: $date[^date::create[$s]]
704: <tr>
705: <td>$s</td><td align=right>^date.sql-string[]</td>
706: </tr>
707:
1.57 paf 708:
709: @junctionprob[][l]
710: $l[123]
711: $a{$l}
712: ^junctionprobnested[$a]
713: @junctionprobnested[p]
714: $p
715:
716:
717: @callindirecttarget[]
718: callindirecttarget called
719: @callindirect[]
720: $f[$callindirecttarget]
721: ^f[]
722:
723: @xpath2[]
724: $xdoc[^xdoc::create{<?xml version="1.0" encoding="windows-1251"?>
725: <doc>
726: <field-list>
727: <field name="aa"/>
728: <field name="bb"/>
729: </field-list>
730: </doc>
731: }]
732:
733: #^xdoc.string[]
734:
735: $fieldList[^xdoc.selectSingle[/doc/field-list]]
736: #^fieldList.childNodes._count[]
737: $fields[^fieldList.select[field]]
738: #^fields._count[]
739: ^fields.foreach[k;node]{
740: $node.nodeName<br>
741: }
742: @counter[filespec][f;s]
743: ^file:lock[$filespec]{
744: $f[^file::load[text;$filespec]]
745: $s[^eval($f.text+1)]
746: ^s.save[$filespec]
747: }
748: $s
1.56 paf 749:
750: @xmlspace[]
751: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
752: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
753: <people>
754: <man id="1" имя="word слово">
755: <name>1 2</name>
756: </man>
757: </people>
758: }}]
759: $xdoc[^xdoc.transform[global.xsl]]
760: $string[^xdoc.string[$.method[html]]]
761: ^string.save[a]
762: ^untaint[html]{$string}
763:
764: @badthrows[]
765: #^throw[a;b;]
766: ^throw[a;]
1.54 paf 767:
768: @mssqltypes1[]
769: ^connect[odbc://DSN=nestle^;UID=nestle^;PWD=mbm32]{
1.55 paf 770: # ^string:sql{select { ts '1998-05-02 01:23:56.123' }}
771: # ^string:sql{select CAST({ ts '1998-05-02 01:23:56.123' }AS smalldatetime)}
772: # ^string:sql{select CAST({ts '2002-04-28 00:00:00.000'} AS smalldatetime)}
773: $t[^table::sql{select a from paf}]
774: ^t.count[]
1.54 paf 775: }
1.51 paf 776:
1.53 paf 777: @datecreatestring[]
1.54 paf 778: $d[^date::create[2002-04-33 01:03:04]]
1.53 paf 779: ^d.sql-string[]
1.52 paf 780:
781: @method[hash]
782: $hash.key
783: @mainZ[]
784: ^method[
785: $.key{code}
786: ]
787:
1.51 paf 788: @tablehasht[]
789: $t[^table::create{p
790: 1
791: 3
792: 2
793: 4}]
794:
795: $h[^t.hash[p]]
796:
797: =^h._count[]=
798:
799:
800: @sqldefaults[]
801: ^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
802: ^int:sql{select news_id from news where news_id=-1}[$.default{2}]<br>
803: ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
804: }
1.60 paf 805: =======
806: <hr>
807: OK
808: >>>>>>> 1.50
1.48 paf 809:
810: @tcrashlocaljunctionsv2[]
811: $a[
812: $b{ $c[1] }
813: ]
814: $b
815: $c
816:
817: @tcrashlocaljunctions[]
818: $var[aaa]
819: ^if(1){
820: ^tcrashlocaljunctions1[]
821: }
822:
823: $j
824:
1.49 paf 825: @tcrashlocaljunctions1[][var]
826: $var[varvalue]
1.48 paf 827: $j{
828: $var
829: }
1.49 paf 830: $j
1.48 paf 831:
832: @tjunctions[][tl]
833: $t[^t::create[]]
834: ^tjunctionsi[]
835:
836: @tjunctionsi[][tl]
837: $tl[12345]
838: ^t.tjunctionsm[
839: $.key{
840: $tl
841: }
842: ]
1.46 paf 843:
1.47 paf 844: @replacetest[]
845: $b[b]
846: $s[
847: aaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
848: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
849: ]
850: ^s.replace[^table::create{from to
851: ba !_}]
852:
853:
1.46 paf 854: @matchoptionpp[]
1.47 paf 855: #$ORIGINS(1)
1.46 paf 856: $s[
857: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.47 paf 858: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
859: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
860: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
861: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
862: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
863: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
864: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
865: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
866: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.46 paf 867: ]
868: ^s.match[b;g']{($match.prematch|$match.match|$match.postmatch)}
869:
1.44 paf 870:
871: @txdocxnodechild[]
872: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?><d/>}]
873: $xdoc.nodeName
874: ^xdoc.selectNumber[2*2]
1.45 paf 875: $xdoc:ELEMENT_NODE
1.44 paf 876:
877:
878: @tclasses[]
879: $t[^t::create[]]
880: ^t.method[]
881: <hr>
882: ^t.base_method[]
883:
1.40 paf 884:
885: @errort[]
1.42 paf 886: ^xdoc::create[a]
1.40 paf 887: #^throw[user;here;this]
888:
889: @tselectNumber[]
890: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет" n="123"/>}]
891: ^d.selectString[string(d/@attr)]<br>
892: ^d.selectNumber[2*2]<br>
893: ^d.selectNumber[number(/d/@n)+1]<br>
894:
1.34 paf 895:
1.36 paf 896: @invaliddate2[]
897: $d[^date::create(1018946575/60/60)] ^d.sql-string[]
898:
899: @process2[]
900: ^^process{
901: ^process{
902: ^$a[^^if(0){^$.k[y]}{^$.k[^^hren[]n]}] ^$a.k
903: }
904: }
905:
1.35 paf 906: @casehashtext[]
907: $tt[1]
908: $tmp[
909: ^switch[$tt]{
910: ^case[1]{
911: $.aaa[123]
912: }
913: ^case[DEFAULT]{
914: $.bbb[456]
915: }
916: }
1.36 paf 917: shit!
1.35 paf 918: ]
1.36 paf 919: #$tmp
1.35 paf 920: $tmp.aaa
921:
922: @subjvaltest[]
923: $a12[val]
924: $b[12]
925: $a$b
926:
1.34 paf 927: @tableselect0[]
928: $person[^table::create{name height
929: paf 1.77
930: шохин 2.07
931: moko 1.77
932: }]
933: $nottoohigh[^person.select($person.height<2)]
934: ^nottoohigh.menu{$nottoohigh.name<br>}
1.32 paf 935:
936: @transparams[]
937: $idoc[^xdoc::create{<?xml version="1.0" ?><doc/>}]
938: $odoc[^idoc.transform[global.xsl;
939: $.param1['1']
940: $.param2['2']
941: ]]
942: <pre>^taint[^odoc.string[$.method[html]]]
943:
944: @memnotest1[]
945: ^for[i](0;4000){
946:
947: $xxxx[$i]
948: $xxxx
949:
950: }
951:
952: @memnotest1notes[]
953: одна итерация цикла:
954: [Mon Apr 8 20:12:02 2002] execution-------------------------|
1.35 paf 955: '469641+=28 wcodeframe -> 0 !optimize[3]''469669+=49 string от {} -> 0 optimize[3]'
1.32 paf 956: [Mon Apr 8 20:12:02 2002] 12:STRING__WRITE
957: [Mon Apr 8 20:12:02 2002] "|| "
958: [Mon Apr 8 20:12:02 2002] 12:WITH_ROOT
959: [Mon Apr 8 20:12:02 2002] 13:VALUE
960: [Mon Apr 8 20:12:02 2002] "xxxx" string
1.35 paf 961: [Mon Apr 8 20:12:02 2002] 14:CREATE_EWPOOL'469377+=24 wcodeframe -> 0 !optimize[1]''469401+=49 string -> 41 !optimize[7]'
1.32 paf 962: [Mon Apr 8 20:12:02 2002] 16:WITH_READ
963: [Mon Apr 8 20:12:02 2002] 17:VALUE
964: [Mon Apr 8 20:12:02 2002] "i" string
965: [Mon Apr 8 20:12:02 2002] 18:GET_ELEMENT
1.35 paf 966: [Mon Apr 8 20:12:02 2002] 17:WRITE_VALUE'469452+=40 MAX_NUMBER -> !~2 actual digits''469492+=49 -> 41 !'
967: [Mon Apr 8 20:12:02 2002] 16:REDUCE_EWPOOL'469541+=24 VString -> 0 optimize[5]'
1.32 paf 968: [Mon Apr 8 20:12:02 2002] 15:CONSTRUCT_VALUE
969: [Mon Apr 8 20:12:02 2002] 12:STRING__WRITE
970: [Mon Apr 8 20:12:02 2002] "| "
971: [Mon Apr 8 20:12:02 2002] 12:WITH_READ
972: [Mon Apr 8 20:12:02 2002] 13:VALUE
973: [Mon Apr 8 20:12:02 2002] "xxxx" string
974: [Mon Apr 8 20:12:02 2002] 14:GET_ELEMENT
975: [Mon Apr 8 20:12:02 2002] 13:WRITE_VALUE'469573+=41 string expand nothing for now'
976: [Mon Apr 8 20:12:02 2002] 12:STRING__WRITE
1.35 paf 977: [Mon Apr 8 20:12:02 2002] "||"'469617+=24 VString -> 0 !optimize[6]'
1.32 paf 978: [Mon Apr 8 20:12:02 2002] <-ja returned
979: [Mon Apr 8 20:12:02 2002] ja->
980:
981: 201/328=0.612804878049 %%optimized
982:
983: 1.
984: CREATE_*POOL
985: сделать
986: *POOL_POOLED+CODE
987: где
988: wwrapper
989: и(возможно) wcodeframe
990: +string
991: стековая переменная
992:
993: 2.
994: избавиться от обёртки при возврате результата process [см. тело _for]
995:
996: 3.
997: сделать callback для process, чтобы вынести invariants из _for & co.
998:
999: 4.
1000: @todo склеить get_element и write_value (при вставлении? write_value)
1001:
1002: 5.
1003: reduce_*pool -> вариант получить именно string, без VString обёртки [часто
1004: обёртка сразу выбрасывается = не нужна]
1005:
1006: 6.
1007: process вариант получить именно string, без VString обёртки [часто обёртка
1008: сразу выбрасывается = не нужна]
1009:
1010: 7.
1011: string head, убить 8 байт неправильной link
1.31 paf 1012:
1013: @voidparams[]
1014: ^voidparamsm[$form:field]
1015:
1016: @voidparamsm[p]
1017: ^p.int(123)
1.29 paf 1018:
1.30 paf 1019: @rolls2[]
1020: $now[^date::now[]]
1021: $d[^date::create($now.year;$now.month)] ^d.sql-string[]<br>
1022: ^for[i](1;12){
1023: ^d.roll[month](-1) ^d.sql-string[]<br>
1024: }
1025:
1.29 paf 1026: @cacheexpireschanging[]
1027: ^cache[$DB_HOME/keyключ][^date::now(+1)]{ ^rem{1 day}
1028: ^cache[^date::now(+4/24/60/60)]
1029: # ^cache(2)
1.30 paf 1030: # ^cache(0)
1.29 paf 1031: ^math:random(100)
1032: }
1033:
1034:
1035:
1036: @cacheexpiresfixed[]
1037: ^cache[$DB_HOME/keyключ][^date::now(+2/24/60/60)]{
1038: ^math:random(100)
1039: }
1040:
1041: @dateoffsets[]
1042: $d[^date::create(^date::now[]+1/24/60)]
1043: #$d[^date::now(+1/24/60)]
1044: ^d.sql-string[]
1045: #$d
1.26 paf 1046:
1.28 paf 1047: @exceptionTypes[]
1048: # parser.compile ^test[} компиляция (непарная скобка, ...)
1049: # parser.runtime ^if(0). параметры (больше/меньше, чем нужно, не тех типов, ...)
1050: # number.zerodivision ^eval(1/0) ^eval(1%0)
1051: # number.format ^eval(abc*5)
1052: # file.missing ^file:delete[delme] not found
1053: # file.access ^table::load[.] no rights
1054: # image.format ^image::measure[index.html] not gif/jpg
1055: # sql.connect ^connect[mysql://baduser:pass@host/db]{} not found/timeout
1056: # sql.execute ^connect[mysql://okuser:pass@host/db]{^void:sql{select bad}} syntax error
1057: # xml ^xdoc::create{<forgot?>} any error in xml/xslt libs
1058: # smtp.connect not found/timeout
1059: # smtp.execute communication error
1060:
1.26 paf 1061: @roll2[]
1062: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
1.27 paf 1063: ^d.roll[day](+365*3+1) ^d.sql-string[]<br>
1.26 paf 1064:
1.25 paf 1065:
1066: @rolls[]
1067: $d[^date::create(2002;4;4)]
1068: ^d.sql-string[]<br>
1069: ^for[i](1;7){
1070: ^d.roll[day](-1)
1071: ^d.sql-string[]<br>
1072: }
1073: <hr>
1074: $d[^date::create(2002;3;28)]
1075: ^d.sql-string[]<br>
1076: ^for[i](1;7){
1077: ^d.roll[day](+1)
1078: ^d.sql-string[]<br>
1079: }
1080: <hr>
1081: $d[^date::create(2002;12;3)]
1082: ^d.sql-string[]<br>
1083: ^for[i](1;14){
1084: ^d.roll[day](-1)
1085: ^d.sql-string[]<br>
1086: }
1087: <hr>
1088: $d[^date::create(2002;10;19)]
1089: ^d.sql-string[]<br>
1090: ^for[i](1;14){
1091: ^d.roll[day](+1)
1092: ^d.sql-string[]<br>
1093: }
1094:
1095:
1096:
1097:
1098:
1.22 paf 1099:
1100: @exceptions1[]
1101: ^try{
1102: aaa
1.24 paf 1103: ^throw[custom1;paf;is stupid]
1.22 paf 1104: }{
1.24 paf 1105: ^if($exception.type eq custom1){
1.28 paf 1106: # $exception.handled(1)
1107: ^throw[$exception]
1.24 paf 1108: type=$exception.type<br>
1109: source=$exception.source<br>
1110: file=$exception.file<br>
1111: lineno=$exception.lineno<br>
1112: comment=$exception.comment<br>
1113: }
1.22 paf 1114: }
1.21 paf 1115:
1116: @locate_by_expr[]
1117: $t[^table::create{a b
1118: 1 nok
1119: 2 ok
1120: 3 nok
1121: }]
1122: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17 paf 1123:
1124: @method_junction_params[param]
1125: ^if($param is junction){junction}{ne junction}
1126:
1127: @verifyCookie[value]
1128: ^if($cookie:dummyvote eq $value){
1129: $result(1)
1130: }{
1131: $cookie:dummyvote[$value]
1132: $result(0)
1133: }
1.16 paf 1134:
1135: @execlangs[]
1.20 paf 1136: $f[^file::exec[test.pl]]
1.36 paf 1137: err:$f.stderr<br>
1.16 paf 1138: ^process{$f.text}
1139: #$c[^t.columns[]]
1140: #^c.menu{
1141: #* $c.column<br>
1142: #}
1.36 paf 1143: c:$t.c<br>
1.16 paf 1144:
1145: @tobjeresult[]
1146: ^table::create{a
1147: 12}
1.15 paf 1148:
1149: @xmlprobs[]
1150: $xmlDataType[^xdoc::load[program.xml]]
1151: #<pre>^taint[^xmlDataType.string[]]
1152: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
1153: #=^xmlDataTypes._count[]=
1154: =^xmlDataTypes.0.getAttribute[type-id]=
1155:
1156: @doubleprobs[]
1157: $1(^math:radians(180))
1158: $2($math:PI)
1159: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
1160: ^if($1==$2){y;n}
1161: ^if(^math:radians(180)==$math:PI){y;n}
1162:
1163:
1164: @divnamestop[]
1165: $a(10)
1166: ^eval($a\3)
1167:
1168: @arrayclone[]
1169: $t[^table::create{a b
1170: 1 11
1171: 2 22
1172: }]
1173: $c[^table::create[$t]]
1174: ^c.append{2 33}
1175: ^t.count[]
1176: ^c.count[]
1177:
1178: @operator_tricks[]
1179: ^if(1){$a[^t[]]}
1180: $a!
1181: $a($b)
1182: ^if(1){y}{n}
1183: $MAIN:a(^t[] eq OK)
1184: #$MAIN:a(1)
1185: ^if($a){y}{n}
1186: #^if(1){y}{n}
1187: $form:if
1188: $a[$.n[1]]
1189: $a.if
1190:
1191: @xoutputrusattr[]
1192: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
1193: ^show_xdoc2[$d]
1194:
1195: @xdocset1[]
1196: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
1197: ^show_xdoc2[$d]
1198:
1199: @regexp3[]
1200: $s[abcАБВ]
1201: ^if(^s.match[][i]){y}{n}
1202:
1203:
1204: @exec2[]
1205: $a[^file::exec[bin/t.cmd]]
1206: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
1207:
1208:
1209: @tlock[]
1210: ^file:lock[lockfile]{
1211: code
1212: }
1213:
1214: @xmloutattrwithoutvalue[]
1215: #$ORIGINS(1)
1216: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
1217: $doc[^doc.transform[global.xsl]]
1218: =^taint[html][^doc.string[$.method[html]]]=
1219:
1220:
1221:
1222: @precisionProblem[]
1223: $a[123456789012345678901234567890]
1224: $b(^a.double[])
1225: ^b.format{%.20E}
1226: <hr>
1227: ^eval(2*2)
1228:
1229: @xpath[]
1230: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
1231: <document><block><p>привет</p></block></document>
1232: }]
1233: #^show_xdoc2[$xdoc]
1234: $node[^xdoc.selectSingle[/document/block/p]]
1235: ^if(def $node){
1236: ^if($node is string){
1237: $node
1238: }{
1239: ^if($node is hash){
1240: ^node._count[]
1241: }{
1242: $node.nodeType
1243: }
1244: }
1245: #$node.firstChild.nodeValue
1246: }{
1247: node not found
1248: }
1249:
1250:
1251: @ttablesetlang[]
1252: $a-tab-b[a b
1253: 1 2]
1254:
1255: $t[^table::set{$a-tab-b}]
1256: =$t.a=
1257: <hr>
1258:
1259: $t[^table::set[nameless]{^taint[$a-tab-b]}]
1260: =$t.0=
1261: <hr>
1262:
1263: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
1264: =$t.a=
1265:
1266: #^t.append{1 2}
1267:
1268: @mail3[]
1269: ^mail:send[
1.98 paf 1270: $.from[Александр Петросян <paf@mail.design.ru>]
1271: $.to[Александр Петросян <paf@mail.design.ru>]
1272: $.subject[проверка2]
1.15 paf 1273: $.body[
1274: $.text[
1275: $.content-type[$.value[text/plain] $.charset[windows-1251]]
1.98 paf 1276: $.body[проверка^taint[uri][москва]=]
1.15 paf 1277: ]
1278: $.attachment[
1279: $.value[^file::load[text;index.html]]
1280: $.file-name[привет всем.html]
1281: ]
1282: ]
1283: ]
1284:
1285:
1286: @ttime[]
1287: $now[^date::now[]]
1288: $now.hour:$now.minute
1289:
1290: @tupper[]
1291: $t[abcABCабвАБВ]
1292: $t<br>
1293: ^t.upper[]
1294:
1295: @treplace[]
1296: $copy-paste-clean[^table::set{a b
1297: . _
1298: , _
1299: + _
1300: & _
1301: ? _
1302: = _}]
1303:
1304: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
1305: # почему-то этот replace роняет апач в 500 ошибку :(
1306: #^cache_key.replace[$copy-paste-clean]
1307: $test[abc]
1308: ^test.save[$cache_key]saved<br>
1309: $cache[^file:list[.;\.cache^$]]
1310: ^file:delete[$cache_key]deleted($cache.name)<br>
1311:
1312:
1313:
1314: @xslt2[]
1315: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
1316: <document><block><p>привет</p></block></document>
1317: }]
1318: ^show_xdoc2[$xdoc]
1319: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
1320: <hr>
1321:
1322:
1323: @tcache2[]
1324: ^cache[$DB_HOME/keyключ](2){
1325: ^math:random(100)
1326: }
1327:
1328: @ttaintuntaint[]
1329: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
1330:
1331: ]zz
1332: <hr>
1333: ^untaint[html]{1^taint[ ]2 3}
1334:
1335:
1336: @tappend2[]
1337: $t[^table::set{a b}]^t.append{1 2}$t.a
1338:
1339: @badvsnprintf[]
1340: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
1341: }
1342:
1343:
1344: @badoracequoting[]
1345: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
1346: ^connect[$SQL.connect-string]{
1347: ^void:sql{delete from paf}
1348: ^void:sql{insert into paf values (1, '$form:text')}
1349: $paf[^table::sql{select * from paf}]
1350: ^paf.menu{
1351: $paf.id: ^untaint{$paf.block}<hr>
1352:
1353: }
1354: <hr>
1355:
1356:
1357: ^rem{
1358: $news[^table::sql{select description from news}[$.limit(3)]]
1359: ^news.menu{
1360: ^untaint{$news.description}<hr>
1361:
1362: }
1363: <hr>
1364: }
1365:
1366: $tables[^table::sql{select table_name from user_tables}]
1367: ^tables.menu{
1368: $tables.table_name<br>
1369: }
1370:
1371: }
1372: <hr>
1373: $env:PATH
1374:
1375: @badconstructors[]
1376: $bred[^string::length[]]
1377: $bred[^response::clear[]]
1378: $bred[^int::int[]]
1379:
1380:
1381: @xloadwrongtable[]
1382: $constr[^xdoc::load[wrongtable.xml]]
1383: ^show_xdoc2[$constr]
1384:
1385: @xsetwrongtable[]
1386: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
1387: <block-list>^untaint[as-is]{$constructor}</block-list>}]
1388:
1389:
1390: @tablecolumnerror[]
1391: $t[^table::set{a}]
1392: $t.$a
1393:
1394: @roll[]
1395: #$date[^date::set(1970;1;2)]
1396: #^date.roll[month](-1)
1397: $date[^date::set(2038;1;1)]
1398: ^date.roll[month](+1)
1399: $date.year $date.month $date.day
1400:
1401: @cookie2[]
1402: #=$cookie:clientType[$.value[test]]=<br>
1403: =$cookie:clientType=<br>
1404:
1405:
1406: @tableset[]
1407: $a[^table::set{a
1408: 1
1409: 2}]
1410: ^eval(100\$a)
1411:
1412:
1413:
1414: @zzz[]
1415:
1416:
1417: $constructor[
1418: <block1 name="main_srvr" type="0" label="Основное тело" />
1419: <block2 name="main_srvr2" type="0" label="Основное тело" />
1420: ]
1421:
1422: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
1423: <block-list>^untaint[as-is]{$constructor}</block-list>}]
1424:
1425: $children[$constr.documentElement.childNodes]
1426: ^if($children){
1427: ^for[i](1;^children._count[]){
1428: $node[$children.$i]
1429: $node.nodeName<br>
1430: }
1431: }
1432:
1433:
1434: @thashforeach3[]
1435: $h[
1436: $.a[1]
1437: $.b[2]
1438: ]
1439: $c[^table::set{a
1440: ^h.foreach[key;value]{$value
1441: }}]
1442: $c.a
1443:
1444: @thashforeach2[]
1445: $h[
1446: $.a[1]
1447: $.b[2]
1448: ]
1449: $c[
1450: ^h.foreach[key;value]{
1451: $.$key[$value]
1452: }
1453: ]
1454: $c.b
1455:
1456: @thashforeach[]
1457: $h[
1458: $.a[1]
1459: $.b[2]
1460: ]
1461: ^h.foreach[key;value]{
1462: $key=$value<br>
1463: }
1464:
1465: @thashdelete[]
1466: $h[$.a[1] $.b[2]]
1467: was:<br>
1468: count=^h._count[] <br>
1469: b='$h.b' <br>
1470:
1471: ^h.delete[b]
1472:
1473: now:<br>
1474: count=^h._count[] <br>
1475: b='$h.b'
1476:
1477: @sappend[]
1478: $test[123]
1479: ^test.save[test]
1480: ^test.save[append;test]
1481:
1482: @tappend[]
1483: $test[^table::set{a b
1484: a1 b1}]
1485: ^test.save[test]
1486: $test[^table::set{a b
1487: a2 b2}]
1488: ^test.save[append;test]
1489:
1490:
1491: @tform[]
1492: ^if(def $form:new_file){y}{n}
1493: <form method="post" enctype="multipart/form-data">
1494: <input type="file" name="new_file" />
1495: <input type=submit>
1496: </input>
1497:
1498: @formattest[]
1499: $size(15.124)
1500:
1501: ^size.format{%.2f}
1502:
1503: @filelist[]
1504: $html[^file:list[.;\.html^$]]
1505: ^html.menu{
1506: $html.name<br>
1507: }
1508: <hr>
1509:
1510: @безнадёжна_попытка_поправить_непоправимое[]
1511: $dom_from_disk[^xdoc::load[input.xml]]
1512: $dom_created_in_air[^xdoc::create[doc]]
1513: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
1514: ^show_xdoc2[$dom_created_in_air]
1515:
1516:
1517: @tcache[]
1518: #^hashfile:clear[cache]
1519: $code[^hashfile::open[$DB_HOME;cache]]
1520: ^code.cache[key](2){
1521: ^math:random(100)
1522: # ^code.delete[]
1523: }
1524:
1525: @thashfileexp[]
1526: $hf[^hashfile::open[$DB_HOME;hashfile]]
1527: $hf.paf[$.value[крут] $.expires(3)]
1528: paf=$hf.paf
1529: <hr>
1530: ^hf.foreach[key;value]{
1531: $key=$value<br>
1532: }
1533: <hr>
1534: $hash[^hf.hash[]]
1535: =$hash.paf=
1536: <hr>
1537:
1538: @tcounter[]
1539: ^tcounterone[$DB_HOME]
1540: other root:
1541: ^tcounterone[${DB_HOME}2]
1542: again, first:
1543: ^tcounterone[$DB_HOME]
1544:
1545: @tcounterone[DB_HOME]
1546: $counter[^hashfile::open[$DB_HOME;counter]]
1547: #^counter.clear[]
1548: ^counter.transaction{
1549: # $counter.value(10)
1550: $counter.value($counter.value+1)
1551: # ^counter.delete[value]
1552: $counter.value
1553: }
1554: <hr>
1555: ^rem{
1556: $hash[^counter.hash[]]
1557: =$hash.value=
1558: <hr>
1559: }
1560:
1561: @tablehash[]
1562: $productList[^table::set{id name
1563: 1 носки
1564: 2 валенки
1565: 3 ушанка
1566: }]
1567:
1568: #скажем, у первого дилера
1569: $firstPriceList[^table::set{id price
1570: 1 0.3
1571: 3 1000
1572: }]
1573:
1574: $firstPriceHash[^firstPriceList.hash[id]]
1575:
1576: ^productList.menu{
1577: продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
1578: }
1579:
1580:
1581: @hashfile[]
1582: $hf[^hashfile::assign[hashfile]]
1583: #$hf.paf[крут5]
1584: paf=$hf.paf
1585:
1586: @formclass[]
1587: ^$form:CLASS.a=$form:CLASS.a
1588:
1589: @domdata[]
1590: ^if(1){
1591: # $a{^hren[]}
1592: }
1593: $a
1594: $xdoc[^xdoc::create[doc]]
1595: $doc[$xdoc.documentElement]
1596: $name[^doc.appendChild[^xdoc.createElement[name]]]
1597: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
1598: ^untaint[as-is]{=$text.nodeValue=}
1599:
1600: @domedit[]
1601: ^domdata[]
1602: #$paf.nodeName<br>
1603: #$doc.documentElement.nodeName<br>
1604:
1605: ^show_xnode1[$xdoc.documentElement;0;1]
1606: <hr>
1607: ^show_xdoc2[$xdoc]
1608: <hr>
1609:
1610: @domxslt[]
1611: ^domdata[]
1612: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
1613: <hr>
1614:
1615: @lsplit2[]
1616: $path[/optics/]
1617: $pathTable[^path.lsplit[/]]
1618: ^pathTable.menu{
1619: ^if(def $pathTable.piece){
1620: =$pathTable.piece=
1621: }
1622: }
1623:
1624:
1625: @faceesize[]
1626: $k(2)
1627: $pict[^image::load[paf.gif]]
1628: $small[^image::create($pict.width/$k;$pict.height/$k)]
1629: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
1630: $response:body[^small.gif[]]
1631:
1632: @imageresize[]
1633: $k(2)
1634: $pict[^image::create(400*$k;200*$k)]
1635: $pict.line-width(2)
1636: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
1637: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
1638: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1639: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
1640: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
1641: $response:body[^pict.gif[]]
1642:
1643: #$small[^image::create($pict.width/$k;$pict.height/$k)]
1644: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
1645: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
1646:
1647: #$response:body[^small.gif[]]
1648:
1649:
1650: @tintdefault[]
1651: #$abc[abc]
1652: $abc[33]
1653: ^abc.int[z]
1654: #^abc.int(123)
1655:
1656: @ifassignhash[]
1657: $h[^if(1){$.a(1);$.a(2)}]
1658: $h.a
1659:
1660: @ifpasshash[]
1661: $a[$.e[a]]
1662: $b[$.e[b]]
1663: ^ifpasshashdest[^if(1){$a;$b}]
1664: #$x[^if(1){$a}{$b}]
1665: #^ifpasshashdest[$x]
1666:
1667: @ifpasshashdest[p]
1668: $p.e
1669:
1670: @movedir[]
1671: ^file:move[a;deeper/a]
1672:
1673: @replace[]
1674: $a[12^;3]
1675: ^a.replace[^table::set{from to
1676: 2^; !
1677: }]
1678:
1679:
1680: @set[]
1681: ^setdata[]
1682: ^a.add[$b]
1683: add:$a.3<br>
1684:
1685: ^setdata[]
1686: ^a.sub[$b]
1687: sub2:$a.2<br>
1688: sub1:$a.1<br>
1689:
1690: ^setdata[]
1691: $c[^a.union[$b]]
1692: union3:$c.3<br>
1693: union2:$c.2<br>
1694:
1695: ^setdata[]
1696: $c[^a.intersection[$b]]
1697: intersection3:$c.3<br>
1698: intersection2:$c.2<br>
1699:
1700: ^setdata[]
1701: intersects:^if(^a.intersects[$b]){y;n}<br>
1702: intersects2:^if(^a.intersects[ ]){y;n}<br>
1703:
1704:
1705: <hr>
1706:
1707: @setdata[]
1708: $a[$.1[a1] $.2[a2]]
1709: $b[ $.2[b2] $.3[b3]]
1710:
1711:
1712: @hash[]
1713: $h[^hash::create[$._default[123]]]
1714: $h.paf[not kretin]
1715: $h.paf<br>
1716: =$h.that=<br>
1717:
1718: @methresult[]
1719: $result[^table::set{1}]
1720:
1721: @terror[]
1722: ^error[method z must be called with z]
1723:
1724: @syntax1[]
1725: #^a[^b]
1726:
1727: @syntax2[]
1728: #^a[
1729:
1730: @ssave[]
1731: $abc[abc]
1732: ^abc.save[abc]
1733:
1734: @calendar[]
1.103 paf 1735: $year(2002)
1736: $month(12)
1.84 paf 1737: ${year}-${month}:<br>
1738: $week_days[^date:calendar[rus]($year;$month)]
1.15 paf 1739: <pre>
1.101 paf 1740: ^week_days.menu{^for[wday](0;6){^if($week_days.$wday){$week_days.$wday; ^; ^;} }=$week_days.week,$week_days.year=<br>}
1.15 paf 1741: </pre>
1742:
1743: @thash[]
1744: $table[^table::set{id name age
1745: 1 paf 278
1746: 2 пиф 234
1747: }]
1748: $hash[^table.hash[id;^table::set[nameless]{id
1749: name}]]
1750: $hash.2.id $hash.2.name $hash.2.age
1751:
1752: @tdef[]
1753: $s[0]
1754: if 0=^if($s){}{n}<br>
1755: if def 0=^if(def $s){y}{}<br>
1756: <hr>
1757:
1758: @ford[]
1759: ^for[i](0;5){$i}{($i)}
1760:
1761: @tif[]
1762: ^if[def]{y;n}
1763:
1764: @image[]
1765: $pict[^image::create(400;200)]
1766: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
1767: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
1768: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1769: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
1770: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
1771: $response:body[^pict.gif[]]
1772:
1773:
1774:
1775: @mail2[]
1776: ^mail:send[
1777: $.content-type[$.value[text/plain] $.charset[windows-1251]]
1778: $.from[Александр Петросян <paf@design.ru>]
1779: $.to[Александр Петросян <paf@design.ru>]
1780: $.subject[проверка]
1781: $.body[проверка]
1782: ]
1783:
1784: @cookie[]
1785: $env:HTTP_COOKIE<br>
1786:
1787: #$cookie:переменная[test тест ТЕСТ2]
1788: =$cookie:переменная=<br>
1789: #$cookie:переменная2[test тест ТЕСТ3]
1790: =$cookie:переменная2=<br>
1791: =$cookie:CLASS.переменная2=<br>
1792:
1793: @response[]
1794: #^if($form:reload){
1795: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
1796: #}
1797:
1798: @xslt[]
1799: ^xdata[]
1800: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
1801: ^show_xdoc2[$transformed]
1802:
1803: @regexp2[]
1804: $s[ select]
1805: $s[^s.match[^^\s*][]{!}]
1806: $s
1807:
1808: @header[]
1809: $response:refresh[
1810: $.value[0]
1811: $.url[http://design.ru?a=^taint[123]]
1812: ]
1813:
1814: @ttablerem[]
1815: $table[^table::load[a.cfg]]
1816: ^table.menu{$table.a}
1817:
1818: @tconnect[]
1819: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
1820: $tables[^table::sql{show tables}]
1821: #$cols[^tables.columns[]]
1822: #$cols.column
1823: ^tables.menu{
1824: $tables.[Tables_in_test]<br>
1825: }
1826: }
1827:
1828: @pcre[]
1829: $s[1 2]
1830: ^s.match[\s;ig]{!}
1831: #^s.match[\d;ig]{!}
1832:
1833:
1834: @regexp[]
1835: $s[abcАБВ]
1836: ^if(^s.match[б][i]){y}{n}
1837:
1838: @mail[]
1839: #$ORIGINS(1)
1840: ^mail:send[
1841: $.from[paf@design.ru]
1842: $.to[paf@design.ru]
1843: $.body[1
1844:
1845: 2
1846:
1847:
1848: 3]
1849: ]
1850:
1851: @exec[]
1852: $a[^file::exec[fc.exe;;a;b]]
1853: $a.status|$a.stderr<hr>
1854:
1855: @fori[][i]
1856: ^for[i](1;3){... =$i= ...}
1857:
1858: @xdata0[]
1859: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1860: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
1861: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
1862: <people>
1863: <man id="1" имя="word слово">
1864: <name>P«^;AF B</name>
1865: </man>
1866: <man id="2">
1867: <name>ПИФ^taint[&]</name>
1868: </man>
1869: </people>
1870: }]
1871:
1872: @xdata[]
1873: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1874: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
1875: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
1876: <people>
1877: <man id="1" имя="word слово">
1878: <name>P«^;AF B</name>
1879: </man>
1880: <man id="2">
1881: <name>ПИФ^taint[&]</name>
1882: </man>
1883: </people>
1884: }}]
1885:
1886: @xml[]
1887: ^xdata[]
1888:
1889: ^show_xdoc2[$xdoc]<hr>
1890: #^show_xnode1[$xdoc]<hr>
1891: $people[^xdoc.select[*/man]]
1892: #^show1[]
1893: ^show_xnodes1[$people]<hr>
1894: #^people.0.owner.hren[]
1895:
1896: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
1897:
1898: by id:
1899: ^show_xnode1[^xdoc.getElementById[1];0;1]
1900: <hr>
1901:
1902: @show1[array]
1903: ^for[i](0;^array._count[]-1){
1904: $x[$array.$i]
1905: $x.firstChild.nodeValue:
1906: $pattributes[$x.parentNode.attributes]
1907: ^if(^pattributes._count[]){
1908: $pattributes.id.name=$pattributes.id.nodeValue
1909: }
1910: <br>
1911: }
1912:
1913: @show_xnodes1[array][i]
1914: ^for[i](0;^array._count[]-1){
1915: ^show_xnode1[$array.$i;0;1]
1916: }
1917:
1918: @show_xnode1[x;level;single][l]
1919: ^if(def $x){
1920: ^for[l](0;$level-1){ ^; ^; ^; ^;}
1921: ^if($x.nodeType == $xnode:ELEMENT_NODE){
1922: <^;$x.nodeName
1923: $pairs[$x.attributes]
1924: ^if(def $pairs){
1925: $names[^pairs._keys[]]
1926: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
1927: }
1928: >^;
1929: }{
1930: [$x.nodeType]
1931: }
1932:
1933: ^if(def $x.nodeValue){$x.nodeValue}<br>
1934: ^show_xnode1[$x.firstChild]($level+1)
1935: ^if(!$single){
1936: ^show_xnode1[$x.nextSibling]($level)
1937: }
1938:
1939: ^if($x.nodeType == $xnode:ELEMENT_NODE){
1940: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
1941: }
1942: }
1943:
1944: @show_xdoc2[xdoc]
1945: ^xdoc.save[out/save.xml;
1946: # $.encoding[utf-8]
1947: $.method[xml]
1948: ]
1949: $file[^xdoc.file[
1950: $.encoding[utf-8]
1951: $.method[html]
1952: ]]
1953: ^file.save[text;out/save_file.html]
1954: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
1955: <pre>^taint[html][^xdoc.string[
1956: $.method[html]
1957: # $.encoding[utF-8]
1958: # $.omit-xml-declaration[yes]
1959: # $.standalone[no]
1960: # -$.doctype-public[-//W3C//DTD XHTML]
1961: # -$.doctype-system[/a/b/c/]
1962: # $.indent[yes]
1963: # $.media-type[text/paf]
1964: ]]
1965: </pre>
E-mail: