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 2261 - [xqueryx] function names
Summary: [xqueryx] function names
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQueryX 1.0 (show other bugs)
Version: Last Call drafts
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Jim Melton
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-16 13:13 UTC by David Carlisle
Modified: 2005-09-26 22:58 UTC (History)
0 users

See Also:


Attachments

Description David Carlisle 2005-09-16 13:13:15 UTC
Currently xqx:functionName allows any Qname which means that several XqueryX 
documents using this element translate to node tests such as node() or element()
that use a function-like syntax but are not functions.

It would be good if the schema declaration could use a facet to stop the node
test keywords being used as function names, unfortunately XSD can't do this
(unlike, say, Relax NG) as it can not restrict the content of the element based
on the non-appearance of the xqx:prefix attribute.

However the stylesheet could easily be modified to generate an error in these cases.

David
Comment 1 Jim Melton 2005-09-20 11:56:14 UTC
Thanks for your comment.  This is, I believe, a matter of philosophy.  Should
the XQueryX spec (including schema and stylesheet) be designed to prevent the
use of XQueryX constructs that translate into invalid, useless, or merely
ignorant XQuery syntax?  Well, we've tried to accomplish some minimal level of
that kind of prevention, but have (so far) taken the approach that any XQueryX
document that transforms into invalid XQuery (syntactically or semantically) has
undefined semantics. 

Nonetheless, we will take a closer look at this philosophical direction and see
what changes might be appropriate. 
Comment 2 David Carlisle 2005-09-20 12:07:04 UTC
> but have (so far) taken the approach that any XQueryX
> document that transforms into invalid XQuery (syntactically or semantically)
> has undefined semantics. 

I agree with that approach, but that is not the problem that is addressed here.
The problem here is that <xqx:functionName>element</ _should_ translate to
an invalid xquery (or an error raised by the translator) but that currently it
has _defined_ semantics as it translates to a perfectly valid XQuery expression
but as a node test and not as a function.

David
Comment 3 Jim Melton 2005-09-26 22:07:24 UTC
We have accepted your comment and proposed solution, and have made the
appropriate changes to the XQueryX stylesheet. 

Please let us know if you agree with this resolution of your issue, by adding a
comment to the issue record and changing the Status of the issue to Closed. Or,
if you do not agree with this resolution, please add a comment explaining why.
If you wish to appeal the WG's decision to the Director, then also change the
Status of the record to Reopened. If you wish to record your dissent, but do not
wish to appeal the decision to the Director, then change the Status of the
record to Closed. If we do not hear from you in the next two weeks, we will
assume you agree with the WG decision.
Comment 4 David Carlisle 2005-09-26 22:57:37 UTC
thanks