<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>2207</bug_id>
          
          <creation_ts>2005-09-14 19:11:09 +0000</creation_ts>
          <short_desc>R-215: Whitespace and identity constraints</short_desc>
          <delta_ts>2011-10-21 16:39:23 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Structures: XSD Part 1</component>
          <version>1.0 only</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>needsDrafting</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>2229</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sandy Gao">sandygao</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          <cc>Martin.vGagern</cc>
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6225</commentid>
    <comment_count>0</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2005-09-14 19:11:09 +0000</bug_when>
    <thetext>According to the errata:
http://www.w3.org/2001/05/xmlschema-errata.html#e1-6
whitespace is now allowed between tokens in xpaths. 

The patterns in the schema for schema have not been updated to reflect this. 

See:
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2003JanMar/0044.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6226</commentid>
    <comment_count>1</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2005-09-14 19:11:16 +0000</bug_when>
    <thetext>Discussed at the 2003-08-31 telecon to classify as an error with erratum, and 
instruct the editors to fix the pattern.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16152</commentid>
    <comment_count>2</comment_count>
    <who name="Martin von Gagern">Martin.vGagern</who>
    <bug_when>2007-08-15 11:57:44 +0000</bug_when>
    <thetext>*** Bug 4950 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16485</commentid>
    <comment_count>3</comment_count>
    <who name="Martin von Gagern">Martin.vGagern</who>
    <bug_when>2007-09-12 10:16:22 +0000</bug_when>
    <thetext>I would assume the following shell script should give correct patterns to fix both this issue here and bug 2122.

S=&quot;\\s*&quot;
NCName=&apos;[^\I:][^\C:]*&apos;
QName=&quot;${NCName}:${NCName}&quot;
NameTest=&quot;(child::${S})?(${NCName}:)?(${NCName}|\\*)&quot;
Step=&quot;${S}(\\.|${NameTest})${S}&quot;
Path=&quot;(${S}\\.${S}//)?${Step}(/${Step})*&quot;
Selector=&quot;${Path}(\\|${Path})*&quot;
echo &quot;selector: ${Selector}&quot;
LastStep=&quot;${Step}|${S}(@|attribute::)${S}${NameTest}${S}&quot;
Path=&quot;(${S}\\.${S}//)?(${Step}/)*(${LastStep})&quot;
Selector=&quot;${Path}(\\|${Path})*&quot;
echo &quot;field: ${Selector}&quot;

With some linebreaks added, the resulting patterns look as follows.

selector: 
(\s*\.\s*//)?\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*
(/\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*)*
(\|(\s*\.\s*//)?\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*
(/\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*)*)*

field: 
(\s*\.\s*//)?(\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*/)*
(\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*
|\s*(@|attribute::)\s*(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*)\s*)
(\|(\s*\.\s*//)?(\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*/)*
(\s*(\.|(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*))\s*
|\s*(@|attribute::)\s*(child::\s*)?([^\I:][^\C:]*:)?([^\I:][^\C:]*|\*)\s*))*</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>