Hi Steve,

The working taglib returns a proper XML document that looks like:

<?xml version="1.0" encoding="UTF-8"?>
<search-results><rank>1000</rank><file_name>http://www.nexus-is.qc.ca/admin/
manual/admin/CGI.html</file_name><title>Stronghold Web Server 2.4.1
Administration Guide: Common Gateway
Interface</title><content_length>12730</content_length><rank>814</rank><file
_name>http://www.nexus-is.qc.ca/admin/manual/admin/IX.html</file_name><title
>Stronghold Web Server 2.4.1 Administration Guide:
Index</title><content_length>104545</content_length><rank>761</rank><file_na
me>http://www.nexus-is.qc.ca/admin/manual/admin/TOC.html</file_name><title>S
tronghold Web Server 2.4.1 Administration Guide: Contents in
Detail</title><content_length>19609</content_length></search-results>

Which I can then send to an XSLT sheet for styling.

I have a question, why should I use attributes and not child tags?  Is it
not proper to associate complexe data structures in this way?

Thanks!
-----------------------------------------------------------
Fran�ois Machab�e
Nexus Informatique & Marketing Inc.
Email: [EMAIL PROTECTED]
WWW: http://www.nexus-is.ca

----- Original Message -----
From: "Steve Willer" <[EMAIL PROTECTED]>
To: "Fran�ois Machab�e" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, April 04, 2002 12:01 PM
Subject: Re: Taglib dev help!


>
> 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]

Reply via email to