You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2005/04/15 18:31:38 UTC

[jira] Commented: (NUTCH-42) enhance search.jsp such that it can also returns XML

     [ http://issues.apache.org/jira/browse/NUTCH-42?page=comments#action_62911 ]
     
Doug Cutting commented on NUTCH-42:
-----------------------------------

I prefer we have a servlet that generates only XML, and then generate HTML from this XML.  Do you dislike that approach for some reason?

> enhance search.jsp such that it can also returns XML
> ----------------------------------------------------
>
>          Key: NUTCH-42
>          URL: http://issues.apache.org/jira/browse/NUTCH-42
>      Project: Nutch
>         Type: Wish
>   Components: web gui
>     Reporter: Michael Wechner
>     Priority: Trivial
>  Attachments: search.jsp.diff
>
> Enhance search.jsp such that by specifying a parameter format=xml the JSP will return an XML, whereas if no format is being specified then it will return HTML

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Re: [Nutch-dev] [jira] Commented: (NUTCH-42) enhance search.jsp such that it can also returns XML

Posted by Jack Tang <hi...@gmail.com>.
Doug

I am working on "XSLT result" now, it seems easy.
OpenSearchServlet will return xml result by default, and xslt result
by "format=xslt", also you can config xslt location. Anyone need
velocity/freemaker result?

Thanks
/Jack


On 4/19/05, Doug Cutting <cu...@nutch.org> wrote:
> Michael Wechner wrote:
> > I think it would make sense to add <?xml-stylesheet, because XML parsers
> > won't mind,
> > but it allows client side rendering by XSLT such as for instance
> > http://search.msn.ch/results.aspx?q=Nutch&format=rss&FORM=ZZRE
> 
> So the idea is that the "format=" supplies the name of the stylesheet?
> That sounds good to me.  Any objections?
> 
> > Also I think it would make sense to put a link within the search.jsp to
> > the OpenSearchServlet
> 
> Done.
> 
> > Just let me know if I can help on any of these issues or if you or anyone
> > else has already started.
> 
> Are you interested in contributing the server-side XSLT solution?  I
> have no immediate plans to implement that.
> 
> Cheers,
> 
> Doug
>

Re: [Nutch-dev] [jira] Commented: (NUTCH-42) enhance search.jsp such that it can also returns XML

Posted by Doug Cutting <cu...@nutch.org>.
Michael Wechner wrote:
> I think it would make sense to add <?xml-stylesheet, because XML parsers 
> won't mind,
> but it allows client side rendering by XSLT such as for instance
> http://search.msn.ch/results.aspx?q=Nutch&format=rss&FORM=ZZRE

So the idea is that the "format=" supplies the name of the stylesheet? 
That sounds good to me.  Any objections?

> Also I think it would make sense to put a link within the search.jsp to 
> the OpenSearchServlet

Done.

> Just let me know if I can help on any of these issues or if you or anyone
> else has already started.

Are you interested in contributing the server-side XSLT solution?  I 
have no immediate plans to implement that.

Cheers,

Doug

Re: [Nutch-dev] [jira] Commented: (NUTCH-42) enhance search.jsp such that it can also returns XML

Posted by Michael Wechner <mi...@wyona.com>.
Doug Cutting wrote:

> Michael Wechner wrote:
>
>>>     Doug Cutting commented on NUTCH-42:
>>> -----------------------------------
>>>
>>> I prefer we have a servlet that generates only XML, and then 
>>> generate HTML from this XML.  Do you dislike that approach for some 
>>> reason?
>>
>>
>> no, not at all. I much more prefer a servlet. I have a servlet which 
>> I use for a meta search engine and could change it for the purposes 
>> of Nutch.
>>
>> It currently offers the following three variations:
>>
>> 1) "pure" XML (plus <?xml-stylesheet ... which might be executed on 
>> the client side)
>
>
> That's currently implemented, without the <?xml-stylesheet.


you mean by src/java/org/apache/nutch/searcher/OpenSearchServlet.java ?
Sorry, didn't realize that you have done this already (whereas Eric said 
mentioned
something like this on the Lucene mailing list)

I think it would make sense to add <?xml-stylesheet, because XML parsers 
won't mind,
but it allows client side rendering by XSLT such as for instance
http://search.msn.ch/results.aspx?q=Nutch&format=rss&FORM=ZZRE

Also I think it would make sense to put a link within the search.jsp to 
the OpenSearchServlet

>
>> 2) HTML, but which is generated out of the XML based on a server side 
>> XSLT
>
>
> This we need to add.  Most users of Nutch will probably tweak it, but 
> a good example would be nice to have in SVN.


yes, that would be the idea that people can tweak it. Also the XSLT file 
name
could be made configurable within web.xml

>
>
>> 3) div-like HTML with a CSS
>
>
> This could also be generated server-side with XSLT, from the same XML, no?


yes, but I think it might make sense to "hardcode" this because of 
performance issues, because XSLT transformations (depending on the XSLT) 
can drag down the server
(of course one could cache the XSLT within memory, but nevertheless ...)

>   It's just another example, right?


to add it as another example as well would certainly make sense.

Just let me know if I can help on any of these issues or if you or anyone
else has already started.

Michi

>
> Doug
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Nutch-developers mailing list
> Nutch-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nutch-developers
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


Re: [Nutch-dev] [jira] Commented: (NUTCH-42) enhance search.jsp such that it can also returns XML

Posted by Doug Cutting <cu...@nutch.org>.
Michael Wechner wrote:
>>     Doug Cutting commented on NUTCH-42:
>> -----------------------------------
>>
>> I prefer we have a servlet that generates only XML, and then generate 
>> HTML from this XML.  Do you dislike that approach for some reason?
> 
> no, not at all. I much more prefer a servlet. I have a servlet which I 
> use for a meta search engine and could change it for the purposes of Nutch.
> 
> It currently offers the following three variations:
> 
> 1) "pure" XML (plus <?xml-stylesheet ... which might be executed on the 
> client side)

That's currently implemented, without the <?xml-stylesheet.

> 2) HTML, but which is generated out of the XML based on a server side XSLT

This we need to add.  Most users of Nutch will probably tweak it, but a 
good example would be nice to have in SVN.

> 3) div-like HTML with a CSS

This could also be generated server-side with XSLT, from the same XML, 
no?  It's just another example, right?

Doug

Re: [Nutch-dev] [jira] Commented: (NUTCH-42) enhance search.jsp such that it can also returns XML

Posted by Michael Wechner <mi...@wyona.com>.
Doug Cutting (JIRA) wrote:

>     [ http://issues.apache.org/jira/browse/NUTCH-42?page=comments#action_62911 ]
>     
>Doug Cutting commented on NUTCH-42:
>-----------------------------------
>
>I prefer we have a servlet that generates only XML, and then generate HTML from this XML.  Do you dislike that approach for some reason?
>  
>

(sorry for posting directly into the mailing list, but the httpd in 
front of Jira
returns a Bad Gateway currently. I will repost this later.)

no, not at all. I much more prefer a servlet. I have a servlet which I 
use for a meta search engine and could change it for the purposes of Nutch.

It currently offers the following three variations:

1) "pure" XML (plus <?xml-stylesheet ... which might be executed on the 
client side)

2) HTML, but which is generated out of the XML based on a server side XSLT

3) div-like HTML with a CSS

Would that make sense?

>  
>
>>enhance search.jsp such that it can also returns XML
>>----------------------------------------------------
>>
>>         Key: NUTCH-42
>>         URL: http://issues.apache.org/jira/browse/NUTCH-42
>>     Project: Nutch
>>        Type: Wish
>>  Components: web gui
>>    Reporter: Michael Wechner
>>    Priority: Trivial
>> Attachments: search.jsp.diff
>>
>>Enhance search.jsp such that by specifying a parameter format=xml the JSP will return an XML, whereas if no format is being specified then it will return HTML
>>    
>>
>
>  
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org