Diff for /parser3/src/www/htdocs/Attic/index.html between versions 1.317 and 1.364

version 1.317, 2001/09/18 16:05:43 version 1.364, 2001/10/08 08:35:56
Line 1 Line 1
 @main[]  @main[]
   #^regexp2[]
   #^ttablerem[]
   #^pcre[]
   #^regexp[]<hr>
   #^mail[]
   #^exec[]
   #^fori[]
   #^tconnect[]
 ^xslt[]  ^xslt[]
   #^xml[]
   #^header[]
 OK  OK
   
 @xslt[]  @xslt[]
 $dom[^dom::set{<?xml version="1.0" encoding="windows-1251"?>  ^xdata[]
   ^show-xdoc2[^xdoc.transform[global.xsl]]
   
 <people>  @regexp2[]
         <man id="1">  $s[  select]
                 <name>PAF</name>  $s[^s.match[^^\s*][]{!}]
         </man>  $s
         <man id="2">  
                 <name>ÏÈÔ</name>  @header[]
         </man>  $response:refresh[
 </people>          $.value[0]
 }]          $.url[http://design.ru?a=^taint[123]]
   ]
   
   @ttablerem[]
   $table[^table::load[a.cfg]]
   ^table.menu{$table.a}
   
   @tconnect[]
   ^connect[mysql://test:test@paf/test?charset=cp1251_koi8&compress=1&timeout=1&named_pipe=1]{
   $tables[^table::sql{show tables}]
   #$cols[^tables.columns[]]
   #$cols.column
   ^tables.menu{
           $tables.[Tables_in_test]<br>
   }
   }
   
 ^show-dnode[$dom]<hr>  @pcre[]
 $people[^dom.xpath[*/man[@id=1]]]  $s[1 2]
   ^s.match[\s;ig]{!}
   #^s.match[\d;ig]{!}
   
   
   @regexp[]
   $s[abcÀÁÂ]
   ^if(^s.match[á][i]){y}{n}
   
   @mail[]
   #$ORIGINS(1)
   ^mail:send[
           $.from[paf@design.ru]
           $.to[paf@design.ru]
           $.body[1
           
           2
           
           
                   3]
   ]
   
   @exec[]
   $a[^file::exec[fc.exe;a;b]]
   $a.status|$a.stderr<hr>
   
   @fori[][i]
   ^for[i](1;3){... =$i= ...}
   
   @xdata[]
   #$response:content-type[$.value[text/html] $.charset[windows-1251]]
   $xdoc[^xdoc::load[input.xml]]
   
   @xml[]
   ^xdata[]
   
   ^show-xdoc2[$xdoc]<hr>
   #^show-xnode1[$xdoc]<hr>
   $people[^xdoc.select[*/man]]
 #^show1[]  #^show1[]
 #^show-dnodes[$people]<hr>  ^show-xnodes1[$people]<hr>
 ^show-dnodes2[$people]<hr>  
 #^people.0.owner.hren[]  #^people.0.owner.hren[]
   
 @show1[]  ^show-xnode1[^xdoc.select-single[*/man[2]/name];0;1]<hr>
 ^for[i](0;^people._count[]-1){  
     $node[$people.$i]  by id:
         $node.first-child.value:   ^show-xnode1[^xdoc.getElementById[1];0;1]
                 $pattributes[$node.parent.attributes]  <hr>
   
   @show1[array]
   ^for[i](0;^array._count[]-1){
       $x[$array.$i]
           $x.firstChild.nodeValue: 
                   $pattributes[$x.parentNode.attributes]
                 ^if(^pattributes._count[]){                  ^if(^pattributes._count[]){
                         $pattributes.id.name=$pattributes.id.value                          $pattributes.id.name=$pattributes.id.nodeValue
                 }                  }
         <br>          <br>
 }  }
           
 @show-dnodes[array][i]  @show-xnodes1[array][i]
 ^for[i](0;^array._count[]-1){  ^for[i](0;^array._count[]-1){
         ^show-dnode[$array.$i]          ^show-xnode1[$array.$i;0;1]
 }  
   
 @show-dnode[dnode;level][l]  
 ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}  
 ^if($dnode.type eq element){  
         &lt^;$dnode.name  
 $pairs[$dnode.attributes]  
 ^if(def $pairs){  
         $names[^pairs._keys[]]  
         ^names.menu{$names.key=$pairs.[$names.key].value }  
 }  }
 &gt^;  
 }{[$dnode.type]}  
    
 ^if(def $dnode.value){'$dnode.value'}<br>  
 ^if(def ${dnode.first-child}){^show-dnode[$dnode.first-child]($level+1)}  
 ^if(def ${dnode.next-sibling}){^show-dnode[$dnode.next-sibling]($level)}  
   
 ^if($dnode.type eq element){  @show-xnode1[x;level;single][l]
 ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$dnode.name&gt^;<br>  ^if(def $x){
       ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}
       ^if($x.nodeType == $xnode:ELEMENT_NODE){
           &lt^;$x.nodeName
               $pairs[$x.attributes]
               ^if(def $pairs){
                   $names[^pairs._keys[]]
                   ^names.menu{ $names.key="$pairs.[$names.key].nodeValue"}
               }
               &gt^;
       }{
           [$x.nodeType]
       }
       
       ^if(def $x.nodeValue){$x.nodeValue}<br>
       ^show-xnode1[$x.firstChild]($level+1)
       ^if(!$single){
               ^show-xnode1[$x.nextSibling]($level)
       }
   
       ^if($x.nodeType == $xnode:ELEMENT_NODE){
       ^for[l](0;$level-1){&nbsp^;&nbsp^;&nbsp^;&nbsp^;}&lt^;/$x.nodeName&gt^;<br>
       }
 }  }
   
 @show-dnodes2[people]  @show-xdoc2[xdoc]
 ^people.string[]  ^xdoc.save[save.xml;
   #       $.encoding[windows-1251]
           $.method[xml]
   ]
   $file[^xdoc.file[
   #       $.encoding[windows-1251]
           $.method[html]
   ]]
   ^file.save[text;save_file.html]
   <pre>^taint[^xdoc.string[]]</pre>
   #       $.encoding[windows-1251]
   #       $.method[xml]
   #]]

Removed from v.1.317  
changed lines
  Added in v.1.364


E-mail: