forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmcdon...@apache.org
Subject svn commit: r700294 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/reference-links.ft
Date Mon, 29 Sep 2008 22:40:30 GMT
Author: gmcdonald
Date: Mon Sep 29 15:40:30 2008
New Revision: 700294

URL: http://svn.apache.org/viewvc?rev=700294&view=rev
Log:
Add references contract, due to Pablo Barrera , fix for FOR-1116

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/reference-links.ft
  (with props)

Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/reference-links.ft
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/reference-links.ft?rev=700294&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/reference-links.ft
(added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/reference-links.ft
Mon Sep 29 15:40:30 2008
@@ -0,0 +1,57 @@
+<?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="reference-links">
+  <description>
+    reference-links - Template will output all document links sorted by name.
+  </description>
+  <usage>
+<![CDATA[<forrest:contract name="reference-links"
+            dataURI="cocoon://#{$getRequest}.source.rewritten.xml"/>]]>
+  </usage>
+  <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0" name="reference-links"
inputFormat="xsl">
+    <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+      <xsl:key name="references" match="*" use="concat(name(), '::', .)" />
+      <xsl:template match="/">
+        <forrest:content>
+          <forrest:part>
+          <h2>References</h2>
+            <ul>
+            <xsl:comment>+ |start reference-links +</xsl:comment>
+              <xsl:for-each select="//link[generate-id(.) =
+              generate-id(key('references', concat(name(), '::', .))[1])]">
+                <xsl:sort select="."/>
+                  <li>
+                    <a>
+                      <xsl:attribute name="href">
+                        <xsl:value-of select="@href"/>
+                      </xsl:attribute>
+                      <xsl:value-of select="."/>
+                    </a>
+                  </li>
+                </xsl:for-each>
+              </ul>
+            <xsl:comment>+ |end reference-links +</xsl:comment>
+          </forrest:part>
+        </forrest:content>
+      </xsl:template>
+    </xsl:stylesheet>
+  </forrest:template>
+</forrest:contract>

Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.themes.core/themes/common/html/reference-links.ft
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message