|
|
| version 1.31, 2001/09/21 09:03:10 | version 1.33, 2001/09/21 14:46:09 |
|---|---|
| Line 5 | Line 5 |
| Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) | Author: Alexander Petrosyan <paf@design.ru> (http://design.ru/paf) |
| */ | */ |
| #include "classes.h" | |
| #ifdef XML | |
| static const char *RCSId="$Id$"; | static const char *RCSId="$Id$"; |
| #include "classes.h" | |
| #include "pa_request.h" | #include "pa_request.h" |
| #include "pa_vdom.h" | #include "pa_vdom.h" |
| #include "pa_xslt_stylesheet_manager.h" | #include "pa_xslt_stylesheet_manager.h" |
| Line 82 static void create_optioned_listener( | Line 84 static void create_optioned_listener( |
| Pool& pool, | Pool& pool, |
| const String& method_name, MethodParams *params, int index, Writer& writer) { | const String& method_name, MethodParams *params, int index, Writer& writer) { |
| // default encoding from pool | // default encoding from pool |
| scharset=pool.get_charset(); | const String *scharset=&pool.get_charset(); |
| const String *method=0; | const String *method=0; |
| XalanDOMString xalan_encoding; | XalanDOMString xalan_encoding; |
| Line 98 static void create_optioned_listener( | Line 100 static void create_optioned_listener( |
| // $.encoding[windows-1251|...] | // $.encoding[windows-1251|...] |
| if(Value *vencoding=static_cast<Value *>(options->get(*new(pool) | if(Value *vencoding=static_cast<Value *>(options->get(*new(pool) |
| String(pool, DOM_OUTPUT_ENCODING_OPTION_NAME)))) { | String(pool, DOM_OUTPUT_ENCODING_OPTION_NAME)))) { |
| charset=vencoding->as_string(); | scharset=&vencoding->as_string(); |
| } | } |
| } else | } else |
| PTHROW(0, 0, | PTHROW(0, 0, |
| Line 107 static void create_optioned_listener( | Line 109 static void create_optioned_listener( |
| } | } |
| } | } |
| xalan_encoding.append(charset=scharset.cstr()); | xalan_encoding.append(charset=scharset->cstr()); |
| if(!method/*default='xml'*/ || *method == DOM_OUTPUT_METHOD_OPTION_VALUE_XML) { | if(!method/*default='xml'*/ || *method == DOM_OUTPUT_METHOD_OPTION_VALUE_XML) { |
| content_type="text/xml"; | content_type="text/xml"; |
| listener=new FormatterToXML(writer, | listener=new FormatterToXML(writer, |
| Line 362 Methoded *Dom_class; | Line 364 Methoded *Dom_class; |
| // creator | // creator |
| #endif | |
| Methoded *MDom_create(Pool& pool) { | Methoded *MDom_create(Pool& pool) { |
| return Dom_class=new(pool) MDom(pool); | return |
| #ifdef XML | |
| Dom_class=new(pool) MDom(pool); | |
| #else | |
| 0 | |
| #endif | |
| ; | |
| } | } |