fmoussallam opened a new pull request #1: XMLSCHEMA-51 Problem with included schemas with attribute group refer… URL: https://github.com/apache/ws-xmlschema/pull/1 **What is the problem:** The schema builder constructs list of references for Groups, Unions or Lists. These references are qualified names (QName) that correspond to Type definitions elsewhere in the XML Schema. An issue arises if the member of the union or the group are declared in an XSD that does not have a target namespace and that XSD is included in a root XSD which itself has a target namspace. What should happen in that situation is that all elements from the included XSD should inherit the root target namespace. The issue is that the code that creates such QNames today only takes into consideration the direct XSD parent element and ends up creating QNames with empty namespaces. At the end of the build, the schema is inconsistent because Groups and Unions have references with an empty namespace while the actual element referenced has a namespace. **What is the solution:** When a reference is created, if it ends up being unqualified, check for the possibility that the current XSD has no namespace but is included in a root XSD that has a namespace. In that case, use the root target namespace. Note that this is not a perfect solution as there is still a possibility that a member of a union for instance should have an empty namespace. We consider this to be unlikely though and should happen way less often then included XSD without namespace; A better solution in the long run would be to have a second pass at the end of the build to reconnect references to actual types.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ws.apache.org For additional commands, e-mail: dev-h...@ws.apache.org