Hi Bryan,
Am 23.11.2012 12:34, schrieb bryan rasmussen:
Error: Stopped at line 1, column 73: [XPST0003] Expecting 'where', 'order' or 'return' expression.
Query: for $doc in db:open('dk') let $dates := $doc//DATO for $date in $dates try{ return <gooddate>{xs:date($date)}</gooddate> } catch *{ return <baddate docid="{$doc/*/@ID}">{$date}</baddate>}
your `return` keywords are in the wrong spot, there should be one before the `try` and none inside:
for $doc in db:open('dk') let $dates := $doc//DATO for $date in $dates return try{ <gooddate>{xs:date($date)}</gooddate> } catch * { <baddate docid="{$doc/*/@ID}">{$date}</baddate> }
Hope that helps, cheers, Leo