aboutsummaryrefslogtreecommitdiff
path: root/xsde/cxx/serializer/elements.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsde/cxx/serializer/elements.cxx')
-rw-r--r--xsde/cxx/serializer/elements.cxx36
1 files changed, 23 insertions, 13 deletions
diff --git a/xsde/cxx/serializer/elements.cxx b/xsde/cxx/serializer/elements.cxx
index 62fd32d..e598f8f 100644
--- a/xsde/cxx/serializer/elements.cxx
+++ b/xsde/cxx/serializer/elements.cxx
@@ -225,24 +225,34 @@ namespace CXX
return false;
SemanticGraph::Type& ub (ultimate_base (c));
+ Restricts::FacetIterator end (r.facet_end ());
+
+ if (ub.is_a<SemanticGraph::Fundamental::String> () ||
+ ub.is_a<SemanticGraph::Fundamental::AnyURI> ())
+ {
+ if (validation)
+ {
+ if (r.facet_find (L"length") != end ||
+ r.facet_find (L"minLength") != end ||
+ r.facet_find (L"maxLength") != end ||
+ r.facet_find (L"pattern") != end)
+ return true;
+ }
+ }
if (ub.is_a<SemanticGraph::Fundamental::Short> () ||
ub.is_a<SemanticGraph::Fundamental::UnsignedByte> () ||
ub.is_a<SemanticGraph::Fundamental::UnsignedShort> () ||
- ub.is_a<SemanticGraph::Fundamental::UnsignedInt> () ||
- ub.is_a<SemanticGraph::Fundamental::String> () ||
- ub.is_a<SemanticGraph::Fundamental::AnyURI> ())
+ ub.is_a<SemanticGraph::Fundamental::UnsignedInt> ())
{
- Restricts::FacetIterator end (r.facet_end ());
-
- if (r.facet_find (L"length") != end ||
- r.facet_find (L"minLength") != end ||
- r.facet_find (L"maxLength") != end ||
- r.facet_find (L"minInclusive") != end ||
- r.facet_find (L"minExclusive") != end ||
- r.facet_find (L"maxInclusive") != end ||
- r.facet_find (L"maxExclusive") != end)
- return true;
+ if (validation)
+ {
+ if (r.facet_find (L"minInclusive") != end ||
+ r.facet_find (L"minExclusive") != end ||
+ r.facet_find (L"maxInclusive") != end ||
+ r.facet_find (L"maxExclusive") != end)
+ return true;
+ }
}
}