|
|
| version 1.52, 2002/09/18 08:52:50 | version 1.54.4.1, 2003/03/17 14:48:05 |
|---|---|
| Line 1 | Line 1 |
| /** @file | /** @file |
| Parser: @b dom parser class. | Parser: @b dom parser class. |
| Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) | Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | */ |
| #include "classes.h" | #include "classes.h" |
| Line 245 static void _getAttribute(Request& r, co | Line 245 static void _getAttribute(Request& r, co |
| GdomeDOMString *attribute_value= | GdomeDOMString *attribute_value= |
| gdome_el_getAttribute(element, pool.transcode(name).get(), &exc); | gdome_el_getAttribute(element, pool.transcode(name).get(), &exc); |
| // write out result | // write out result |
| r.write_no_lang(pool.transcode(attribute_value)); | r.write_no_lang(pool.transcode(attribute_value, &name)); |
| } | } |
| // void setAttribute(in DOMString name, in DOMString value) raises(DOMException); | // void setAttribute(in DOMString name, in DOMString value) raises(DOMException); |
| Line 343 static void _getElementsByTagName(Reques | Line 343 static void _getElementsByTagName(Reques |
| for(gulong i=0; i<length; i++) { | for(gulong i=0; i<length; i++) { |
| String& skey=*new(pool) String(pool); | String& skey=*new(pool) String(pool); |
| { | { |
| char *buf=(char *)pool.malloc(MAX_NUMBER); | char *buf=(char *)pool.malloc_atomic(MAX_NUMBER); |
| snprintf(buf, MAX_NUMBER, "%d", i); | snprintf(buf, MAX_NUMBER, "%d", i); |
| skey << buf; | skey << buf; |
| } | } |
| Line 379 static void _getElementsByTagNameNS(Requ | Line 379 static void _getElementsByTagNameNS(Requ |
| for(gulong i=0; i<length; i++) { | for(gulong i=0; i<length; i++) { |
| String& skey=*new(pool) String(pool); | String& skey=*new(pool) String(pool); |
| { | { |
| char *buf=(char *)pool.malloc(MAX_NUMBER); | char *buf=(char *)pool.malloc_atomic(MAX_NUMBER); |
| snprintf(buf, MAX_NUMBER, "%d", i); | snprintf(buf, MAX_NUMBER, "%d", i); |
| skey << buf; | skey << buf; |
| } | } |
| Line 457 static void selectNodesHandler(Pool& poo | Line 457 static void selectNodesHandler(Pool& poo |
| for(int i=0; i<size; i++) { | for(int i=0; i<size; i++) { |
| String& skey=*new(pool) String(pool); | String& skey=*new(pool) String(pool); |
| { | { |
| char *buf=(char *)pool.malloc(MAX_NUMBER); | char *buf=(char *)pool.malloc_atomic(MAX_NUMBER); |
| snprintf(buf, MAX_NUMBER, "%d", i); | snprintf(buf, MAX_NUMBER, "%d", i); |
| skey << buf; | skey << buf; |
| } | } |
| Line 502 static void selectNodeHandler(Pool& pool | Line 502 static void selectNodeHandler(Pool& pool |
| result=new(pool) VString( | result=new(pool) VString( |
| pool.transcode( | pool.transcode( |
| GdomeDOMString_auto_ptr( | GdomeDOMString_auto_ptr( |
| gdome_str_mkref_dup((const gchar *)res->stringval)).get())); | gdome_str_mkref_dup((const gchar *)res->stringval)).get(), &expression)); |
| break; | break; |
| default: | default: |
| throw Exception("parser.runtime", | throw Exception("parser.runtime", |
| Line 563 static void selectStringHandler(Pool& po | Line 563 static void selectStringHandler(Pool& po |
| result=new(pool) VString( | result=new(pool) VString( |
| pool.transcode( | pool.transcode( |
| GdomeDOMString_auto_ptr( | GdomeDOMString_auto_ptr( |
| gdome_str_mkref_dup((const gchar *)res->stringval)).get())); | gdome_str_mkref_dup((const gchar *)res->stringval)).get(), &expression)); |
| break; | break; |
| case XPATH_NODESET: | case XPATH_NODESET: |
| if(!(res->nodesetval && res->nodesetval->nodeNr)) | if(!(res->nodesetval && res->nodesetval->nodeNr)) |