You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Jochen Wiedmann (JIRA)" <ji...@apache.org> on 2006/09/04 10:38:23 UTC

[jira] Updated: (WSCOMMONS-78) Including a schema without namespace into a schema with namespace is not possible

     [ http://issues.apache.org/jira/browse/WSCOMMONS-78?page=all ]

Jochen Wiedmann updated WSCOMMONS-78:
-------------------------------------

    Attachment: XmlSchema-include-handling.patch

The attached patch is based on the patch, which is provided in WSCOMMONS-81.

Note, that the patch introduces some incompatible API changes. However, these changes are caused by design errors in the API. For example, it is invalid to assume, that a schema with a given system ID can be included only once. Likewise, it is invalid to assume that only one schema with a given target namespace exists.


> Including a schema without namespace into a schema with namespace is not possible
> ---------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-78
>                 URL: http://issues.apache.org/jira/browse/WSCOMMONS-78
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: XmlSchema
>            Reporter: Jochen Wiedmann
>         Attachments: XmlSchema-include-handling.patch, XmlSchema-Include-Without-Namespace.patch
>
>
> The XML Schema specification states in "4.2.1 Assembling a schema for a single target namespace from multiple schema definition documents":
>   2 One of the following must be true:
>   ...
>   2.3 SII has no targetNamespace [attribute] (but SII' does).
>   3 The appropriate case among the following must be true:
>   ...
>   3.2 If clause 2.3 above is satisfied, then the schema corresponding to the <include>d item's parent <schema> must include not only definitions
>   or declarations corresponding to the appropriate members of its own [children], but also components identical to all the - schema components-  of I,
>   except that anywhere the - absent-  target namespace name would have appeared, the - actual value-  of the targetNamespace [attribute] of SII' is used.
>   In particular, it replaces - absent-  in the following places:
>   3.2.1 The {target namespace} of named schema components, both at the top level and (in the case of nested type definitions and nested attribute and
>   element declarations whose code was qualified) nested within definitions;
>   3.2.2 The {namespace constraint} of a wildcard, whether negated or not;
> In other words, it is possible to include a schema without namespace, as if it had the namespace of the including schema.
> Unfortunately this fails with XmlSchema, as the attached patch demonstrates. The patch includes a simple test case and could be applied, if this bug is fixed.
> Suggested resolution, as realized in JaxMeXS: If such a schema is being parsed, then mutable instances of QName should be created, which would always
> return the target namespace of the schema.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org