diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-15 11:34:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-15 11:34:06 +0200 |
commit | fac1bf0b0db4aa90472a2dd06c646af145e059a5 (patch) | |
tree | 2d2ecc6e9a5dec300630baef29eb0ce6e42bb39e /libxsde/xsde/cxx/parser/context.ixx | |
parent | d6635604d7d684edcbd90b4423888b6bb9058dae (diff) |
Add current element to the parser context
Diffstat (limited to 'libxsde/xsde/cxx/parser/context.ixx')
-rw-r--r-- | libxsde/xsde/cxx/parser/context.ixx | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/libxsde/xsde/cxx/parser/context.ixx b/libxsde/xsde/cxx/parser/context.ixx index 8545389..b3828f5 100644 --- a/libxsde/xsde/cxx/parser/context.ixx +++ b/libxsde/xsde/cxx/parser/context.ixx @@ -20,8 +20,8 @@ namespace xsde // context // inline context:: - context (XML_Parser xml_parser) - : xml_parser_ (xml_parser) + context () + : xml_parser_ (0) { #if defined(XSDE_PARSER_VALIDATION) || !defined(XSDE_EXCEPTIONS) error_type_ = error_none; @@ -34,6 +34,41 @@ namespace xsde return xml_parser_; } + inline const ro_string& context:: + element_namespace () const + { + return ns_; + } + + inline const ro_string& context:: + element_name () const + { + return name_; + } + + inline void context:: + reset (XML_Parser parser) + { + xml_parser_ = parser; + current_ = parser_state (); + +#if defined(XSDE_PARSER_VALIDATION) || !defined(XSDE_EXCEPTIONS) + error_type_ = error_none; +#endif + } + + inline void context:: + element_namespace (const ro_string& ns) + { + ns_.assign (ns); + } + + inline void context:: + element_name (const ro_string& name) + { + name_.assign (name); + } + // // #ifndef XSDE_EXCEPTIONS |