Issue Details (XML | Word | Printable)

Key: WSCOMMONS-78
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Jochen Wiedmann
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WS-Commons

Including a schema without namespace into a schema with namespace is not possible

Created: 01/Sep/06 11:09 AM   Updated: 08/Sep/06 07:59 PM
Return to search
Component/s: XmlSchema
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works XmlSchema-include-handling.patch 2006-09-04 08:37 AM Jochen Wiedmann 164 kB
Text File Licensed for inclusion in ASF works XmlSchema-include-handling2.patch 2006-09-05 01:47 PM Jochen Wiedmann 38 kB
Text File XmlSchema-Include-Without-Namespace.patch 2006-09-01 11:09 AM Jochen Wiedmann 2 kB
Issue Links:
Dependants
 
Duplicate
 

Resolution Date: 05/Sep/06 04:22 PM


 Description  « Hide
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.


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jochen Wiedmann made changes - 04/Sep/06 08:37 AM
Field Original Value New Value
Attachment XmlSchema-include-handling.patch [ 12340127 ]
Jochen Wiedmann made changes - 04/Sep/06 08:37 AM
Link This issue depends on WSCOMMONS-81 [ WSCOMMONS-81 ]
Jochen Wiedmann made changes - 05/Sep/06 01:47 PM
Attachment XmlSchema-include-handling2.patch [ 12340188 ]
Davanum Srinivas made changes - 05/Sep/06 04:22 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Jochen Wiedmann made changes - 08/Sep/06 07:59 PM
Link This issue is duplicated by WSCOMMONS-87 [ WSCOMMONS-87 ]