|
|
| version 1.1, 2001/09/26 11:24:07 | version 1.4, 2001/10/11 14:57:53 |
|---|---|
| Line 39 static void _select(Request& r, const St | Line 39 static void _select(Request& r, const St |
| const XalanDOMChar *expression_dcstr=dstring.c_str(); | const XalanDOMChar *expression_dcstr=dstring.c_str(); |
| XPathEvaluator evaluator; | XPathEvaluator evaluator; |
| // Initialize the XalanSourceTree subsystem... | |
| // XalanSourceTreeInit theSourceTreeInit; | |
| // We'll use these to parse the XML file. | // We'll use these to parse the XML file. |
| XalanSourceTreeDOMSupport dom_support; | XalanSourceTreeDOMSupport dom_support; |
| Line 63 static void _select(Request& r, const St | Line 61 static void _select(Request& r, const St |
| result.set_name(method_name); | result.set_name(method_name); |
| r.write_no_lang(result); | r.write_no_lang(result); |
| } catch(const XSLException& e) { | } catch(const XSLException& e) { |
| r._throw(&expression, e); | pool.exception()._throw(pool, &expression, e); |
| } | } |
| } | } |
| Line 94 static void _select_single(Request& r, c | Line 92 static void _select_single(Request& r, c |
| r.write_no_lang(result); | r.write_no_lang(result); |
| } | } |
| } catch(const XSLException& e) { | } catch(const XSLException& e) { |
| r._throw(&expression, e); | pool.exception()._throw(pool, &expression, e); |
| } | } |
| } | } |
| // constructor | // constructor |
| MXnode::MXnode(Pool& apool) : Methoded(apool) { | MXnode::MXnode(Pool& apool) : Methoded(apool), |
| consts(apool) { | |
| set_name(*NEW String(pool(), XNODE_CLASS_NAME)); | set_name(*NEW String(pool(), XNODE_CLASS_NAME)); |
| // ^node.select[/some/xpath/query] = hash $.#[dnode] | // ^node.select[/some/xpath/query] = hash $.#[dnode] |
| Line 109 MXnode::MXnode(Pool& apool) : Methoded(a | Line 108 MXnode::MXnode(Pool& apool) : Methoded(a |
| // ^node.select-single[/some/xpath/query] = first dnode | // ^node.select-single[/some/xpath/query] = first dnode |
| add_native_method("select-single", Method::CT_DYNAMIC, _select_single, 1, 1); | add_native_method("select-single", Method::CT_DYNAMIC, _select_single, 1, 1); |
| // consts | |
| #define CONST(name, value) \ | |
| consts.put(*new(pool()) String(pool(), #name), new(pool()) VInt(pool(), value)) | |
| CONST(ELEMENT_NODE, 1); | |
| CONST(ATTRIBUTE_NODE, 2); | |
| CONST(TEXT_NODE, 3); | |
| CONST(CDATA_SECTION_NODE, 4); | |
| CONST(ENTITY_REFERENCE_NODE, 5); | |
| CONST(ENTITY_NODE, 6); | |
| CONST(PROCESSING_INSTRUCTION_NODE, 7); | |
| CONST(COMMENT_NODE, 8); | |
| CONST(DOCUMENT_NODE, 9); | |
| CONST(DOCUMENT_TYPE_NODE, 10); | |
| CONST(DOCUMENT_FRAGMENT_NODE, 11); | |
| CONST(NOTATION_NODE, 12); | |
| } | } |
| // global variable | // global variable |
| Methoded *Xnode_class; | Methoded *Xnode_class; |