Project

Profile

Help

Bug #3628

closed

Type annotation for a complex type with simple content

Added by Michael Kay over 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Schema-Aware processing
Sprint/Milestone:
-
Start date:
2018-01-16
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:

Description

When Saxon validates an element against a complex type with simple content (specified in this case using xsl:type on a literal result element), the resulting type annotation is the simple (content) type, not the complex type.

The code in ContentValidator appears to do this quite deliberately, but there doesn't appear to be anything in the specs to justify it.

Raised on the oXygen forum and subsequently on xml-dev.

Actions #1

Updated by Michael Kay over 6 years ago

XSLT3 test case as-3701 added.

Changing the code in ContentValidator makes this test work, and causes no regression in the XSLT 3.0 test suite.

Actions #2

Updated by Michael Kay over 6 years ago

Also confirmed that the change causes no regression to QT3 tests; added a new test case validateexpr-43

Actions #3

Updated by Michael Kay over 6 years ago

  • Status changed from New to Resolved
  • Applies to branch 9.8, trunk added
  • Fix Committed on Branch 9.8, trunk added

Fix committed for 9.8 and trunk. (One-line change in SimpleContentValidator). The bug is present since the dawn of time, but won't fix in earlier releases as users are unlikely to be affected.

Actions #4

Updated by O'Neil Delpratt about 6 years ago

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

Bug fix applied in the Saxon 9.8.0.8 maintenance release.

Please register to edit this issue

Also available in: Atom PDF