This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6735 - List simple types with whitespace != collapse
Summary: List simple types with whitespace != collapse
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: David Ezell
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: editorial, resolved
Depends on:
Blocks:
 
Reported: 2009-03-24 21:14 UTC by Sandy Gao
Modified: 2009-05-08 16:37 UTC (History)
1 user (show)

See Also:


Attachments

Description Sandy Gao 2009-03-24 21:14:37 UTC
The constraint "Derivation Valid (Restriction, Simple)" requires that for a list type D:

2.2.1.2 D.{facets} contains only the whiteSpace facet component.

But there is no requirement on the value of the "whiteSpace" facet. Can it be "preserve"?

It's not possible to get whiteSpace=preserve if the list type comes from a schema document, but what if it's "born-binary"?
Comment 1 Dave Peterson 2009-03-24 21:50:23 UTC
(In reply to comment #0)

> But there is no requirement on the value of the "whiteSpace" facet. Can it be
> "preserve"?
> 
> It's not possible to get whiteSpace=preserve if the list type comes from a
> schema document, but what if it's "born-binary"?
 
In Datatypes, section 2.4.1.2, List Datatypes, we assert:

"When a datatype is derived by ·restricting· a ·list· datatype, the following ·constraining facets· apply:
  ·length·
  ·maxLength·
  ·minLength·
  ·enumeration·
  ·pattern·
  ·whiteSpace·
  ·assertions·
For each of ·length·, ·maxLength· and ·minLength·, the length is measured in number of list items.  The value of ·whiteSpace· is fixed to the value collapse."

That last sentence should settle the matter.  Perhaps it should be duplicated in Structures?

Note also another aspect of your quote:  "2.2.1.2 D.{facets} contains only the whiteSpace facet component."  I vaguely recall there was some reason we required that a construction of, say, a two-items-required list of integers datatype would be disallowed and one would be required to first construct an arbitrary-lists-of-integers datatype and then derive (using the length facet) the desired one.  Presumably to avoid constructing and deriving-by-facet in the same step.  Without looking, I suspect that our current derivation/construction mechanisms, even without that explicit restriction, don't have that capability.
Comment 2 Sandy Gao 2009-05-08 16:37:41 UTC
During its 2009-04-17 telecon, the schema WG adopted a proposal to address this issue, by updating clause 2.2.1.3 in "Derivation Valid (Restriction, Simple)" to read:

    2.2.1.2  D.{facets} contains only the whiteSpace facet component with
             {value} = collapse and {fixed} = true.

With this change, the WG believes that the issue raised in this bug report is
addressed. As the reporter of this bug, I'm closing it accordingly.