summaryrefslogtreecommitdiff
path: root/libxsd/xsd/cxx/tree/std-ostream-operators.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2014-07-03 09:57:09 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2014-07-03 09:57:09 +0200
commit1a4099b78717b16f632b0e7e0980a27811221e52 (patch)
tree87a63393fc207082b7418987309581a9a79e49a4 /libxsd/xsd/cxx/tree/std-ostream-operators.hxx
parent06258b8eae3d5af9a1af0206bb5a8e5c80dde455 (diff)
Implement anyType and anySimpleType content representation
anyType as a DOM fragment, similar to wildcards. anySimpleType as a text string.
Diffstat (limited to 'libxsd/xsd/cxx/tree/std-ostream-operators.hxx')
-rw-r--r--libxsd/xsd/cxx/tree/std-ostream-operators.hxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/libxsd/xsd/cxx/tree/std-ostream-operators.hxx b/libxsd/xsd/cxx/tree/std-ostream-operators.hxx
index 071d186..9a8f976 100644
--- a/libxsd/xsd/cxx/tree/std-ostream-operators.hxx
+++ b/libxsd/xsd/cxx/tree/std-ostream-operators.hxx
@@ -24,6 +24,7 @@ namespace xsd
inline std::basic_ostream<C>&
operator<< (std::basic_ostream<C>& os, const type&)
{
+ // Not printing DOM content even if it's there.
return os;
}
@@ -32,8 +33,11 @@ namespace xsd
//
template <typename C, typename B>
inline std::basic_ostream<C>&
- operator<< (std::basic_ostream<C>& os, const simple_type<B>&)
+ operator<< (std::basic_ostream<C>& os, const simple_type<C, B>& x)
{
+ if (!x.null_content ())
+ os << x.text_content ();
+
return os;
}