[MarkLogic Dev General] MarkLogic XQuery Tag Library
andJSTLXMLTag Library
Alan Darnell
alan.darnell at utoronto.ca
Thu Apr 5 08:36:00 PDT 2007
Matt,
Do you store these queries as xqy files on the Mark Logic server and
bring the content into your servlet via HTTP or do you keep the query
logic in the servlet and grab the results from Mark Logic via XDBC?
Once you have the data from the ML server as an HTML fragment, do you
then pass this to a JSP page for rendering or do you do all the
rendering in the servlet? If you pass the HTML fragment to a JSP
page, what mechanism do you use to do this?
Sorry for the dim questions -- I'm trying to figure out how to apply
the "classic" MVC model to Mark Logic.
Alan
On 4-Apr-07, at 6:03 PM, Griffin, Matt wrote:
> I've been trying to push this kind of content processing back into ML
> wherever possible. I still try to be careful about separation of
> concern so I write my queries as the result of two functions. The
> first
> selects relevant content and is reusable, the second wraps it for
> formatting. Java can then just use the result as a stream and put it
> where it needs to go.
>
> The call would look something like this for an html fragment:
> element ul {
> for $j select-journals-by-term($term)
> return
> element li {
> attribute id { $j//journal-id },
> $j//title
> }
>
>
> -Matt
More information about the General
mailing list