Annotation of parser3/tests/097.html, revision 1.7

1.6       misha       1: @main[]
                      2: $response:charset[UTF-8]
                      3: $request:charset[UTF-8]
                      4: 
1.7     ! moko        5: $file[^file::load[binary;http://www.parser.ru/_/tests/none/;
1.2       paf         6:        $.headers[
                      7:                $.USER-AGENT[paf]
                      8:        ]
1.6       misha       9:        $.timeout(10)
1.2       paf        10:        $.any-status(1)
                     11: ]]
                     12: #server: $file.SERVER<br>
                     13: $file.status
                     14: #<pre>$file.text</pre>
1.4       misha      15: 
                     16: 
1.6       misha      17: <hr />
1.4       misha      18: ^try{
1.5       misha      19:        $file[^file::load[binary;http://www.parser.ru/xmlview.xsl;
                     20:                $.timeout(10)
                     21:                $.any-status(1)
                     22:        ]]
                     23:        ^try{
                     24:                $xdoc[^xdoc::create[$file]]
                     25:                xdoc from file created successfully (documentElement: $xdoc.documentElement.nodeName)
                     26:        }{
                     27:                can't create xdoc from file.
                     28:                $exception.handled(1)
                     29:        }
1.4       misha      30: }{
1.5       misha      31:        can't load remote file.
                     32:        $exception.handled(1)
                     33: }
                     34: 
                     35: <hr />
                     36: ^try{
                     37:        $xdoc[^xdoc::load[http://www.parser.ru/xmlview.xsl]]
                     38:        remote xdoc loaded successfully (documentElement: $xdoc.documentElement.nodeName)
                     39: }{
                     40:        can't load remote xdoc.
                     41:        $exception.handled(1)
                     42: }
                     43: 
                     44: 
                     45: <hr />
                     46: ^try{
                     47:        $xdoc[^xdoc::load[108.xsl]]
                     48:        local xdoc loaded successfully (documentElement: $xdoc.documentElement.nodeName)
                     49: }{
                     50:        can't load local xdoc.
1.4       misha      51:        $exception.handled(1)
                     52: }
1.6       misha      53: 
                     54: 
                     55: <hr />
                     56: Loading remote file in windows-1251:
                     57: ^try{
                     58:        $file[^file::load[text;http://www.parser.ru/_/tests/097.html;
                     59:                $.charset[windows-1251]
                     60:                $.timeout(10)
                     61:                $.form[
                     62:                        $.charset[windows-1251]
                     63:                        $.title[Проверка]
                     64:                ]
                     65:        ]]
                     66:        <p>$file.text</p>
                     67: }{
                     68:        $exception.handled(1)
                     69:        can't load remote file. 
                     70: }
                     71: 
                     72: 
                     73: <hr />
                     74: Loading remote file in UTF-8:
                     75: ^try{
                     76:        $file[^file::load[text;http://www.parser.ru/_/tests/097.html;
                     77:                $.timeout(10)
                     78:                $.form[
                     79:                        $.charset[UTF-8]
                     80:                        $.title[Проверка]
                     81:                ]
                     82:        ]]
                     83:        <p>$file.text</p>
                     84: }{
                     85:        $exception.handled(1)
                     86:        can't load remote file. 
                     87: }

E-mail: