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 2526 - xqx: character content of direct element constructors in XqueryX
Summary: xqx: character content of direct element constructors in XqueryX
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0.1
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Ravindranath (Ravi) Chennoju
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-15 14:53 UTC by David Carlisle
Modified: 2007-01-23 00:52 UTC (History)
0 users

See Also:


Attachments

Description David Carlisle 2005-11-15 14:53:58 UTC
XqueryX (unfortunately) doesn't allow a natural encoding of character content of
direct element constructors, I think that the most natural encoding given the
current XQueryX specification, is to encode the character content as a string
literal in an enclosed expression, so encode
<elem>aaa</elem> as <elem>{"aaa"}</elem> .
Both xq2xqx and the W3C test applet take this approach.

However the XqueryX files supplied with the test suite consistently encode such
text using the computed text constructor
<elem>text{"aaa"}</elem> 
This is clearly equivalent in some respects, but it makes the XqueryX more
verbose than needed, and more importantly it skews the XqueryX versions of the
test suite, introducing computed constructors into tests that are advertised as
testing direct constructors.

David
Comment 1 Maxim Orgiyan 2006-09-15 17:46:47 UTC
This seems more of a style issue.. Jim
(or rather the former XQueryX editor, now
at Microsoft, that Jim contacted on this issue)
recommended using text{}, so I ended up doing that...

Since this is not a correctness issue, I can
revisit this after all XQueryX correctness
bugs are fixed.
Comment 2 David Carlisle 2006-09-29 11:57:28 UTC
(In reply to comment #1)
> This seems more of a style issue.. Jim
> (or rather the former XQueryX editor, now
> at Microsoft, that Jim contacted on this issue)
> recommended using text{}, so I ended up doing that...
> 
> Since this is not a correctness issue, I can
> revisit this after all XQueryX correctness
> bugs are fixed.
> 
It is not just a matter of coding style, it also (negatively) affects the coverage of the test suite. text{..} is tested elsewhere in tests designed to
test that constructor, so by encoding these Xquery tests by using the text constructor you are leaving xqueryx expressions that do not use the text constructor potentially untested, as in the XQueryX test suite all these tests now use the text constructor.

(It may be that there is enough coverage elsewhere for the use of string literals in element content, but that would need to be checked.)



David