On Thu, 4 Apr 2002, [iso-8859-1] Fran�ois Machab�e wrote:
> I am working on a taglib to access the Swish-e search functions and am
> having a hard time figuring out how to pass tags to the subs and get the
> result back out to the pipeline in a proper xml format. I have a version of
> the taglib that works but was told by experts that it broke the design
> patterns for AxKit because I accessed and manipulated the document directly
> via createElement calls, etc...
>
> Here is the XSP page that calls the taglib:
[...]
A note, Francois: For convenience and ease of reading, you can use
attributes for your function call instead of child tags. They both work
with TLH functions; the only limitation with attributes is that attribute
values can't be dynamic. You can also mix and match.
Instead of this:
> <swish:send-query>
> <swish:index>./nexus.swish</swish:index>
> <swish:title>a search</swish:title>
> <swish:query>suexec</swish:query>
> <swish:props></swish:props>
> <swish:sort></swish:sort>
> <swish:context>1</swish:context>
> <swish:limit></swish:limit>
> </swish:send-query>
you can have this:
<swish:send-query index="./nexus.swish" title="a search"
query="suexec" props="" sort="" context="1" limit=""/>
You might also want to make props, sort, context and limit optional args
if this makes sense for your function. That way people don't have to
specify that an attribute equals "".
Also, you don't need the <xsp:logic> wrapper tag. I don't even really know
what would happen if you did use it.
> Here is the current , not working or completed, TagHelper based taglib and
> after that, the working one that is not properly coded for reference.
How does it not work? What's the result that you get? As far as I can tell
you'll just end up returning an empty result, but if you return
{ x=3, y=5 }
do you get:
<x>3</x><y>5</y>
?
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]