diff options
Diffstat (limited to 'xsde/cxx/parser/elements.cxx')
-rw-r--r-- | xsde/cxx/parser/elements.cxx | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/xsde/cxx/parser/elements.cxx b/xsde/cxx/parser/elements.cxx index 2c138ce..25e2032 100644 --- a/xsde/cxx/parser/elements.cxx +++ b/xsde/cxx/parser/elements.cxx @@ -207,24 +207,30 @@ namespace CXX 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> ()) && - r.facet_find (L"whiteSpace") != end) - return true; - - if (validation) + if (ub.is_a<SemanticGraph::Fundamental::String> () || + ub.is_a<SemanticGraph::Fundamental::AnyURI> ()) { - 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> ()) + if (r.facet_find (L"whiteSpace") != end) + return true; + + 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"minInclusive") != 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> ()) + { + 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) |