diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-11 11:35:29 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-10-11 11:35:29 +0200 |
commit | 2544ac20b439e160b7c89bdbeafa19cadcc89e25 (patch) | |
tree | 1ad3ee23c4e70ecfd596905a458a2415ad47dd6f | |
parent | d86fa2e9a6dff3a907549ef2b3e485517dca359e (diff) |
Handle multiple patterns
-rw-r--r-- | xsd-frontend/parser.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/xsd-frontend/parser.cxx b/xsd-frontend/parser.cxx index 576a7ca..fc14f8f 100644 --- a/xsd-frontend/parser.cxx +++ b/xsd-frontend/parser.cxx @@ -3096,6 +3096,7 @@ namespace XSDFrontend Facets facets; Restricts* restricts (0); + String pattern; while (more ()) { @@ -3145,7 +3146,10 @@ namespace XSDFrontend } else if (name == L"pattern") { - facets[name] = e["value"]; + if (pattern) + pattern += L'|'; + + pattern += e["value"]; } else { @@ -3157,6 +3161,9 @@ namespace XSDFrontend } } + if (pattern) + facets[L"pattern"] = pattern; + if (enum_) pop_scope (); else @@ -3551,6 +3558,7 @@ namespace XSDFrontend } Facets facets; + String pattern; while (more ()) { @@ -3592,7 +3600,10 @@ namespace XSDFrontend } else if (name == L"pattern") { - facets[name] = e["value"]; + if (pattern) + pattern += L'|'; + + pattern += e["value"]; } else if (name == L"attribute") { @@ -3619,6 +3630,9 @@ namespace XSDFrontend } } + if (pattern) + facets[L"pattern"] = pattern; + Complex& type (dynamic_cast<Complex&> (scope ())); Restricts* restricts = set_type<Restricts> (base, r, type); |