Author: andreas
Date: Sun Apr 13 02:12:55 2008
New Revision: 647544
URL: http://svn.apache.org/viewvc?rev=647544&view=rev
Log:
Enabling indexing for forrest resource type.
Modified:
lenya/sandbox/modules/forrest/xslt/forrest2index.xsl
Modified: lenya/sandbox/modules/forrest/xslt/forrest2index.xsl
URL: http://svn.apache.org/viewvc/lenya/sandbox/modules/forrest/xslt/forrest2index.xsl?rev=647544&r1=647543&r2=647544&view=diff
==============================================================================
--- lenya/sandbox/modules/forrest/xslt/forrest2index.xsl (original)
+++ lenya/sandbox/modules/forrest/xslt/forrest2index.xsl Sun Apr 13 02:12:55 2008
@@ -5,46 +5,19 @@
xmlns:lucene="http://apache.org/cocoon/lucene/1.0"
xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/"
->
-
-<xsl:param name="uri"/>
-
-<xsl:variable name="boost" select="number(/descendant-or-self::dc:rights)"/>
-
-<xsl:template match="/">
- <!-- attributes of the index and document element will be added by the lucene module -->
- <lucene:index>
- <lucene:document>
- <lucene:field name="url" boost="{$boost}"><xsl:value-of select="$uri"/></lucene:field>
- <xsl:apply-templates/>
- </lucene:document>
- </lucene:index>
-</xsl:template>
-
-<xsl:template match="dc:rights" priority="1"/>
-
-<xsl:template match="/*/*[namespace-uri() != 'http://apache.org/cocoon/lenya/metadata/1.0']" priority="1">
- <lucene:field name="body" boost="{$boost}">
- <xsl:for-each select=".//text()">
- <xsl:value-of select="concat(normalize-space(.),' ')"/>
- </xsl:for-each>
- </lucene:field>
-</xsl:template>
-
-<xsl:template match="dc:title" priority="1">
- <lucene:field name="title" boost="{$boost}"><xsl:value-of select="."/></lucene:field>
-</xsl:template>
-
-<xsl:template match="dc:description" priority="1">
- <lucene:field name="description" boost="{$boost}"><xsl:value-of select="."/></lucene:field>
-</xsl:template>
-
-<xsl:template match="dc:subject" priority="1">
- <lucene:field name="subject" boost="{$boost}"><xsl:value-of select="."/></lucene:field>
-</xsl:template>
-
-<xsl:template match="@*|node()" priority="-1">
- <xsl:apply-templates/>
-</xsl:template>
-
+ >
+
+ <xsl:template match="/">
+ <!-- attributes of the index and document element will be added by the lucene module -->
+ <lucene:index>
+ <lucene:document>
+ <lucene:field name="body" boost="1">
+ <xsl:for-each select=".//text()">
+ <xsl:value-of select="concat(normalize-space(.),' ')"/>
+ </xsl:for-each>
+ </lucene:field>
+ </lucene:document>
+ </lucene:index>
+ </xsl:template>
+
</xsl:stylesheet>
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.