<?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>29187</bug_id>
          
          <creation_ts>2015-10-08 14:54:57 +0000</creation_ts>
          <short_desc>[editorial] Errors in string constructor examples</short_desc>
          <delta_ts>2015-10-08 21:41:18 +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.1</component>
          <version>Proposed Edited Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</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="Josh Spiegel">josh.spiegel</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          
          
          <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>123609</commentid>
    <comment_count>0</comment_count>
    <who name="Josh Spiegel">josh.spiegel</who>
    <bug_when>2015-10-08 14:54:57 +0000</bug_when>
    <thetext>See:
https://lists.w3.org/Archives/Public/public-xsl-query/2015Oct/0034.html

(1)

    This is missing a back tick in the close of the string constructor:

      ``[`{ $i, ``[literal text]``, $j, ``[more literal text]`` }`]`

(2)

This example is a mix of XQuery and JSON:

    {
      &quot;name&quot;: &quot;Chris&quot;,
      &quot;value&quot;: 10000,
      &quot;taxed_value&quot;: 10000 - (10000 * 0.4),
      &quot;in_ca&quot;: true
   }

Should it be?

   map {
      &quot;name&quot;: &quot;Chris&quot;,
      &quot;value&quot;: 10000,
      &quot;taxed_value&quot;: 10000 - (10000 * 0.4),
      &quot;in_ca&quot;: true()
   }

(3) 

This example:

declare function local:prize-message($a) as xs:string
{
``[Hello `{$a.name}`
You have just won `{$a.value}` dollars!
…

Has the wrong lookup operator syntax.  It should be:

declare function local:prize-message($a) as xs:string
{
``[Hello `{$a?name}`
You have just won `{$a?value}` dollars!
…

(the same applies to the following 2 prize-message functions)

(4) 

For the &lt;div&gt; example, there are two spaces before the closing &lt;/div&gt;.  I would remove the two spaces and then correct the output whitespace to this:

&lt;div&gt;
    &lt;h1&gt;Hello Chris&lt;/h1&gt;
    &lt;p&gt;You have just won 10000 dollars!&lt;/p&gt;
    &lt;p&gt;Well, 6000 dollars, after taxes.&lt;/p&gt; 
&lt;/div&gt;

(5) There is no indenting in the final prize-message function. 

(6) The final prize-message function is missing an interpolation: $a.value should be `{$a?value}`</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123623</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2015-10-08 21:41:18 +0000</bug_when>
    <thetext>Thanks! I just committed a fix.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>