Hi
I get back a set of results from a search, one column in these results is a
date in ANSI format (YYYYMMDDHHMMSS) and I want to be able to present that
to the user in the results table in a nice way.
The results are retrieved, parsed and loaded into a dictionary using XQuery,
and that gets transferred into the search results table. Pretty standard
stuff in Sherlock as the code below shows
{-- Extract the information we need from the search and create the
dictionary --}
let $SearchResultsTable := for $Document in
$SearchResult/Documents/Document
return dictionary(
("score", $Document/Weight/text()/convert-html(.)),
("title", $Document/Title/text()/convert-html(.)),
("date", $Document/Data/text()/convert-html(.)),
("weblogTitle",
$Document/WeblogTitle/text()/convert-html(.)),
("weblogDescription",
$Document/WeblogDescription/text()/convert-html(.)),
("description",
$Document/Description/text()/convert-html(.)),
("doubleClickURL",
$Document/GUID/text()/convert-html(.)))
return dictionary(
("rssSearch.SearchResultsTable.dataValue", $SearchResultsTable),
("rssSearch.NetworkArrows.animating", false()))
Here is my challenge. I want to be able to present this date in a nice
format to the user, so convert it from an ANSI format.
From what I can tell there are two ways I can do that. I can either do it in
the code above, in which case I would need to call a JavaScript function
from Xquery (is this even possible). Or I can post-process the results and
convert the date for each row in the table. I am guessing I would do this by
putting the ANSI date on the pasteboard and looping over all the rows
converting the ANSI date to a printable date.
Any suggestions?
Cheers
Francois
_______________________________________________
sherlock-channel-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/sherlock-channel-development
Do not post admin requests to the list. They will be ignored.