Frederic Gaus wrote:

Hi all!

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


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="http://apache.org/cocoon/search/1.0";
xmlns:xlink="http://www.w3.org/1999/xlink";
xmlns="http://apache.org/cocoon/search/1.0"; date="1062755176496"
query-string="test" start-index="0" page-length="10">


...

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="http://www.w3.org/1999/XSL/Transform"; xmlns:result="http://apache.org/cocoon/search/1.0";>

<xsl:output method="html"/>

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

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



Try select="@result:query-string". Generator sends this attribute with the default namespace.


But it seems to me that there is a problem here. Why don't we specify prefix for the generator's namespace and have attributes in default namespace? This way will be much less confusion. Comments?

Vadim





Reply via email to