<?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>17549</bug_id>
          
          <creation_ts>2012-06-19 21:13:42 +0000</creation_ts>
          <short_desc>[XQueryX30] missing parens for try/catch expression</short_desc>
          <delta_ts>2012-06-25 19:36:30 +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>XQueryX 3.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>CLOSED</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="Andrew Eisenberg">andrew.eisenberg</reporter>
          <assigned_to name="Jim Melton">jim.melton</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>69256</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Eisenberg">andrew.eisenberg</who>
    <bug_when>2012-06-19 21:13:42 +0000</bug_when>
    <thetext>I start with:

(try {1} catch * {2}) + 3


I use our applets to generate XQueryX:

    &lt;xqx:queryBody&gt;
      &lt;xqx:addOp&gt;
        &lt;xqx:firstOperand&gt;
          &lt;xqx:tryCatchExpr&gt;
            &lt;xqx:tryClause&gt;
              &lt;xqx:integerConstantExpr&gt;
                &lt;xqx:value&gt;1&lt;/xqx:value&gt;
              &lt;/xqx:integerConstantExpr&gt;
            &lt;/xqx:tryClause&gt;
            &lt;xqx:catchClause&gt;
              &lt;xqx:catchErrorList&gt;
                &lt;xqx:Wildcard/&gt;
              &lt;/xqx:catchErrorList&gt;
              &lt;xqx:catchExpr&gt;
                &lt;xqx:integerConstantExpr&gt;
                  &lt;xqx:value&gt;2&lt;/xqx:value&gt;
                &lt;/xqx:integerConstantExpr&gt;
              &lt;/xqx:catchExpr&gt;
            &lt;/xqx:catchClause&gt;
          &lt;/xqx:tryCatchExpr&gt;
        &lt;/xqx:firstOperand&gt;
        &lt;xqx:secondOperand&gt;
          &lt;xqx:integerConstantExpr&gt;
            &lt;xqx:value&gt;3&lt;/xqx:value&gt;
          &lt;/xqx:integerConstantExpr&gt;
        &lt;/xqx:secondOperand&gt;
      &lt;/xqx:addOp&gt;
    &lt;/xqx:queryBody&gt;


I use our XQueryX stylesheet to generate:

(
try { 1 }
  catch * 
{ 2 }+3)


This query does not have parens surrounding the try/catch expression, and so does not parse. I believe that our XQueryX stylesheet should be generating these parens.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69350</commentid>
    <comment_count>1</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2012-06-22 21:51:49 +0000</bug_when>
    <thetext>I have modified the XQueryX 3.0 stylesheet to generate surrounding parentheses for try-catch expressions, which can be seen in the XSLT Stylesheet in Appendix B of the editor&apos;s draft found at http://www.w3.org/XML/Group/qtspecs/specifications/xqueryx-30/html/Overview.html

I have therefore marked this bug RESOLVED/FIXED. 

The transformation now generates this:

(
(try { 1 }
  catch * 
{ 2 })+3)


If you agree that this was done correctly, please mark this bug CLOSED.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>