summaryrefslogtreecommitdiff
path: root/libxsd/xsd/cxx/tree/stream-insertion.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libxsd/xsd/cxx/tree/stream-insertion.hxx')
-rw-r--r--libxsd/xsd/cxx/tree/stream-insertion.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/libxsd/xsd/cxx/tree/stream-insertion.hxx b/libxsd/xsd/cxx/tree/stream-insertion.hxx
index 7f1f5df..b04846f 100644
--- a/libxsd/xsd/cxx/tree/stream-insertion.hxx
+++ b/libxsd/xsd/cxx/tree/stream-insertion.hxx
@@ -23,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;
}