Re: quick question on new functions specifications in rq25.xml...

On 11/01/11 16:45, Axel Polleres wrote:
>
> On 11 Jan 2011, at 16:37, Andy Seaborne wrote:
>
>> (this is out of date - the current draft has more work on this area)
>>
>> On 11/01/11 14:45, Axel Polleres wrote:
>>> Looked briefly over the numeric, date, etc functions, looks great!
>>>
>>> Just a small question for the moment regarding:
>>>
>>> "
>>> 17.4.5.9 tz
>>>
>>>    simple literal   timezone (xsd:dateTime arg)
>>>
>>> Returns the timezone part of arg as a simple literal.
>>> "
>>>
>>> we should mention what happens when the timezone part is empty. in fn:timezone-from-dateTime
>>> this returns an ewmpty sequence, what is our equivalent of returning an empty sequence? an empty sting literal?
>>> or shall we return an error? that question actually may also apply to 17.4.5.8 timezone.
>>
>> timezone(no TZ) raises an error because we have nothing for empty
>> sequence AKA nil (rdf:nil would be confusing IMHO).
>
> +1 to nil being a bit awkward.
>
>>
>> tz(no TZ) returns ""
>
> ok wirth me in principle, but why differnet behavior from timezone?

because:

1/ tz() is an accessor into the literal lexical form (it's substring, 
give or take the variable length seconds part), timezone is concerned 
with values.  There is no "no value" choice.

2/ There is a sensible choice for tz(), there isn't for timezone()

use case for TZ: displaying the timezone.

	Andy

>
> thanks,
> Axel
>
>>
>>
>>          Andy
>>
>

Received on Tuesday, 11 January 2011 16:52:01 UTC