- Add contract for Exhibit v2
- only load exhibit in pages that need it
git-svn-id: https://svn.apache.org/repos/asf/forrest/trunk@594356 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/themes/common/html/doap-exhibit2.ft b/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/themes/common/html/doap-exhibit2.ft
new file mode 100644
index 0000000..65ce8c6
--- /dev/null
+++ b/whiteboard/plugins/org.apache.forrest.plugin.input.doap/resources/themes/common/html/doap-exhibit2.ft
@@ -0,0 +1,51 @@
+<?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="doap-exhibit2">
+ <description>
+ <p>
+ Embeds the necessary Exhibit v2 scripts to enable the DOAP
+ catalogue to be browsed using Exhibit from MIT.
+ </p>
+ </description>
+ <usage>
+ <![CDATA[<forrest:contract name="doap-exhibit2"/>]]>
+ </usage>
+ <forrest:template
+ xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ name="doap-exhibit2" inputFormat="xsl">
+ <xsl:stylesheet version="1.1"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:forrest="http://apache.org/forrest/templates/1.0">
+ <xsl:template match="/">
+ <forrest:content>
+ <forrest:part xpath="/html/head">
+ <link href="projectDetails/allProjects.json"
+ type="application/json" rel="exhibit/data" />
+ <script
+ src="http://static.simile.mit.edu/exhibit/api-2.0/exhibit-api.js"
+ type="text/javascript">
+ <!-- This empty statement is required due to a bug relating to empty script tags in Firefox -->;
+ </script>
+ </forrest:part>
+ </forrest:content>
+ </xsl:template>
+ </xsl:stylesheet>
+ </forrest:template>
+</forrest:contract>
diff --git a/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/exhibitTest.xml b/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/exhibitTest.xml
index 7bf553e..4f8f984 100644
--- a/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/exhibitTest.xml
+++ b/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/content/xdocs/exhibitTest.xml
@@ -1,47 +1,60 @@
<?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.
+ 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.
-->
<document xmlns:ex='http://http://simile.mit.edu/wiki/Exhibit'>
- <header>
- <title>Exhibit Sample</title>
- </header>
- <body>
- <section>
- <title>Exhibit Sample</title>
- <table>
- <tr>
- <td>
- <div id="exhibit-control-panel"></div>
- <div id="exhibit-view-panel">
- <div ex:role="exhibit-view"
- ex:viewClass="Exhibit.TileView"
- ex:showAll="true"
- ex:orders=".name, .homepage"
- ex:possibleOrders=".name, .homepage">
- <p>Loading Exhibit AJAX browser...</p>
- <p>For this to work you computer must be connected to the Internet.</p>
- </div>
- </div>
- </td>
- <td>
- <div id="exhibit-browse-panel" ex:facets=".Category"></div>
- </td>
- </tr>
- </table>
- </section>
- </body>
+ <header>
+ <title>Exhibit Sample</title>
+ </header>
+ <body>
+ <section>
+ <title>Exhibit Sample</title>
+ <table>
+ <tr valign="top">
+ <td>
+ <div ex:role="facet" ex:expression=".category"
+ ex:facetLabel="Category">
+ </div>
+ <div ex:role="facet" ex:expression=".person"
+ ex:facetLabel="Person">
+ </div>
+ <div ex:role="facet"
+ ex:expression=".programming-language"
+ ex:facetLabel="Programming Language">
+ </div>
+ </td>
+ <td>
+ <div ex:role="viewPanel">
+ <p>Loading Exhibit Browser...</p>
+ <p>
+ Note, you must be connected to the
+ Internet for this to work.
+ </p>
+ <div ex:role="exhibit-view"
+ ex:viewClass="Exhibit.TabularView"
+ ex:columns=".name, .homepage, .category"
+ ex:columnLabels="Name, Home Page, Categories"
+ ex:columnFormats="text, url, list" ex:sortColumn="0"
+ ex:sortAscending="true">
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+ </section>
+ </body>
</document>
\ No newline at end of file
diff --git a/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/structurer/url/exhibitTest.fv b/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/structurer/url/exhibitTest.fv
new file mode 100644
index 0000000..5610b7d
--- /dev/null
+++ b/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/structurer/url/exhibitTest.fv
@@ -0,0 +1,40 @@
+<?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:views xmlns:forrest="http://apache.org/forrest/templates/1.0"
+ xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+<!-- The following variables are used to contact data models and/or contracts. -->
+ <jx:set var="contextPath" value="#{$cocoon/parameters/contextPath}"/>
+ <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
+ <jx:set var="getRequestExtension" value="#{$cocoon/parameters/getRequestExtension}" />
+ <forrest:view type="fo" hooksXpath="/">
+ <jx:import uri="cocoon://prepare.panels.common-fo"/>
+ </forrest:view>
+<!-- CSS View of the request e.g. index.dispatcher.css -->
+ <forrest:view type="css" hooksXpath="/">
+ <jx:import uri="cocoon://prepare.panels.pelt-css"/>
+ </forrest:view>
+ <forrest:view type="html" hooksXpath="/html/body">
+ <forrest:contract name="doap-exhibit2"/>
+ <forrest:contract name="doap-embedded">
+ <forrest:property name="doap-embedded-links">
+ <doap url="/projectDetails/source.xml"/>
+ </forrest:property>
+ </forrest:contract>
+ <jx:import uri="cocoon://prepare.panels.pelt-html"/>
+ </forrest:view>
+</forrest:views>
diff --git a/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/themes/pelt.fv b/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/themes/pelt.fv
index 5a47faf..5e9e946 100644
--- a/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/themes/pelt.fv
+++ b/whiteboard/plugins/org.apache.forrest.plugin.input.doap/src/documentation/resources/themes/pelt.fv
@@ -29,7 +29,6 @@
<jx:import uri="cocoon://prepare.panels.pelt-css"/>
</forrest:view>
<forrest:view type="html" hooksXpath="/html/body">
- <forrest:contract name="doap-exhibit"/>
<forrest:contract name="doap-embedded">
<forrest:property name="doap-embedded-links">
<doap url="/projectDetails/source.xml"/>
diff --git a/whiteboard/plugins/org.apache.forrest.plugin.input.doap/status.xml b/whiteboard/plugins/org.apache.forrest.plugin.input.doap/status.xml
index f99c819..06cb387 100644
--- a/whiteboard/plugins/org.apache.forrest.plugin.input.doap/status.xml
+++ b/whiteboard/plugins/org.apache.forrest.plugin.input.doap/status.xml
@@ -36,6 +36,9 @@
<!-- Add new releases here -->
<release version="0.1" date="not-released">
<action dev="RDG" type="add" context="code" importance="low">
+ Support for Exhibit 2.0
+ </action>
+ <action dev="RDG" type="add" context="code" importance="low">
Support things like <doap:mainatiner rdf:resource="http://foo.com/bar.rdf"/>
</action>
<action dev="RDG" type="add" context="code">