W3C home > Mailing lists > Public > www-webdav-dasl@w3.org > January to March 2008

Re: casting literal values

From: Julian Reschke <julian.reschke@gmx.de>
Date: Thu, 14 Feb 2008 22:14:15 +0100
Message-ID: <47B4AF27.7010400@gmx.de>
To: Javier Godoy <rjgodoy@fich.unl.edu.ar>
CC: www-webdav-dasl@w3.org

Javier Godoy wrote:
> A short comment about casting literal values:
> (Section 5.11)  [[
> The comparison evaluates to UNDEFINED if the property value can not be 
> cast to the specified datatype.
> ]]
> What happens if the property value can not be cast to the specified 
> datatype?:
> - when casting a literal value (DAV:literal) if the property type is 
> known and the server chooses to treat the literal according to this type,
> - when casting typed literal values.
> Failing with 422 seems logical, though it is not explicitly stated. 
> IMHO, it may help to recommend servers not to be lenient about this.
> ...

If the *instance* of the property can not be converted to the requested 
type, that expression evaluates to UNKNOWN, as said in 5.11. As such, it 
  doesn't make the query itself invalid, and thus no error needs to be 

However, if the DAV:typed-value specified in the query can not be 
converted to the desired type, it probably would be good to reject the 
query, as in

<lt xmlns="DAV:"
   <prop><edits xmlns="http://ns.example.org"/></prop>
   <typed-literal xsi:type="xs:integer">foobar</typed-literal>

Did you mean that case?

BR, Julian
Received on Thursday, 14 February 2008 21:14:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:22:44 UTC