[Bug 6908] Definition of pattern facet

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6908





--- Comment #1 from Dave Peterson <davep@iit.edu>  2009-05-14 15:48:12 ---
(In reply to comment #0)
> The definition of the pattern facet in 4.3.4 says: "[Definition:]   pattern is
> a constraint on the ·value space· of a datatype which is achieved by
> constraining the ·lexical space· to ·literals· which match each member of a set
> of patterns."
> 
> This seems to invite the incorrect reading that if there is more than one
> xs:pattern element in a restriction, the supplied literal must match each of
> them; whereas the detailed specification makes clear that it need only match
> one of them.

I assume you mean "more than one <xs:pattern> element in a <xs:restriction>
element".  But only one RE is added to pattern component (i.e., its {value}, of
course) by that restriction--the "or" of the REs in the <xs:pattern> elements. 
(Yes, I know you understand that--but it's important to be aware of in what
follows.)

> Suggestion (which also avoids the apparent cyclicity in the current
> definition):
> 
> "[Definition:]   pattern is a constraint on the ·value space· of a datatype
> which is expressed by restricting the ·lexical space· to ·literals· that match
> one or more regular expressions."

Take this literally.  "pattern", being defined, is a facet.  (It can't be an
<xs;pattern> element--that always has only one RE in it.)  But the REs you are
talking about are the content of one or more <xs:pattern> elements (presuming
we're not in a born-binary situation).  It seems to me you're mixing apples and
oranges jumping from the facet component to the elements in a schema document
that select that particular facet component.

Someone who doesn't understand what a pattern facet is and when reading the
definition gets confused presumably already knows that the pattern facet arises
from <xs:facet> elements, but doesn't know the semantics of that element type
and has incorrectly assumed that each <xs:facet> element gives rise to a
separate RE in the facet's {value}. 

Perhaps we could instead add a sentence, within or following the definition,
saying that each derivation step adds at most one RE to the set.  That should
make people realize, if they've made that wrong assumption, that they'd better
find out what the real relation between the <xs:facet> elements and the RE in
the {value} really is.

Your definition effectively says the pattern facet constrains by an OR of REs. 
The prose then goes on to say, down in the details, that it constrains by an
AND of REs.  I think this would cause a lot more confusion than the current
wording.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 14 May 2009 15:48:22 UTC