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 14995 - [FO30] context dependence
Summary: [FO30] context dependence
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.0 (show other bugs)
Version: Member-only Editors Drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
Depends on:
Reported: 2011-11-29 15:01 UTC by Tim Mills
Modified: 2011-12-13 18:01 UTC (History)
0 users

See Also:


Description Tim Mills 2011-11-29 15:01:09 UTC
The functions serialize, format-time, format-date and format-dateTime each have one variant which is marked context-dependent and one which is marked context-independent. e.g.


    The one-argument form of this function is 
Comment 1 Michael Kay 2011-11-29 18:26:45 UTC
For format-date() etc I think it is correct, but for reasons that are difficult to defend. 

In hte case of format-date(), etc, the two-argument forms of these functions depend on the default language, calendar, etc, but this dependency is described in the spec as "implementation-defined" behaviour rather than "context-dependent" behaviour. If we made default language and calendar properties of the dynamic context, then the functions would become context-dependent. Which would have the unfortunate consequence that you wouldn't be able to partially apply them.

For fn:serialize(), I think the spec appears to be wrong: I can't see any reason why the single-argument function is described as context-dependent (though of course the result is in many ways implementation-dependent...)
Comment 2 Tim Mills 2011-11-29 22:10:50 UTC
I'm a little uneasy about this.  As you know, I'd like the defaults to be part of the context.  Were this to be adopted at some point in the future, it would be a breaking change due to the reasons you outline.
Comment 3 Michael Kay 2011-12-06 22:23:17 UTC
The WG decided that the default language, calendar, and place used by the format-date|time functions should be made explicit properties of the dynamic context. [F+O has been changed accordingly; the definitions are yet to be added to the language book].

The properties of fn:serialize() have been corrected.
Comment 4 Michael Kay 2011-12-13 16:31:12 UTC
Fixed as proposed in the last call draft.
Comment 5 Tim Mills 2011-12-13 18:01:52 UTC