<?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>27608</bug_id>
          
          <creation_ts>2014-12-13 17:06:00 +0000</creation_ts>
          <short_desc>Regular expressions in JSON Serialization tests</short_desc>
          <delta_ts>2016-05-11 21:50:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XQuery 3 &amp; XPath 3 Test Suite</component>
          <version>Working drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Christian Gruen">christian.gruen</reporter>
          <assigned_to name="O&apos;Neil Delpratt">oneil</assigned_to>
          <cc>josh.spiegel</cc>
    
    <cc>mike</cc>
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>116261</commentid>
    <comment_count>0</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2014-12-13 17:06:00 +0000</bug_when>
    <thetext>I believe that the regular expressions in the tests Serialization-json-58 – Serialization-json-72 need to be fixed, as many of them do not comply with the XQuery syntax. In most cases, it&apos;s about closing curly and square brackets that have not been escaped. Some other characters (parentheses, asterisk) need to be escaped as well. Some examples:

* Serialization-json-64

Curly and square brackets:

- OLD: \{&quot;book&quot;:\{.*&quot;author&quot;:\[{[^}]*},{[^}]*},{[^}]*}].*}}
- NEW: \{&quot;book&quot;:\{.*&quot;author&quot;:\[\{[^}]*\},\{[^}]*\},\{[^}]*\}\].*\}\}

* Serialization-json-60

Parentheses:

- OLD: \{&quot;menu&quot;:\{.*&quot;popup&quot;:\{&quot;menuitem&quot;:\[\{.*&quot;onclick&quot;:&quot;CreateNewDoc()&quot;.*},\{.*&quot;onclick&quot;:&quot;OpenDoc()&quot;.*},\{.*&quot;onclick&quot;:&quot;CloseDoc()&quot;.*}]}.*}}
- NEW: \{&quot;menu&quot;:\{.*&quot;popup&quot;:\{&quot;menuitem&quot;:\[\{.*&quot;onclick&quot;:&quot;CreateNewDoc\(\)&quot;.*\},\{.*&quot;onclick&quot;:&quot;OpenDoc\(\)&quot;.*\},\{.*&quot;onclick&quot;:&quot;CloseDoc\(\)&quot;.*\}\]\}.*\}\}

* Serialization-json-67

Forward slashes (should not be escaped):

- OLD: \{&quot;book&quot;:\{.*&quot;author&quot;:\[{[^}]*},{[^}]*},&quot;&lt;simple&gt;2&lt;\/simple&gt;&quot;,{[^}]*}].*}}
- NEW: \{&quot;book&quot;:\{.*&quot;author&quot;:\[\{[^}]*\},\{[^}]*\},&quot;&lt;simple&gt;2&lt;/simple&gt;&quot;,\{[^}]*\}\].*\}\}

* Serialization-json-61

Asterisks:

- OLD: &quot;text&quot;:\{.*&quot;onMouseUp&quot;:&quot;sun1\.opacity = \(sun1\.opacity / 100\) * 90;&quot;.*}
- NEW: &quot;text&quot;:\{.*&quot;onMouseUp&quot;:&quot;sun1\.opacity = \(sun1\.opacity / 100\) \* 90;&quot;.*\}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116262</commentid>
    <comment_count>1</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2014-12-13 17:11:38 +0000</bug_when>
    <thetext>One more comment on Serialization-json-68:

The &lt;node-key&gt;strange&lt;/node-key&gt; will be atomized (according to the spec, 3.10.1.1), so the serialized result will look as follows:

  ... &quot;strange&quot;:&quot;&lt;simple&gt;2&lt;/simple&gt;&quot; ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116716</commentid>
    <comment_count>2</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2014-12-31 20:33:57 +0000</bug_when>
    <thetext>I agree with Christian.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117506</commentid>
    <comment_count>3</comment_count>
    <who name="Christian Gruen">christian.gruen</who>
    <bug_when>2015-01-27 12:59:27 +0000</bug_when>
    <thetext>Fixed, changes committed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>119458</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2015-04-13 09:16:12 +0000</bug_when>
    <thetext>I found some further cases of closing square brackets that were not escaped, and have fixed them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126416</commentid>
    <comment_count>5</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2016-05-11 21:23:56 +0000</bug_when>
    <thetext>It looks like this assertion is wrong:

&lt;serialization-matches&gt;&quot;text&quot;:\{.*&quot;vOffset&quot;:250.*\}&lt;/serialization-matches&gt;

https://github.com/LeoWoerteler/QT3TS/blob/master/ser/json/data003.json

This may or may not pass depending on the order of the map entries.  

It should be. 

&lt;serialization-matches&gt;&quot;text&quot;:\{.*&quot;vOffset&quot;:100.*\}&lt;/serialization-matches&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126417</commentid>
    <comment_count>6</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2016-05-11 21:24:43 +0000</bug_when>
    <thetext>Comment 5 is referring to Serialization-json-61</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126418</commentid>
    <comment_count>7</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2016-05-11 21:50:12 +0000</bug_when>
    <thetext>Fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>