cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederic Gaus <>
Subject lucene-search-generator-bug
Date Fri, 05 Sep 2003 10:25:16 GMT
Hi all!

I'm not that sure, but I think I found a bug in the search-generator of

When I start a search with lucene the search-generator returns the 
following xml-document:

<?xml version="1.0" encoding="UTF-8"?>
<results xmlns:search=""
         xmlns="" date="1062755176496"
         query-string="test" start-index="0" page-length="10">
  <hits total-count="2" count-of-pages="1">
    <hit rank="0" score="0.65923184" uri="/site/main-about"/>
    <hit rank="1" score="0.31874946" uri="/site/main-profil"/>
  <navigation total-count="2" count-of-pages="1" has-next="false" has-previous="false"
next-index="2" previous-index="0">
    <navigation-page start-index="0"/>

trying to format the result with a stylesheets results in many problems. 
the following is not working:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl=""

  <xsl:output method="html"/>

  <xsl:template match="/">
    <xsl:apply-templates select="result:results"/>

  <xsl:template match="result:results">
        <xsl:value-of select="@query-string"/>

I don't get the value .. using attribute::query-string is even not
working. using attribute::*[position()=2] is working..

so I gess the generator is not doing right because when I copy the
resulting xml per copy-paste into a file and read it with the
filegenerator, the whole thing is working (even with @query-string)!

I think there is something going wrong with namespace and attributes -
maybe they get one even if they are not allowed to .. 

or am I doing something wrong .. maybe someone can check / fix it 
thank you 


btw: the sitemap-parts

       <map:match pattern="find">
         <map:generate type="search">
           <map:parameter name="query" value="{request-param:query}"/>
         <!--<map:transform src="stylesheets/searchresult.xsl"/>-->
         <map:serialize type="xml"/>

        <map:match pattern="searchresult">
          <!--<map:generate src="cocoon://Search/find">-->
            <!--<map:parameter name="query" value="{request-param:query}"/>-->
          <map:generate type="file" src="context:/Search/documents/results.xml"/>
          <map:transform src="stylesheets/searchresult.xsl"/>
          <map:serialize type="html"/>

View raw message