summaryrefslogtreecommitdiff
path: root/xsd/libxsd/xsd/cxx/tree/stream-insertion.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/libxsd/xsd/cxx/tree/stream-insertion.hxx')
-rw-r--r--xsd/libxsd/xsd/cxx/tree/stream-insertion.hxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/xsd/libxsd/xsd/cxx/tree/stream-insertion.hxx b/xsd/libxsd/xsd/cxx/tree/stream-insertion.hxx
index c345e80..b04846f 100644
--- a/xsd/libxsd/xsd/cxx/tree/stream-insertion.hxx
+++ b/xsd/libxsd/xsd/cxx/tree/stream-insertion.hxx
@@ -1,6 +1,5 @@
// file : xsd/cxx/tree/stream-insertion.hxx
-// author : Boris Kolpackov <boris@codesynthesis.com>
-// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC
+// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC
// license : GNU GPL v2 + exceptions; see accompanying LICENSE file
#ifndef XSD_CXX_TREE_STREAM_INSERTION_HXX
@@ -24,15 +23,19 @@ namespace xsd
inline ostream<S>&
operator<< (ostream<S>& s, const type&)
{
+ // Not saving DOM content even if it's there.
return s;
}
// simple_type
//
- template <typename S, typename B>
+ template <typename S, typename C, typename B>
inline ostream<S>&
- operator<< (ostream<S>& s, const simple_type<B>&)
+ operator<< (ostream<S>& s, const simple_type<C, B>& x)
{
+ if (!x.null_content ())
+ s << x.text_content ();
+
return s;
}