Project

Profile

Help

Bug #6199

closed

SCM export/import fails for an `xs:alternative` specifying `defaultNamespace="##targetNamespace"`

Added by Michael Kay 7 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Schema conformance
Sprint/Milestone:
-
Start date:
2023-09-17
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

When a schema has an xs:alternative element with the attribute defaultNamespace="##targetNamespace", the defaultNamespace property of the TypeAlternative schema component is set to the literal value "##targetNamespace" rather than to the actual target namespace URI. This generally appears to do no harm because the property isn't actually used -- except when serialising the schema to an SCM file, which will result in the schema that is reloaded from the SCM file being incorrect.

Revealed by running test case -c:Saxonica -s:CTA -g:cta0004 with the -scm option.

Actions #1

Updated by Michael Kay 7 months ago

  • Category set to Schema conformance
  • Status changed from New to In Progress
  • Priority changed from Low to Normal
  • Applies to branch 12, trunk added
  • Platforms .NET, Java added
Actions #2

Updated by Michael Kay 7 months ago

  • Status changed from In Progress to Resolved
  • Fix Committed on Branch 12, trunk added
Actions #3

Updated by Michael Kay 7 months ago

Simple fix - in XSDAlternative, should do alternative.setDefaultElementNamespace(defaultNamespaceUri); in place of `alternative.setDefaultElementNamespace(defaultNamespace);

Actions #4

Updated by O'Neil Delpratt 5 months ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 12.4 added

Bug fix applied in the Saxon 12.4 maintenance release

Please register to edit this issue

Also available in: Atom PDF