--- parser3/www/htdocs/Attic/_bug.html 2004/03/19 12:23:04 1.32 +++ parser3/www/htdocs/Attic/_bug.html 2004/03/25 11:51:19 1.35 @@ -1,34 +1,66 @@ +@auto[] +$request:charset[windows-1251] +$response:charset[windows-1251] + + @main[] -$soft(1) -^cache[/cache/soft-$soft.id](86400){ -^math:random(1000); +$table[^table::create{pet +cat milk}] +$hash[^table.hash[pet]] +^display[$hash] + +@main[] +^connect[mysql://root@localhost/paf]{ + +$hash[^hash::sql{select 'cat' as pet +#, 'milk' as food +}] +^display_hash[$hash] + + } -#^xdoc::load[a.xml] -@main2[] -^connect[odbc://DSN=test_dbf]{ -^int:sql{select count(*) from test} +@main[] +^connect[mysql://root@localhost/paf]{ + $participants[^hash::sql{select 'feodor' as participant }] } -@mainx[] -$request:charset[windows-1251] -$response:charset[windows-1251] -$response:content-type[text/html] +#:даст хеш такой структуры: +$participantsZ[ + $.alex(1) + $.boris(1) +] + +#:из которого можно эффективно извлекать информацию, например, так: +$person[feodor] +$person ^if($participants.$person){участвует}{не участвует} в мероприятии +} -$xdoc[^xdoc::load[_bug.xml]] -#^xdoc.string[] -$xdoc.search-namespaces.x[http://pif.design.ru/] -$nodes[^xdoc.select[//x:second]] -^nodes._count[] -@main[] -^bug.bug[] +@display_hash[hash] +#$hash.a.a +^hash.foreach[k;v]{hash $k=( +^if($v is hash){^display_hash[$v]}{ +^if($v is bool){bool ^if($v){true;false}}{string $v} +} +}[,] + +)^#0A}] + @main[] -$d[^date::unix-timestamp(1079695550.808)] -#$d[^date::unix-timestamp(1079695983.321)] +$name[ Вася ] +"$name" +"^name.trim[]" -^d.sql-string[] +$path[/section/subsection/] +^path.trim[end;/] @main[] -^date::now[] \ No newline at end of file +$xdoc[^xdoc::create{ + + string + +}] +$xdoc.search-namespaces.s[urn:special] +^xdoc.selectString[string(//s:code)]