This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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
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.
(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