W3C home > Mailing lists > Public > public-xqts-comments@w3.org > April 2006

Inspect/implementation defined order fn-trace-*

From: Frans Englich <englich@kde.org>
Date: Thu, 20 Apr 2006 14:12:20 +0000
To: public-xqts-comments@w3.org
Message-Id: <200604201412.20887.englich@kde.org>


Hi,

Many of the fn:trace tests are of 'Inspect' type, and I don't get why. Here's 
an example fn-trace21:

(: Name: fn-trace-3 :)
(: Description: Simple call of "fn:trace" function used with an addition 
operation. :)

for $var in (1,2,3,4,5)
return fn:trace($var + 1,"The Value of $var + 1 is: ")

Baseline(inspect):
2 3 4 5 6

This suggests that what fn:trace returns, is in implementation dependent 
order.  That is: fn:trace((1, 2), "msg") can return either (1, 2) or (2, 1). 
I have a hard time backing this up from the spec. It says:

<quote>
The destination of the trace output is ·implementation-defined·. The format of 
the trace output is ·implementation dependent·. The ordering of output from 
invocations of the fn:trace() function is ·implementation dependent·.
</quote>

So, if the return value is supposed to be in implementation defined order, 
that must be spec'd by "The ordering of output from invocations of the 
fn:trace() function is ·implementation dependent".

Then look at the example:

<quote>
Writing fn:trace($v, 'the value of $v is:') will put the strings "124.84" and 
"the value of $v is:" in the trace data set in implementation dependent 
order.
</quote>

Here it says the trace data will be in implementation dependent order, but the 
first paragraph only says the format and the destination is implementation 
dependent.

So, as I see it, there's two interpretations on what "implementation dependent 
order" applies to: the example says it's the trace data, the XQTS WG's 
interpretation says it's the return value.

I think F&O's choice of "output" is vague and that it could use editorial 
clarification. Any thoughts on this? I'll submt a report on F&O unless 
something unexpected pops up.


Regards,

		Frans
Received on Thursday, 20 April 2006 14:00:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:22:07 GMT