--- parser3/www/htdocs/Attic/_bug.html 2004/03/25 11:51:19 1.35 +++ parser3/www/htdocs/Attic/_bug.html 2005/12/19 12:24:57 1.114 @@ -1,66 +1,21 @@ -@auto[] -$request:charset[windows-1251] -$response:charset[windows-1251] - - -@main[] -$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] - - -} - -@main[] -^connect[mysql://root@localhost/paf]{ - $participants[^hash::sql{select 'feodor' as participant }] -} - -#:даст хеш такой структуры: -$participantsZ[ - $.alex(1) - $.boris(1) -] - -#:из которого можно эффективно извлекать информацию, например, так: -$person[feodor] -$person ^if($participants.$person){участвует}{не участвует} в мероприятии -} - - -@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} +^try{ + ^mustfail[] +}{ + ^if($exception.type eq xml){ + failed, that's OK + $exception.handled(1) + } } -}[,] - -)^#0A}] - -@main[] -$name[ Вася ] -"$name" -"^name.trim[]" - -$path[/section/subsection/] -^path.trim[end;/] - -@main[] -$xdoc[^xdoc::create{ - - string - -}] -$xdoc.search-namespaces.s[urn:special] -^xdoc.selectString[string(//s:code)] +@mustfail[] +$dom_from_disk[^xdoc::create[input]] +$dom_created_in_air[^xdoc::create[doc]] +^dom_created_in_air.documentElement.appendChild[$dom_from_disk.documentElement] +^show_xdoc2[$dom_created_in_air] + +@show_xdoc2[xdoc] +
^taint[html][^xdoc.string[
+	$.method[html]
+]]
+