You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by th...@apache.org on 2007/01/14 02:51:46 UTC
svn commit: r496015 -
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-add.ft
Author: thorsten
Date: Sat Jan 13 17:51:45 2007
New Revision: 496015
URL: http://svn.apache.org/viewvc?view=rev&rev=496015
Log:
Adding new contract that works in CLI mode and will allow you to
update a Solr server with the content of your website at the same time
you generate the site.
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-add.ft (with props)
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-add.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-add.ft?view=auto&rev=496015
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-add.ft (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-add.ft Sat Jan 13 17:51:45 2007
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<forrest:contract
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="solr-add">
+ <description>
+ <p> This is just a solr-add contract, it will output something but *nothing* in special. It should
+ just serve to explain a wee bit contracts and what you can do with them.
+ </p>
+ </description>
+ <usage><![CDATA[<forrest:contract name="solr-add">
+ <forrest:property name="request">#{$getRequest}</forrest:property>
+</forrest:contract>]]></usage>
+ <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="solr-add" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:param name="request" />
+ <xsl:param name="defaultVariables" select="'test.html'"/>
+ <xsl:variable name="root" select="$defaultVariables/*/*[@name='root']/@value"/>
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part xpath="/html/head">
+ <xsl:if test="not($request='linkmap') and not(contains($request,'solr.add.do'))">
+ <link href="{normalize-space($root)}{$request}.solr.add.do.html"/>
+ </xsl:if>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.solr/resources/themes/common/html/solr-add.ft
------------------------------------------------------------------------------
svn:eol-style = native