Annotation of parser3/www/htdocs/index.html, revision 1.53
1.42 paf 1: @USE
2: t.p
1.15 paf 3:
4: @autoz[]
5: $request:charset[windows-1251]
6: $response:charset[windows-1251]
7: $response:content-type[$.value[text/html]$.charset[$response:charset]]
8:
1.51 paf 9: @postprocess[body]
10: $body
11: <hr>
12: OK
1.37 paf 13:
1.15 paf 14: @main[]
1.51 paf 15: #^sqldefaults[]
1.49 paf 16: #^eval(2)
1.48 paf 17: #^tcrashlocaljunctionsv2[]
1.49 paf 18: #^tcrashlocaljunctions[]
1.50 paf 19: #^tjunctions[]
1.47 paf 20: #^replacetest[]
1.48 paf 21: #^matchoptionpp[]
1.46 paf 22: #^txdocxnodechild[]
1.44 paf 23: #^tclasses[]
1.43 paf 24: #$math:PI
25: #^b:method[]
1.42 paf 26: #^main[]
1.41 paf 27: #^errort[]
1.44 paf 28: #^tselectNumber[]
1.39 paf 29: #$result[hello]
1.36 paf 30: #^invaliddate2[]
31: #^process2[]
32: #^casehashtext[]
1.35 paf 33: #^subjvaltest[]
34: #^tableselect0[]
1.34 paf 35: #^memnotest1[]
1.33 paf 36: #^transparams[]
1.32 paf 37: #^voidparams[]
1.31 paf 38: #^rolls2[]
1.30 paf 39: #^cacheexpireschanging[]
1.29 paf 40: #^cacheexpiresfixed[]
41: #^dateoffsets[]
42: #^exceptionTypes[]
1.28 paf 43: #^roll2[]
1.27 paf 44: #^rolls[]
1.25 paf 45: #^exceptions1[]
1.22 paf 46: #^locate_by_expr[]
1.18 paf 47: #^method_junction_params{...}
1.17 paf 48: #^verifyCookie[paf]
1.37 paf 49: #^execlangs[]
1.16 paf 50: #$t[^tobjeresult[]]$t.a
51: #^xmlprobs[]
1.15 paf 52: #^doubleprobs[]
53: #^math:random(-10)
54: #^divnamestop[]
55: #^arrayclone[]
56: #^operator_tricks[]
57: #^xoutputrusattr[]
58: #^xdocset1[]
59: #^regexp3[]
60: #^exec2[]
61: #^tlock[]
62: #^xmloutattrwithoutvalue[]
63: #^precisionProblem[]
64: #^xpath[]
65: #^ttablesetlang[]
66: #^mail3[]
67: #^ttime[]
68: #^tupper[]
69: #^treplace[]
70: #^xslt2[]
71: #^tcache2[]
72: #$ORIGINS(1)
73: #$t[^table::set{a b} ^table::set{c d}]
74: #^ttaintuntaint[]
75: #^tappend2[]
76: #^badvsnprintf[]
77: #^badoracequoting[]
78: #^badconstructors[]
79: #^xloadwrongtable[]
80: #^xsetwrongtable[]
81: #^if($form:test){y}{n}
82: #^tablecolumnerror[]
83: #^roll[]
84: #^cookie2[]
85: #^tableset[]
86: #^math:PI.format{%.30f}
87: #^xchildren[]
88: #^thashforeach3[]
89: #^thashforeach2[]
90: #^thashforeach[]
91: #^thashdelete[]
92: #^connect[mysql://user:pass@cd.rinet.ru/db]{^void:sql{z} }
93: #^tappend[]
94: #^sappend[]
95: #^eval(10\3)<br>
96: #^tform[]
97: #^formattest[]
98: #^filelist[]
99: #^connect[mysql://user:pass@host]{ }
100: #^безнадёжна_попытка_поправить_непоправимое[]
101: #^tcache[]
102: #^thashfileexp[]
103: #^tcounter[]
104: #^tablehash[]
105: #j^hashfile[]
106: #^formclass[]
107: #^hren[]
108: #^domedit[]
109: #^domxslt[]
110: #^lsplit2[]
111: #^faceesize[]
112: #^imageresize[]
113: #^ifassignhash[]
114: #^tintdefault[]
115: #$response:status[404]
116: #^ifpasshash[]
117: #^movedir[]
118: #^replace[]
119: #^set[]
120: #^hash[]<hr>
121: #$t[^methresult[]] ->$t
122: #^terror[]
123: #^ssave[]
124: #^calendar[]
125: #^thash[]
126: #^tdef[]
127: #^ford[]
128: #^tif[]
129: #^image[]
130: #^mail2[]
131: #^cookie[]
132: #^response[]
133: #^regexp2[]
134: #^ttablerem[]
135: #^pcre[]
136: #^regexp[]<hr>
137: #^mail[]
138: #^exec[]
139: #^fori[]
140: #^tconnect[]
141: #^xslt[]
142: #^xml[]
143: #^header[]
1.53 ! paf 144: #^tablehasht[]
! 145: ^datecreatestring[]
1.51 paf 146:
1.53 ! paf 147: @datecreatestring[]
! 148: $d[^date::create[2002-12-33 01:03:04]]
! 149: ^d.sql-string[]
1.52 paf 150:
151: @method[hash]
152: $hash.key
153: @mainZ[]
154: ^method[
155: $.key{code}
156: ]
157:
1.51 paf 158: @tablehasht[]
159: $t[^table::create{p
160: 1
161: 3
162: 2
163: 4}]
164:
165: $h[^t.hash[p]]
166:
167: =^h._count[]=
168:
169:
170: @sqldefaults[]
171: ^connect[mysql://mdm:4b833ljq@db-mysql/mdm]{
172: ^int:sql{select news_id from news where news_id=-1}[$.default{2}]<br>
173: ^string:sql{select news_id from news where news_id=-1}[$.default{2}]
174: }
1.48 paf 175:
176: @tcrashlocaljunctionsv2[]
177: $a[
178: $b{ $c[1] }
179: ]
180: $b
181: $c
182:
183: @tcrashlocaljunctions[]
184: $var[aaa]
185: ^if(1){
186: ^tcrashlocaljunctions1[]
187: }
188:
189: $j
190:
1.49 paf 191: @tcrashlocaljunctions1[][var]
192: $var[varvalue]
1.48 paf 193: $j{
194: $var
195: }
1.49 paf 196: $j
1.48 paf 197:
198: @tjunctions[][tl]
199: $t[^t::create[]]
200: ^tjunctionsi[]
201:
202: @tjunctionsi[][tl]
203: $tl[12345]
204: ^t.tjunctionsm[
205: $.key{
206: $tl
207: }
208: ]
1.46 paf 209:
1.47 paf 210: @replacetest[]
211: $b[b]
212: $s[
213: aaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
214: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa${b}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
215: ]
216: ^s.replace[^table::create{from to
217: ba !_}]
218:
219:
1.46 paf 220: @matchoptionpp[]
1.47 paf 221: #$ORIGINS(1)
1.46 paf 222: $s[
223: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.47 paf 224: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
225: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
226: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
227: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
228: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
229: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
230: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
231: aaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
232: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1.46 paf 233: ]
234: ^s.match[b;g']{($match.prematch|$match.match|$match.postmatch)}
235:
1.44 paf 236:
237: @txdocxnodechild[]
238: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?><d/>}]
239: $xdoc.nodeName
240: ^xdoc.selectNumber[2*2]
1.45 paf 241: $xdoc:ELEMENT_NODE
1.44 paf 242:
243:
244: @tclasses[]
245: $t[^t::create[]]
246: ^t.method[]
247: <hr>
248: ^t.base_method[]
249:
1.40 paf 250:
251: @errort[]
1.42 paf 252: ^xdoc::create[a]
1.40 paf 253: #^throw[user;here;this]
254:
255: @tselectNumber[]
256: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет" n="123"/>}]
257: ^d.selectString[string(d/@attr)]<br>
258: ^d.selectNumber[2*2]<br>
259: ^d.selectNumber[number(/d/@n)+1]<br>
260:
1.34 paf 261:
1.36 paf 262: @invaliddate2[]
263: $d[^date::create(1018946575/60/60)] ^d.sql-string[]
264:
265: @process2[]
266: ^^process{
267: ^process{
268: ^$a[^^if(0){^$.k[y]}{^$.k[^^hren[]n]}] ^$a.k
269: }
270: }
271:
1.35 paf 272: @casehashtext[]
273: $tt[1]
274: $tmp[
275: ^switch[$tt]{
276: ^case[1]{
277: $.aaa[123]
278: }
279: ^case[DEFAULT]{
280: $.bbb[456]
281: }
282: }
1.36 paf 283: shit!
1.35 paf 284: ]
1.36 paf 285: #$tmp
1.35 paf 286: $tmp.aaa
287:
288: @subjvaltest[]
289: $a12[val]
290: $b[12]
291: $a$b
292:
1.34 paf 293: @tableselect0[]
294: $person[^table::create{name height
295: paf 1.77
296: шохин 2.07
297: moko 1.77
298: }]
299: $nottoohigh[^person.select($person.height<2)]
300: ^nottoohigh.menu{$nottoohigh.name<br>}
1.32 paf 301:
302: @transparams[]
303: $idoc[^xdoc::create{<?xml version="1.0" ?><doc/>}]
304: $odoc[^idoc.transform[global.xsl;
305: $.param1['1']
306: $.param2['2']
307: ]]
308: <pre>^taint[^odoc.string[$.method[html]]]
309:
310: @memnotest1[]
311: ^for[i](0;4000){
312:
313: $xxxx[$i]
314: $xxxx
315:
316: }
317:
318: @memnotest1notes[]
319: одна итерация цикла:
320: [Mon Apr 8 20:12:02 2002] execution-------------------------|
1.35 paf 321: '469641+=28 wcodeframe -> 0 !optimize[3]''469669+=49 string от {} -> 0 optimize[3]'
1.32 paf 322: [Mon Apr 8 20:12:02 2002] 12:STRING__WRITE
323: [Mon Apr 8 20:12:02 2002] "|| "
324: [Mon Apr 8 20:12:02 2002] 12:WITH_ROOT
325: [Mon Apr 8 20:12:02 2002] 13:VALUE
326: [Mon Apr 8 20:12:02 2002] "xxxx" string
1.35 paf 327: [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 328: [Mon Apr 8 20:12:02 2002] 16:WITH_READ
329: [Mon Apr 8 20:12:02 2002] 17:VALUE
330: [Mon Apr 8 20:12:02 2002] "i" string
331: [Mon Apr 8 20:12:02 2002] 18:GET_ELEMENT
1.35 paf 332: [Mon Apr 8 20:12:02 2002] 17:WRITE_VALUE'469452+=40 MAX_NUMBER -> !~2 actual digits''469492+=49 -> 41 !'
333: [Mon Apr 8 20:12:02 2002] 16:REDUCE_EWPOOL'469541+=24 VString -> 0 optimize[5]'
1.32 paf 334: [Mon Apr 8 20:12:02 2002] 15:CONSTRUCT_VALUE
335: [Mon Apr 8 20:12:02 2002] 12:STRING__WRITE
336: [Mon Apr 8 20:12:02 2002] "| "
337: [Mon Apr 8 20:12:02 2002] 12:WITH_READ
338: [Mon Apr 8 20:12:02 2002] 13:VALUE
339: [Mon Apr 8 20:12:02 2002] "xxxx" string
340: [Mon Apr 8 20:12:02 2002] 14:GET_ELEMENT
341: [Mon Apr 8 20:12:02 2002] 13:WRITE_VALUE'469573+=41 string expand nothing for now'
342: [Mon Apr 8 20:12:02 2002] 12:STRING__WRITE
1.35 paf 343: [Mon Apr 8 20:12:02 2002] "||"'469617+=24 VString -> 0 !optimize[6]'
1.32 paf 344: [Mon Apr 8 20:12:02 2002] <-ja returned
345: [Mon Apr 8 20:12:02 2002] ja->
346:
347: 201/328=0.612804878049 %%optimized
348:
349: 1.
350: CREATE_*POOL
351: сделать
352: *POOL_POOLED+CODE
353: где
354: wwrapper
355: и(возможно) wcodeframe
356: +string
357: стековая переменная
358:
359: 2.
360: избавиться от обёртки при возврате результата process [см. тело _for]
361:
362: 3.
363: сделать callback для process, чтобы вынести invariants из _for & co.
364:
365: 4.
366: @todo склеить get_element и write_value (при вставлении? write_value)
367:
368: 5.
369: reduce_*pool -> вариант получить именно string, без VString обёртки [часто
370: обёртка сразу выбрасывается = не нужна]
371:
372: 6.
373: process вариант получить именно string, без VString обёртки [часто обёртка
374: сразу выбрасывается = не нужна]
375:
376: 7.
377: string head, убить 8 байт неправильной link
1.31 paf 378:
379: @voidparams[]
380: ^voidparamsm[$form:field]
381:
382: @voidparamsm[p]
383: ^p.int(123)
1.29 paf 384:
1.30 paf 385: @rolls2[]
386: $now[^date::now[]]
387: $d[^date::create($now.year;$now.month)] ^d.sql-string[]<br>
388: ^for[i](1;12){
389: ^d.roll[month](-1) ^d.sql-string[]<br>
390: }
391:
1.29 paf 392: @cacheexpireschanging[]
393: ^cache[$DB_HOME/keyключ][^date::now(+1)]{ ^rem{1 day}
394: ^cache[^date::now(+4/24/60/60)]
395: # ^cache(2)
1.30 paf 396: # ^cache(0)
1.29 paf 397: ^math:random(100)
398: }
399:
400:
401:
402: @cacheexpiresfixed[]
403: ^cache[$DB_HOME/keyключ][^date::now(+2/24/60/60)]{
404: ^math:random(100)
405: }
406:
407: @dateoffsets[]
408: $d[^date::create(^date::now[]+1/24/60)]
409: #$d[^date::now(+1/24/60)]
410: ^d.sql-string[]
411: #$d
1.26 paf 412:
1.28 paf 413: @exceptionTypes[]
414: # parser.compile ^test[} компиляция (непарная скобка, ...)
415: # parser.runtime ^if(0). параметры (больше/меньше, чем нужно, не тех типов, ...)
416: # number.zerodivision ^eval(1/0) ^eval(1%0)
417: # number.format ^eval(abc*5)
418: # file.missing ^file:delete[delme] not found
419: # file.access ^table::load[.] no rights
420: # image.format ^image::measure[index.html] not gif/jpg
421: # sql.connect ^connect[mysql://baduser:pass@host/db]{} not found/timeout
422: # sql.execute ^connect[mysql://okuser:pass@host/db]{^void:sql{select bad}} syntax error
423: # xml ^xdoc::create{<forgot?>} any error in xml/xslt libs
424: # smtp.connect not found/timeout
425: # smtp.execute communication error
426:
1.26 paf 427: @roll2[]
428: $d[^date::create(2002;4;2;2;2;3)] ^d.sql-string[]<br>
1.27 paf 429: ^d.roll[day](+365*3+1) ^d.sql-string[]<br>
1.26 paf 430:
1.25 paf 431:
432: @rolls[]
433: $d[^date::create(2002;4;4)]
434: ^d.sql-string[]<br>
435: ^for[i](1;7){
436: ^d.roll[day](-1)
437: ^d.sql-string[]<br>
438: }
439: <hr>
440: $d[^date::create(2002;3;28)]
441: ^d.sql-string[]<br>
442: ^for[i](1;7){
443: ^d.roll[day](+1)
444: ^d.sql-string[]<br>
445: }
446: <hr>
447: $d[^date::create(2002;12;3)]
448: ^d.sql-string[]<br>
449: ^for[i](1;14){
450: ^d.roll[day](-1)
451: ^d.sql-string[]<br>
452: }
453: <hr>
454: $d[^date::create(2002;10;19)]
455: ^d.sql-string[]<br>
456: ^for[i](1;14){
457: ^d.roll[day](+1)
458: ^d.sql-string[]<br>
459: }
460:
461:
462:
463:
464:
1.22 paf 465:
466: @exceptions1[]
467: ^try{
468: aaa
1.24 paf 469: ^throw[custom1;paf;is stupid]
1.22 paf 470: }{
1.24 paf 471: ^if($exception.type eq custom1){
1.28 paf 472: # $exception.handled(1)
473: ^throw[$exception]
1.24 paf 474: type=$exception.type<br>
475: source=$exception.source<br>
476: file=$exception.file<br>
477: lineno=$exception.lineno<br>
478: comment=$exception.comment<br>
479: }
1.22 paf 480: }
1.21 paf 481:
482: @locate_by_expr[]
483: $t[^table::create{a b
484: 1 nok
485: 2 ok
486: 3 nok
487: }]
488: ^if(^t.locate($t.a==2)){$t.b}{n}
1.17 paf 489:
490: @method_junction_params[param]
491: ^if($param is junction){junction}{ne junction}
492:
493: @verifyCookie[value]
494: ^if($cookie:dummyvote eq $value){
495: $result(1)
496: }{
497: $cookie:dummyvote[$value]
498: $result(0)
499: }
1.16 paf 500:
501: @execlangs[]
1.20 paf 502: $f[^file::exec[test.pl]]
1.36 paf 503: err:$f.stderr<br>
1.16 paf 504: ^process{$f.text}
505: #$c[^t.columns[]]
506: #^c.menu{
507: #* $c.column<br>
508: #}
1.36 paf 509: c:$t.c<br>
1.16 paf 510:
511: @tobjeresult[]
512: ^table::create{a
513: 12}
1.15 paf 514:
515: @xmlprobs[]
516: $xmlDataType[^xdoc::load[program.xml]]
517: #<pre>^taint[^xmlDataType.string[]]
518: $xmlDataTypes[^xmlDataType.select[programs/program[@id=4]/data]]
519: #=^xmlDataTypes._count[]=
520: =^xmlDataTypes.0.getAttribute[type-id]=
521:
522: @doubleprobs[]
523: $1(^math:radians(180))
524: $2($math:PI)
525: ^if(^1.format[%.10f]==^2.format[%.10f]){y;n}
526: ^if($1==$2){y;n}
527: ^if(^math:radians(180)==$math:PI){y;n}
528:
529:
530: @divnamestop[]
531: $a(10)
532: ^eval($a\3)
533:
534: @arrayclone[]
535: $t[^table::create{a b
536: 1 11
537: 2 22
538: }]
539: $c[^table::create[$t]]
540: ^c.append{2 33}
541: ^t.count[]
542: ^c.count[]
543:
544: @operator_tricks[]
545: ^if(1){$a[^t[]]}
546: $a!
547: $a($b)
548: ^if(1){y}{n}
549: $MAIN:a(^t[] eq OK)
550: #$MAIN:a(1)
551: ^if($a){y}{n}
552: #^if(1){y}{n}
553: $form:if
554: $a[$.n[1]]
555: $a.if
556:
557: @xoutputrusattr[]
558: $d[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?><d attr="привет"/>}]
559: ^show_xdoc2[$d]
560:
561: @xdocset1[]
562: $d[^xdoc::set{<?xml version="1.0"?><d>=^taint[&]=</d>}]
563: ^show_xdoc2[$d]
564:
565: @regexp3[]
566: $s[abcАБВ]
567: ^if(^s.match[][i]){y}{n}
568:
569:
570: @exec2[]
571: $a[^file::exec[bin/t.cmd]]
572: <pre>^taint[$a.text]</pre>|$a.status|$a.stderr<hr>
573:
574:
575: @tlock[]
576: ^file:lock[lockfile]{
577: code
578: }
579:
580: @xmloutattrwithoutvalue[]
581: #$ORIGINS(1)
582: $doc[^xdoc::set{<?xml version="1.0"?><doc background="">zz</doc>}]
583: $doc[^doc.transform[global.xsl]]
584: =^taint[html][^doc.string[$.method[html]]]=
585:
586:
587:
588: @precisionProblem[]
589: $a[123456789012345678901234567890]
590: $b(^a.double[])
591: ^b.format{%.20E}
592: <hr>
593: ^eval(2*2)
594:
595: @xpath[]
596: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
597: <document><block><p>привет</p></block></document>
598: }]
599: #^show_xdoc2[$xdoc]
600: $node[^xdoc.selectSingle[/document/block/p]]
601: ^if(def $node){
602: ^if($node is string){
603: $node
604: }{
605: ^if($node is hash){
606: ^node._count[]
607: }{
608: $node.nodeType
609: }
610: }
611: #$node.firstChild.nodeValue
612: }{
613: node not found
614: }
615:
616:
617: @ttablesetlang[]
618: $a-tab-b[a b
619: 1 2]
620:
621: $t[^table::set{$a-tab-b}]
622: =$t.a=
623: <hr>
624:
625: $t[^table::set[nameless]{^taint[$a-tab-b]}]
626: =$t.0=
627: <hr>
628:
629: $t[^table::set{^untaint{^taint[$a-tab-b]}}]
630: =$t.a=
631:
632: #^t.append{1 2}
633:
634: @mail3[]
635: ^mail:send[
636: $.from[Александр Петросян <paf@design.ru>]
637: $.to[Александр Петросян <paf@design.ru>]
638: $.subject[проверка4]
639: $.body[
640: $.text[
641: $.content-type[$.value[text/plain] $.charset[windows-1251]]
642: $.body[проверка]
643: ]
644: $.attachment[
645: $.value[^file::load[text;index.html]]
646: $.file-name[привет всем.html]
647: ]
648: ]
649: ]
650:
651:
652: @ttime[]
653: $now[^date::now[]]
654: $now.hour:$now.minute
655:
656: @tupper[]
657: $t[abcABCабвАБВ]
658: $t<br>
659: ^t.upper[]
660:
661: @treplace[]
662: $copy-paste-clean[^table::set{a b
663: . _
664: , _
665: + _
666: & _
667: ? _
668: = _}]
669:
670: $cache_key[^taint[в.а,с+я]&был?тут=недавно.cache]
671: # почему-то этот replace роняет апач в 500 ошибку :(
672: #^cache_key.replace[$copy-paste-clean]
673: $test[abc]
674: ^test.save[$cache_key]saved<br>
675: $cache[^file:list[.;\.cache^$]]
676: ^file:delete[$cache_key]deleted($cache.name)<br>
677:
678:
679:
680: @xslt2[]
681: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
682: <document><block><p>привет</p></block></document>
683: }]
684: ^show_xdoc2[$xdoc]
685: ^show_xdoc2[^xdoc.transform[templates/_document.xslt]]
686: <hr>
687:
688:
689: @tcache2[]
690: ^cache[$DB_HOME/keyключ](2){
691: ^math:random(100)
692: }
693:
694: @ttaintuntaint[]
695: <!-- некий панковский заголовок с буковкой C в круглых скобках -->^taint[html][
696:
697: ]zz
698: <hr>
699: ^untaint[html]{1^taint[ ]2 3}
700:
701:
702: @tappend2[]
703: $t[^table::set{a b}]^t.append{1 2}$t.a
704:
705: @badvsnprintf[]
706: ^connect[zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz]{
707: }
708:
709:
710: @badoracequoting[]
711: $SQL.connect-string[oracle://webspb:webpwd@mts?NLS_LANG=RUSSIAN_AMERICA.CL8MSWIN1251&NLS_DATE_FORMAT=YYYY-MM-DD HH24:MI:SS]
712: ^connect[$SQL.connect-string]{
713: ^void:sql{delete from paf}
714: ^void:sql{insert into paf values (1, '$form:text')}
715: $paf[^table::sql{select * from paf}]
716: ^paf.menu{
717: $paf.id: ^untaint{$paf.block}<hr>
718:
719: }
720: <hr>
721:
722:
723: ^rem{
724: $news[^table::sql{select description from news}[$.limit(3)]]
725: ^news.menu{
726: ^untaint{$news.description}<hr>
727:
728: }
729: <hr>
730: }
731:
732: $tables[^table::sql{select table_name from user_tables}]
733: ^tables.menu{
734: $tables.table_name<br>
735: }
736:
737: }
738: <hr>
739: $env:PATH
740:
741: @badconstructors[]
742: $bred[^string::length[]]
743: $bred[^response::clear[]]
744: $bred[^int::int[]]
745:
746:
747: @xloadwrongtable[]
748: $constr[^xdoc::load[wrongtable.xml]]
749: ^show_xdoc2[$constr]
750:
751: @xsetwrongtable[]
752: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251z" ?>
753: <block-list>^untaint[as-is]{$constructor}</block-list>}]
754:
755:
756: @tablecolumnerror[]
757: $t[^table::set{a}]
758: $t.$a
759:
760: @roll[]
761: #$date[^date::set(1970;1;2)]
762: #^date.roll[month](-1)
763: $date[^date::set(2038;1;1)]
764: ^date.roll[month](+1)
765: $date.year $date.month $date.day
766:
767: @cookie2[]
768: #=$cookie:clientType[$.value[test]]=<br>
769: =$cookie:clientType=<br>
770:
771:
772: @tableset[]
773: $a[^table::set{a
774: 1
775: 2}]
776: ^eval(100\$a)
777:
778:
779:
780: @zzz[]
781:
782:
783: $constructor[
784: <block1 name="main_srvr" type="0" label="Основное тело" />
785: <block2 name="main_srvr2" type="0" label="Основное тело" />
786: ]
787:
788: $constr[^xdoc::set{<?xml version="1.0" encoding="windows-1251" ?>
789: <block-list>^untaint[as-is]{$constructor}</block-list>}]
790:
791: $children[$constr.documentElement.childNodes]
792: ^if($children){
793: ^for[i](1;^children._count[]){
794: $node[$children.$i]
795: $node.nodeName<br>
796: }
797: }
798:
799:
800: @thashforeach3[]
801: $h[
802: $.a[1]
803: $.b[2]
804: ]
805: $c[^table::set{a
806: ^h.foreach[key;value]{$value
807: }}]
808: $c.a
809:
810: @thashforeach2[]
811: $h[
812: $.a[1]
813: $.b[2]
814: ]
815: $c[
816: ^h.foreach[key;value]{
817: $.$key[$value]
818: }
819: ]
820: $c.b
821:
822: @thashforeach[]
823: $h[
824: $.a[1]
825: $.b[2]
826: ]
827: ^h.foreach[key;value]{
828: $key=$value<br>
829: }
830:
831: @thashdelete[]
832: $h[$.a[1] $.b[2]]
833: was:<br>
834: count=^h._count[] <br>
835: b='$h.b' <br>
836:
837: ^h.delete[b]
838:
839: now:<br>
840: count=^h._count[] <br>
841: b='$h.b'
842:
843: @sappend[]
844: $test[123]
845: ^test.save[test]
846: ^test.save[append;test]
847:
848: @tappend[]
849: $test[^table::set{a b
850: a1 b1}]
851: ^test.save[test]
852: $test[^table::set{a b
853: a2 b2}]
854: ^test.save[append;test]
855:
856:
857: @tform[]
858: ^if(def $form:new_file){y}{n}
859: <form method="post" enctype="multipart/form-data">
860: <input type="file" name="new_file" />
861: <input type=submit>
862: </input>
863:
864: @formattest[]
865: $size(15.124)
866:
867: ^size.format{%.2f}
868:
869: @filelist[]
870: $html[^file:list[.;\.html^$]]
871: ^html.menu{
872: $html.name<br>
873: }
874: <hr>
875:
876: @безнадёжна_попытка_поправить_непоправимое[]
877: $dom_from_disk[^xdoc::load[input.xml]]
878: $dom_created_in_air[^xdoc::create[doc]]
879: ^dom_created_in_air.documentElement.appendChild[^dom_from_disk.documentElement.cloneNode(1)]
880: ^show_xdoc2[$dom_created_in_air]
881:
882:
883: @tcache[]
884: #^hashfile:clear[cache]
885: $code[^hashfile::open[$DB_HOME;cache]]
886: ^code.cache[key](2){
887: ^math:random(100)
888: # ^code.delete[]
889: }
890:
891: @thashfileexp[]
892: $hf[^hashfile::open[$DB_HOME;hashfile]]
893: $hf.paf[$.value[крут] $.expires(3)]
894: paf=$hf.paf
895: <hr>
896: ^hf.foreach[key;value]{
897: $key=$value<br>
898: }
899: <hr>
900: $hash[^hf.hash[]]
901: =$hash.paf=
902: <hr>
903:
904: @tcounter[]
905: ^tcounterone[$DB_HOME]
906: other root:
907: ^tcounterone[${DB_HOME}2]
908: again, first:
909: ^tcounterone[$DB_HOME]
910:
911: @tcounterone[DB_HOME]
912: $counter[^hashfile::open[$DB_HOME;counter]]
913: #^counter.clear[]
914: ^counter.transaction{
915: # $counter.value(10)
916: $counter.value($counter.value+1)
917: # ^counter.delete[value]
918: $counter.value
919: }
920: <hr>
921: ^rem{
922: $hash[^counter.hash[]]
923: =$hash.value=
924: <hr>
925: }
926:
927: @tablehash[]
928: $productList[^table::set{id name
929: 1 носки
930: 2 валенки
931: 3 ушанка
932: }]
933:
934: #скажем, у первого дилера
935: $firstPriceList[^table::set{id price
936: 1 0.3
937: 3 1000
938: }]
939:
940: $firstPriceHash[^firstPriceList.hash[id]]
941:
942: ^productList.menu{
943: продукт "$productList.name" | цена у first: $firstPriceHash.[$productList.id].price<br>
944: }
945:
946:
947: @hashfile[]
948: $hf[^hashfile::assign[hashfile]]
949: #$hf.paf[крут5]
950: paf=$hf.paf
951:
952: @formclass[]
953: ^$form:CLASS.a=$form:CLASS.a
954:
955: @domdata[]
956: ^if(1){
957: # $a{^hren[]}
958: }
959: $a
960: $xdoc[^xdoc::create[doc]]
961: $doc[$xdoc.documentElement]
962: $name[^doc.appendChild[^xdoc.createElement[name]]]
963: $text[^name.appendChild[^xdoc.createTextNode[петросян&coz]]]
964: ^untaint[as-is]{=$text.nodeValue=}
965:
966: @domedit[]
967: ^domdata[]
968: #$paf.nodeName<br>
969: #$doc.documentElement.nodeName<br>
970:
971: ^show_xnode1[$xdoc.documentElement;0;1]
972: <hr>
973: ^show_xdoc2[$xdoc]
974: <hr>
975:
976: @domxslt[]
977: ^domdata[]
978: ^show_xdoc2[^xdoc.transform[global.xsl;$.param1[123/]]]
979: <hr>
980:
981: @lsplit2[]
982: $path[/optics/]
983: $pathTable[^path.lsplit[/]]
984: ^pathTable.menu{
985: ^if(def $pathTable.piece){
986: =$pathTable.piece=
987: }
988: }
989:
990:
991: @faceesize[]
992: $k(2)
993: $pict[^image::load[paf.gif]]
994: $small[^image::create($pict.width/$k;$pict.height/$k)]
995: ^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;250)
996: $response:body[^small.gif[]]
997:
998: @imageresize[]
999: $k(2)
1000: $pict[^image::create(400*$k;200*$k)]
1001: $pict.line-width(2)
1002: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
1003: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-20;$pict.height-20;0+20;360-20;0xff0000)
1004: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1005: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-20;0x0000ff)
1006: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+20;360-20;0xff0000)
1007: $response:body[^pict.gif[]]
1008:
1009: #$small[^image::create($pict.width/$k;$pict.height/$k)]
1010: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0)
1011: #^small.copy[$pict](0;0;$pict.width;$pict.height;0;0;$small.width;$small.height;0)
1012:
1013: #$response:body[^small.gif[]]
1014:
1015:
1016: @tintdefault[]
1017: #$abc[abc]
1018: $abc[33]
1019: ^abc.int[z]
1020: #^abc.int(123)
1021:
1022: @ifassignhash[]
1023: $h[^if(1){$.a(1);$.a(2)}]
1024: $h.a
1025:
1026: @ifpasshash[]
1027: $a[$.e[a]]
1028: $b[$.e[b]]
1029: ^ifpasshashdest[^if(1){$a;$b}]
1030: #$x[^if(1){$a}{$b}]
1031: #^ifpasshashdest[$x]
1032:
1033: @ifpasshashdest[p]
1034: $p.e
1035:
1036: @movedir[]
1037: ^file:move[a;deeper/a]
1038:
1039: @replace[]
1040: $a[12^;3]
1041: ^a.replace[^table::set{from to
1042: 2^; !
1043: }]
1044:
1045:
1046: @set[]
1047: ^setdata[]
1048: ^a.add[$b]
1049: add:$a.3<br>
1050:
1051: ^setdata[]
1052: ^a.sub[$b]
1053: sub2:$a.2<br>
1054: sub1:$a.1<br>
1055:
1056: ^setdata[]
1057: $c[^a.union[$b]]
1058: union3:$c.3<br>
1059: union2:$c.2<br>
1060:
1061: ^setdata[]
1062: $c[^a.intersection[$b]]
1063: intersection3:$c.3<br>
1064: intersection2:$c.2<br>
1065:
1066: ^setdata[]
1067: intersects:^if(^a.intersects[$b]){y;n}<br>
1068: intersects2:^if(^a.intersects[ ]){y;n}<br>
1069:
1070:
1071: <hr>
1072:
1073: @setdata[]
1074: $a[$.1[a1] $.2[a2]]
1075: $b[ $.2[b2] $.3[b3]]
1076:
1077:
1078: @hash[]
1079: $h[^hash::create[$._default[123]]]
1080: $h.paf[not kretin]
1081: $h.paf<br>
1082: =$h.that=<br>
1083:
1084: @methresult[]
1085: $result[^table::set{1}]
1086:
1087: @terror[]
1088: ^error[method z must be called with z]
1089:
1090: @syntax1[]
1091: #^a[^b]
1092:
1093: @syntax2[]
1094: #^a[
1095:
1096: @ssave[]
1097: $abc[abc]
1098: ^abc.save[abc]
1099:
1100: @calendar[]
1101: 2001;11:<br>
1102: $week_days[^date:calendar[rus](2001;11)]
1103: <pre>
1104: ^week_days.menu{^for[wday](0;7){^if($week_days.$wday){$week_days.$wday; ^; ^;} }<br>}
1105: </pre>
1106:
1107: @thash[]
1108: $table[^table::set{id name age
1109: 1 paf 278
1110: 2 пиф 234
1111: }]
1112: $hash[^table.hash[id;^table::set[nameless]{id
1113: name}]]
1114: $hash.2.id $hash.2.name $hash.2.age
1115:
1116: @tdef[]
1117: $s[0]
1118: if 0=^if($s){}{n}<br>
1119: if def 0=^if(def $s){y}{}<br>
1120: <hr>
1121:
1122: @ford[]
1123: ^for[i](0;5){$i}{($i)}
1124:
1125: @tif[]
1126: ^if[def]{y;n}
1127:
1128: @image[]
1129: $pict[^image::create(400;200)]
1130: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-1;$pict.height-1;0;360;0x000000)
1131: ^pict.arc($pict.width/2;$pict.height/2;$pict.width-10;$pict.height-10;0+10;360-10;0xff0000)
1132: #^pict.arc($pict.width/2;$pict.height/2;$pict.width;$pict.height;0;360;0xff0000)
1133: ^pict.circle($pict.width/2;$pict.height/2;$pict.height/2-10;0x0000ff)
1134: ^pict.arc($pict.width/2;$pict.height/2;$pict.height-26;$pict.height-26;0+10;360-10;0xff0000)
1135: $response:body[^pict.gif[]]
1136:
1137:
1138:
1139: @mail2[]
1140: ^mail:send[
1141: $.content-type[$.value[text/plain] $.charset[windows-1251]]
1142: $.from[Александр Петросян <paf@design.ru>]
1143: $.to[Александр Петросян <paf@design.ru>]
1144: $.subject[проверка]
1145: $.body[проверка]
1146: ]
1147:
1148: @cookie[]
1149: $env:HTTP_COOKIE<br>
1150:
1151: #$cookie:переменная[test тест ТЕСТ2]
1152: =$cookie:переменная=<br>
1153: #$cookie:переменная2[test тест ТЕСТ3]
1154: =$cookie:переменная2=<br>
1155: =$cookie:CLASS.переменная2=<br>
1156:
1157: @response[]
1158: #^if($form:reload){
1159: $response:refresh[$.value[0] $.url[./t.html?uri=$env:SERVER_NAME]]
1160: #}
1161:
1162: @xslt[]
1163: ^xdata[]
1164: $transformed[^xdoc.transform[global.xsl;$.param1[123/]]]
1165: ^show_xdoc2[$transformed]
1166:
1167: @regexp2[]
1168: $s[ select]
1169: $s[^s.match[^^\s*][]{!}]
1170: $s
1171:
1172: @header[]
1173: $response:refresh[
1174: $.value[0]
1175: $.url[http://design.ru?a=^taint[123]]
1176: ]
1177:
1178: @ttablerem[]
1179: $table[^table::load[a.cfg]]
1180: ^table.menu{$table.a}
1181:
1182: @tconnect[]
1183: ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
1184: $tables[^table::sql{show tables}]
1185: #$cols[^tables.columns[]]
1186: #$cols.column
1187: ^tables.menu{
1188: $tables.[Tables_in_test]<br>
1189: }
1190: }
1191:
1192: @pcre[]
1193: $s[1 2]
1194: ^s.match[\s;ig]{!}
1195: #^s.match[\d;ig]{!}
1196:
1197:
1198: @regexp[]
1199: $s[abcАБВ]
1200: ^if(^s.match[б][i]){y}{n}
1201:
1202: @mail[]
1203: #$ORIGINS(1)
1204: ^mail:send[
1205: $.from[paf@design.ru]
1206: $.to[paf@design.ru]
1207: $.body[1
1208:
1209: 2
1210:
1211:
1212: 3]
1213: ]
1214:
1215: @exec[]
1216: $a[^file::exec[fc.exe;;a;b]]
1217: $a.status|$a.stderr<hr>
1218:
1219: @fori[][i]
1220: ^for[i](1;3){... =$i= ...}
1221:
1222: @xdata0[]
1223: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1224: $xdoc[^xdoc::set{<?xml version="1.0" encoding="windows-1251"?>
1225: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
1226: <people>
1227: <man id="1" имя="word слово">
1228: <name>P«^;AF B</name>
1229: </man>
1230: <man id="2">
1231: <name>ПИФ^taint[&]</name>
1232: </man>
1233: </people>
1234: }]
1235:
1236: @xdata[]
1237: #$response:content-type[$.value[text/html] $.charset[windows-1251]]
1238: $xdoc[^xdoc::set{^process{<?xml version="1.0" encoding="windows-1251"?>
1239: <!--DOCTYPE people SYSTEM "D:\Y\parser3project\parser3\src\www\htdocs\people.dtd"-->
1240: <people>
1241: <man id="1" имя="word слово">
1242: <name>P«^;AF B</name>
1243: </man>
1244: <man id="2">
1245: <name>ПИФ^taint[&]</name>
1246: </man>
1247: </people>
1248: }}]
1249:
1250: @xml[]
1251: ^xdata[]
1252:
1253: ^show_xdoc2[$xdoc]<hr>
1254: #^show_xnode1[$xdoc]<hr>
1255: $people[^xdoc.select[*/man]]
1256: #^show1[]
1257: ^show_xnodes1[$people]<hr>
1258: #^people.0.owner.hren[]
1259:
1260: ^show_xnode1[^xdoc.selectSingle[*/man[2]/name];0;1]<hr>
1261:
1262: by id:
1263: ^show_xnode1[^xdoc.getElementById[1];0;1]
1264: <hr>
1265:
1266: @show1[array]
1267: ^for[i](0;^array._count[]-1){
1268: $x[$array.$i]
1269: $x.firstChild.nodeValue:
1270: $pattributes[$x.parentNode.attributes]
1271: ^if(^pattributes._count[]){
1272: $pattributes.id.name=$pattributes.id.nodeValue
1273: }
1274: <br>
1275: }
1276:
1277: @show_xnodes1[array][i]
1278: ^for[i](0;^array._count[]-1){
1279: ^show_xnode1[$array.$i;0;1]
1280: }
1281:
1282: @show_xnode1[x;level;single][l]
1283: ^if(def $x){
1284: ^for[l](0;$level-1){ ^; ^; ^; ^;}
1285: ^if($x.nodeType == $xnode:ELEMENT_NODE){
1286: <^;$x.nodeName
1287: $pairs[$x.attributes]
1288: ^if(def $pairs){
1289: $names[^pairs._keys[]]
1290: ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
1291: }
1292: >^;
1293: }{
1294: [$x.nodeType]
1295: }
1296:
1297: ^if(def $x.nodeValue){$x.nodeValue}<br>
1298: ^show_xnode1[$x.firstChild]($level+1)
1299: ^if(!$single){
1300: ^show_xnode1[$x.nextSibling]($level)
1301: }
1302:
1303: ^if($x.nodeType == $xnode:ELEMENT_NODE){
1304: ^for[l](0;$level-1){ ^; ^; ^; ^;}<^;/$x.nodeName>^;<br>
1305: }
1306: }
1307:
1308: @show_xdoc2[xdoc]
1309: ^xdoc.save[out/save.xml;
1310: # $.encoding[utf-8]
1311: $.method[xml]
1312: ]
1313: $file[^xdoc.file[
1314: $.encoding[utf-8]
1315: $.method[html]
1316: ]]
1317: ^file.save[text;out/save_file.html]
1318: #$response:body[^xdoc.file[ $.media-type[text/paf] ]]
1319: <pre>^taint[html][^xdoc.string[
1320: $.method[html]
1321: # $.encoding[utF-8]
1322: # $.omit-xml-declaration[yes]
1323: # $.standalone[no]
1324: # -$.doctype-public[-//W3C//DTD XHTML]
1325: # -$.doctype-system[/a/b/c/]
1326: # $.indent[yes]
1327: # $.media-type[text/paf]
1328: ]]
1329: </pre>
E-mail: