summaryrefslogtreecommitdiff
path: root/libxsd/xsd/cxx/tree/stream-extraction-map.txx
diff options
context:
space:
mode:
Diffstat (limited to 'libxsd/xsd/cxx/tree/stream-extraction-map.txx')
-rw-r--r--libxsd/xsd/cxx/tree/stream-extraction-map.txx27
1 files changed, 25 insertions, 2 deletions
diff --git a/libxsd/xsd/cxx/tree/stream-extraction-map.txx b/libxsd/xsd/cxx/tree/stream-extraction-map.txx
index a4e429e..faabe7c 100644
--- a/libxsd/xsd/cxx/tree/stream-extraction-map.txx
+++ b/libxsd/xsd/cxx/tree/stream-extraction-map.txx
@@ -236,8 +236,31 @@ namespace xsd
std::auto_ptr<type> stream_extraction_map<S, C>::
extract (istream<S>& s, flags f, container* c)
{
- std::basic_string<C> name, ns;
- s >> ns >> name;
+ std::basic_string<C> ns, name;
+
+ // The namespace and name strings are pooled.
+ //
+ std::size_t id;
+ istream_common::as_size<std::size_t> as_size (id);
+ s >> as_size;
+
+ if (id != 0)
+ s.pool_string (id, ns);
+ else
+ {
+ s >> ns;
+ s.pool_add (ns);
+ }
+
+ s >> as_size;
+
+ if (id != 0)
+ s.pool_string (id, name);
+ else
+ {
+ s >> name;
+ s.pool_add (name);
+ }
if (extractor e = find (qualified_name (name, ns)))
{