Hi Antoni,
Now questions:
- Was the query above wrong?
yes, it was. We've further strengthened our type checks by introducing a distinction between casts and sequence type matchings, as demanded by the spec. In a nutshell: the type extension "as xs:dateTime" checks only if a value can be treated as item of type xs:dateTime, but it does not perform a cast.
- let $lmd := xs:dateTime($item/value[@xsi:type="xs:dateTime"]/text())
- let $lmd := $item/value[@xsi:type="xs:dateTime"] cast as xs:dateTime
- Which of the suggested new versions will be the fastest? The first "feels" like a double cast dateTime->string->dateTime.
Both variants should take pretty much the same time, as "cast as" will be evaluated the same way as xs:dateTime(). In the first variant, however, you can get rid of the text() step.
- What is the cleanest way to get a log with actual queries. I use tcpdump now, which is rather ugly. I tried the standard Tomcat's RequestDumperFilter, but it prints all the request information *apart* from the body. Do I have to write my own filter, as the guy on Stackoverlow did:
http://stackoverflow.com/questions/1528628/logging-payload-of-posts-to-tomca...
This would surely be an option. You may as well have a look into the server logs, found at data/.logs. It’s particularly useful for ordinary client requests and RESTXQ calls, but it could be enriched with some additional information if that looks useful.
Hope this helps, Christian