This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2525 - xqx: encoding of leading (or lone) /
Summary: xqx: encoding of leading (or lone) /
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.6
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Ravindranath (Ravi) Chennoju
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-15 10:37 UTC by David Carlisle
Modified: 2006-08-09 10:03 UTC (History)
0 users

See Also:


Attachments

Description David Carlisle 2005-11-15 10:37:23 UTC
Parenexpr-20.xq involves a subterm (/) (I think this is the only example
of a leading / in a path expression in the test suite)

xq2xqx and the test parser applet both encode this as

         <xqx:parenthesizedExpr>
                  <xqx:rootExpr/>
                </xqx:parenthesizedExpr>


Which seems to be the natural XqueryX encoding, given that XqueryX has a
rootExpr element. However the supplied XqueryX version of this test expands /
and encodes this subterm as (the XqueryX equivalent of) the expansion of /
if thought of as abreviated syntax. The XQueryX specification is currently
rather inconsistent in whether abbreviated syntax should be expanded or not,
but in the test suite I think it's best to keep the two forms as close as
possible, so that the tests are testing the same thing, and that rootExpr should
be used (or removed from XQueryX if it shouldn't be used).

                              <xqx:parenthesizedExpr>
                                <xqx:pathExpr>
                                  <xqx:argExpr>
                                    <xqx:treatExpr>
                                      <xqx:argExpr>
                                        <xqx:functionCallExpr>
                                          <xqx:functionName
xqx:prefix="fn">root</xqx:functionName>
                                          <xqx:arguments>
                                            <xqx:pathExpr>
                                              <xqx:stepExpr>
                                                <xqx:xpathAxis>self</xqx:xpathAxis>
                                                <xqx:anyKindTest/>
                                              </xqx:stepExpr>
                                            </xqx:pathExpr>
                                          </xqx:arguments>
                                        </xqx:functionCallExpr>
                                      </xqx:argExpr>
                                      <xqx:sequenceType>
                                        <xqx:documentTest/>
                                      </xqx:sequenceType>
                                    </xqx:treatExpr>
                                  </xqx:argExpr>
                                </xqx:pathExpr>
                              </xqx:parenthesizedExpr>
                            </xqx:filterExpr>
Comment 1 David Carlisle 2005-11-15 10:49:31 UTC
Also note that xqx:rootExpr unambiguously denotes the document root, but the
expression using fn:root() is dependent on the current namespace bindings.
It's not possible to tell from just one sample if the convertor used is taking
account of the statically known namespaces and would use something other than
fn:root if fn had been redeclared. 
Comment 2 Ravindranath (Ravi) Chennoju 2006-07-14 00:00:41 UTC
Fixed in previous release of XQTS