aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-11-24 16:47:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-11-24 16:47:01 +0200
commite2386788e4b98d52cd69b8a968670824979236ae (patch)
tree2002f6d1ec3b2d9b5f100e295f235c938d4a0172
parent16e0f7ec5d412a9ac9b1ff1b23af69bd89f3f20a (diff)
Explicitly specify template argument for prefix()
This is required if a custom anyURI implementation does not derive from std::string (and thus the template argument cannot be automatically deduced).
-rw-r--r--libxsd/xsd/cxx/tree/serialization.txx12
1 files changed, 9 insertions, 3 deletions
diff --git a/libxsd/xsd/cxx/tree/serialization.txx b/libxsd/xsd/cxx/tree/serialization.txx
index ef0a44c..87cb44c 100644
--- a/libxsd/xsd/cxx/tree/serialization.txx
+++ b/libxsd/xsd/cxx/tree/serialization.txx
@@ -648,7 +648,9 @@ namespace xsd
if (x.qualified ())
{
- std::basic_string<C> p (xml::dom::prefix (x.namespace_ (), e));
+ // Note: prefix<C> in case uri doesn't derive from basic_string.
+ //
+ std::basic_string<C> p (xml::dom::prefix<C> (x.namespace_ (), e));
if (!p.empty ())
os << p << C (':');
@@ -666,8 +668,10 @@ namespace xsd
if (x.qualified ())
{
+ // Note: prefix<C> in case uri doesn't derive from basic_string.
+ //
std::basic_string<C> p (
- xml::dom::prefix (x.namespace_ (), *a.getOwnerElement ()));
+ xml::dom::prefix<C> (x.namespace_ (), *a.getOwnerElement ()));
if (!p.empty ())
os << p << C (':');
@@ -683,8 +687,10 @@ namespace xsd
{
if (x.qualified ())
{
+ // Note: prefix<C> in case uri doesn't derive from basic_string.
+ //
std::basic_string<C> p (
- xml::dom::prefix (x.namespace_ (), ls.parent_));
+ xml::dom::prefix<C> (x.namespace_ (), ls.parent_));
if (!p.empty ())
ls.os_ << p << C (':');