summaryrefslogtreecommitdiff
path: root/src/xml.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml.h')
-rw-r--r--src/xml.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/xml.h b/src/xml.h
index 96964975..b11cb86f 100644
--- a/src/xml.h
+++ b/src/xml.h
@@ -236,18 +236,23 @@ private:
names_map names_index;
- terminal_node_t stub;
-
- public:
+public:
node_t * top;
+private:
+ terminal_node_t stub;
+
+public:
// Ids 0-9 are reserved. 10-999 are for "builtin" names. 1000+ are
// for dynamically registered names.
enum special_names_t {
CURRENT, PARENT, ROOT, ALL
};
- document_t(node_t * _top = NULL);
+ document_t(node_t * _top = NULL)
+ : top(_top ? _top : &stub), stub(this) {
+ TRACE_CTOR(xml::document_t, "node_t *, const char **, const int");
+ }
~document_t();
void set_top(node_t * _top);