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