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