You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Kevin <fo...@kegcl.demon.co.uk> on 2005/09/04 00:49:11 UTC
Re: svn commit: r264872 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates:
content-source-xml-link.ft content-xml-link.ft export-link.vt.xml
On Sat, 2005-09-03 at 17:50 -0400, Tim Williams wrote:
> A couple questions on this one...
> o) export-link-vt.xml
> - why is the filename xml instead of ft?
org.apache.forrest.plugin.internal.view/resources/views/default.fv
Has the answer:
<!-- You can group elements to a template and call it from any view.
Kevin
> o) It appears that the sitemap entry that might make this work may
> have been committed to the resume plugin but not the views stuff?
>
> The second one appears to be causing FOR-662. I'll try to look more
> into the second one tonight -- a simple cut-n-paste across xmap
> entries from resume to views didn't work.
>
> --tim
>
> On 8/30/05, rgardler@apache.org <rg...@apache.org> wrote:
> > Author: rgardler
> > Date: Tue Aug 30 14:32:55 2005
> > New Revision: 264872
> >
> > URL: http://svn.apache.org/viewcvs?rev=264872&view=rev
> > Log:
> > Add a template to retrieve the source content from input plugins, use this in the export-link template
> >
> > Added:
> > forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-source-xml-link.ft
> > Modified:
> > forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-xml-link.ft
> > forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml
> >
> > Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-source-xml-link.ft
> > URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-source-xml-link.ft?rev=264872&view=auto
> > ==============================================================================
> > --- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-source-xml-link.ft (added)
> > +++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-source-xml-link.ft Tue Aug 30 14:32:55 2005
> > @@ -0,0 +1,42 @@
> > +<?xml version="1.0" encoding="UTF-8"?>
> > +<!--
> > + Copyright 2002-2005 The Apache Software Foundation or its licensors,
> > + as applicable.
> > +
> > + Licensed 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 name="content-source-xml-link" type="nugget"
> > + xmlns:forrest="http://apache.org/forrest/templates/1.0">
> > + <description>
> > + content-source-xml-link will output the XML link with image to the
> > + original source content of the document. Input plugins should provide
> > + the ability to retrieve the original source XML by making a request for
> > + *.source.xml, this contract provides a link to that file. If you want to
> > + provide a link to the XDoc format of the content use the
> > + content-xml-link template.
> > + </description>
> > + <usage><![CDATA[<forrest:contract name="content-source-xml-link"/>]]></usage>
> > + <forrest:template
> > + xmlns:forrest="http://apache.org/forrest/templates/1.0"
> > + format="xhtml" name="content-source-xml-link" inputFormat="xsl" body="true">
> > + <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > + <xsl:template name="content-source-xml-link-body">
> > + <a href="{$filename-noext}.source.xml" class="dida">
> > + <img class="skin" src="{$skin-img-dir}/xmldoc.gif" alt="Source XML - icon" />
> > + <span class="caption">Source XML</span>
> > + </a>
> > + </xsl:template>
> > +
> > + </xsl:stylesheet>
> > + </forrest:template>
> > +</forrest:contract>
> > \ No newline at end of file
> >
> > Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-xml-link.ft
> > URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-xml-link.ft?rev=264872&r1=264871&r2=264872&view=diff
> > ==============================================================================
> > --- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-xml-link.ft (original)
> > +++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/content-xml-link.ft Tue Aug 30 14:32:55 2005
> > @@ -18,7 +18,9 @@
> > <forrest:contract name="content-xml-link" type="nugget"
> > xmlns:forrest="http://apache.org/forrest/templates/1.0">
> > <description>
> > - content-xml-link will output the XML link with image to the content.
> > + content-xml-link will output an XML link with image to the content.
> > + This link will retrieve the content as an XDoc. If you want to
> > + retrieve the source use content-source-xml-link.ft.
> > </description>
> > <usage><![CDATA[<forrest:contract name="content-xml-link"/>]]></usage>
> > <forrest:template
> >
> > Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml
> > URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml?rev=264872&r1=264871&r2=264872&view=diff
> > ==============================================================================
> > --- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml (original)
> > +++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.viewHelper.xhtml/resources/templates/export-link.vt.xml Tue Aug 30 14:32:55 2005
> > @@ -18,7 +18,7 @@
> >
> > <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0" >
> > <forrest:hook name="export-link">
> > - <forrest:contract name="content-xml-link"/>
> > + <forrest:contract name="content-source-xml-link"/>
> > <forrest:contract name="content-pdf-link"/>
> > </forrest:hook>
> > </forrest:template>
> >
> >
> >