diff options
-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); |