You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by tw...@apache.org on 2005/10/14 20:53:42 UTC

svn commit: r321175 - in /forrest/trunk/main: targets/plugins.xml var/initial_plugins_locationmap.xml var/pluginLmMountSnippet.xsl webapp/locationmap.xml

Author: twilliams
Date: Fri Oct 14 11:53:31 2005
New Revision: 321175

URL: http://svn.apache.org/viewcvs?rev=321175&view=rev
Log:
Plugin locationmap mounting capability.

Added:
    forrest/trunk/main/var/initial_plugins_locationmap.xml   (with props)
    forrest/trunk/main/var/pluginLmMountSnippet.xsl   (with props)
Modified:
    forrest/trunk/main/targets/plugins.xml
    forrest/trunk/main/webapp/locationmap.xml

Modified: forrest/trunk/main/targets/plugins.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/targets/plugins.xml?rev=321175&r1=321174&r2=321175&view=diff
==============================================================================
--- forrest/trunk/main/targets/plugins.xml (original)
+++ forrest/trunk/main/targets/plugins.xml Fri Oct 14 11:53:31 2005
@@ -173,6 +173,9 @@
             </antcall>
           </then>
         </if>
+        <antcall target="configure-plugin-locationmap">
+          <param name="plugin" value="${versioned.name}"/>
+        </antcall>
       </then>
       <else>
         <if>
@@ -199,6 +202,9 @@
             </antcall>
           </then>
         </if>
+        <antcall target="configure-plugin-locationmap">
+          <param name="plugin" value="{plugin.name}"/>
+        </antcall>
       </else>
     </if>
   </target>
@@ -256,6 +262,20 @@
      <move file="${project.temp-dir}/internal.xmap.new" 
        tofile="${project.temp-dir}/internal.xmap"/>
   </target>
+  
+  <target name="configure-plugin-locationmap">
+     <!-- add the snippet to plugins/locationmap.xml that will mount the plugin
+          specific locationmap -->
+     <echo>Mounting plugin locationmap for ${plugin}</echo>
+     <xslt in="${project.temp-dir}/locationmap.xml"
+       out="${project.temp-dir}/locationmap.xml.new"
+       style="${forrest.core}/var/pluginLmMountSnippet.xsl"
+       force="true">
+           <param name="plugin-name" expression="${plugin}"/>  
+     </xslt>
+     <move file="${project.temp-dir}/locationmap.xml.new" 
+       tofile="${project.temp-dir}/locationmap.xml"/>
+  </target>
 
   <target name="fetch-plugins-descriptors" if="plugin.unavailable" depends="init-proxy">
     <delete>
@@ -343,6 +363,9 @@
       overwrite="true"/>
     <copy file="${forrest.core}/var/initial_plugins_sitemap.xmap"
       tofile="${project.temp-dir}/internal.xmap"
+      overwrite="true"/>
+    <copy file="${forrest.core}/var/initial_plugins_locationmap.xml"
+          tofile="${project.temp-dir}/locationmap.xml"
       overwrite="true"/>
 
       <for list="${project.required.plugins}" param="name">

Added: forrest/trunk/main/var/initial_plugins_locationmap.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/var/initial_plugins_locationmap.xml?rev=321175&view=auto
==============================================================================
--- forrest/trunk/main/var/initial_plugins_locationmap.xml (added)
+++ forrest/trunk/main/var/initial_plugins_locationmap.xml Fri Oct 14 11:53:31 2005
@@ -0,0 +1,30 @@
+<?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.
+-->
+<locationmap 
+  xmlns="http://apache.org/forrest/locationmap/1.0">
+  <components>
+    <selectors default="exists">
+      <selector name="exists" logger="sitemap.selector.exists"  
+          src="org.apache.forrest.sourceexists.SourceExistsSelector" />
+    </selectors>
+  </components>
+
+  <locator>
+
+  </locator>
+</locationmap>

Propchange: forrest/trunk/main/var/initial_plugins_locationmap.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: forrest/trunk/main/var/pluginLmMountSnippet.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/var/pluginLmMountSnippet.xsl?rev=321175&view=auto
==============================================================================
--- forrest/trunk/main/var/pluginLmMountSnippet.xsl (added)
+++ forrest/trunk/main/var/pluginLmMountSnippet.xsl Fri Oct 14 11:53:31 2005
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+  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.
+-->
+<xsl:stylesheet version="1.0" 
+  xmlns="http://apache.org/forrest/locationmap/1.0"
+  xmlns:lm="http://apache.org/forrest/locationmap/1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  
+
+   <xsl:output method="xml" indent="yes" />
+   
+   <xsl:param name="plugin-name"/>
+   
+   
+   <xsl:template match="lm:locationmap">
+    <locationmap>
+      <xsl:apply-templates/>
+    </locationmap>
+   </xsl:template>
+   
+
+
+   <xsl:template match="lm:locator">
+     <locator>
+       <xsl:apply-templates/>
+       <xsl:element name="select">
+           <xsl:element name="mount">
+             <xsl:attribute name="src">{forrest:plugins}/<xsl:value-of select="$plugin-name"/>/src/documentation/content/locationmap.xml</xsl:attribute> 
+           </xsl:element>
+       </xsl:element>
+     </locator>
+    </xsl:template>
+    
+
+  <xsl:template match="@*|*|text()|processing-instruction()|comment()">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
+    </xsl:copy>
+  </xsl:template>
+  
+</xsl:stylesheet>
+

Propchange: forrest/trunk/main/var/pluginLmMountSnippet.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: forrest/trunk/main/webapp/locationmap.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/locationmap.xml?rev=321175&r1=321174&r2=321175&view=diff
==============================================================================
--- forrest/trunk/main/webapp/locationmap.xml (original)
+++ forrest/trunk/main/webapp/locationmap.xml Fri Oct 14 11:53:31 2005
@@ -41,6 +41,13 @@
     </select>
     
     <!-- ================================== -->
+    <!-- Mount project specific locationmap -->
+    <!-- ================================== -->
+    <select>
+      <mount src="{project:temp-dir}/locationmap.xml"/>
+    </select>
+    
+    <!-- ================================== -->
     <!-- Mount forrest locationmaps         -->
     <!-- ================================== -->
     <select>



Re: svn commit: r321175 - in /forrest/trunk/main: targets/plugins.xml var/initial_plugins_locationmap.xml var/pluginLmMountSnippet.xsl webapp/locationmap.xml

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
> I'd be very appreciative is someone can help out with the namespace
> troubles in the pluginLmMountSnippet.xsl.

Tim, just pinging you to let you know I have this on my radar, but am 
not finding time to look into it at the moment. Your request has not 
been lost.

Ross

Re: svn commit: r321175 - in /forrest/trunk/main: targets/plugins.xml var/initial_plugins_locationmap.xml var/pluginLmMountSnippet.xsl webapp/locationmap.xml

Posted by Tim Williams <wi...@gmail.com>.
I'd be very appreciative is someone can help out with the namespace
troubles in the pluginLmMountSnippet.xsl.  I'm once again humbled by
some simple xslt.  Apply this snippet to the
initial_plugins_locationmap.xml and there should be a mount statement.
 If I remove the namespace from the source file and (obviously) my
duplicate namespaces from the xslt it works.
--tim

On 10/14/05, twilliams@apache.org <tw...@apache.org> wrote:
> Author: twilliams
> Date: Fri Oct 14 11:53:31 2005
> New Revision: 321175
>
> URL: http://svn.apache.org/viewcvs?rev=321175&view=rev
> Log:
> Plugin locationmap mounting capability.
>
> Added:
>     forrest/trunk/main/var/initial_plugins_locationmap.xml   (with props)
>     forrest/trunk/main/var/pluginLmMountSnippet.xsl   (with props)
> Modified:
>     forrest/trunk/main/targets/plugins.xml
>     forrest/trunk/main/webapp/locationmap.xml
>
> Modified: forrest/trunk/main/targets/plugins.xml
> URL: http://svn.apache.org/viewcvs/forrest/trunk/main/targets/plugins.xml?rev=321175&r1=321174&r2=321175&view=diff
> ==============================================================================
> --- forrest/trunk/main/targets/plugins.xml (original)
> +++ forrest/trunk/main/targets/plugins.xml Fri Oct 14 11:53:31 2005
> @@ -173,6 +173,9 @@
>              </antcall>
>            </then>
>          </if>
> +        <antcall target="configure-plugin-locationmap">
> +          <param name="plugin" value="${versioned.name}"/>
> +        </antcall>
>        </then>
>        <else>
>          <if>
> @@ -199,6 +202,9 @@
>              </antcall>
>            </then>
>          </if>
> +        <antcall target="configure-plugin-locationmap">
> +          <param name="plugin" value="{plugin.name}"/>
> +        </antcall>
>        </else>
>      </if>
>    </target>
> @@ -256,6 +262,20 @@
>       <move file="${project.temp-dir}/internal.xmap.new"
>         tofile="${project.temp-dir}/internal.xmap"/>
>    </target>
> +
> +  <target name="configure-plugin-locationmap">
> +     <!-- add the snippet to plugins/locationmap.xml that will mount the plugin
> +          specific locationmap -->
> +     <echo>Mounting plugin locationmap for ${plugin}</echo>
> +     <xslt in="${project.temp-dir}/locationmap.xml"
> +       out="${project.temp-dir}/locationmap.xml.new"
> +       style="${forrest.core}/var/pluginLmMountSnippet.xsl"
> +       force="true">
> +           <param name="plugin-name" expression="${plugin}"/>
> +     </xslt>
> +     <move file="${project.temp-dir}/locationmap.xml.new"
> +       tofile="${project.temp-dir}/locationmap.xml"/>
> +  </target>
>
>    <target name="fetch-plugins-descriptors" if="plugin.unavailable" depends="init-proxy">
>      <delete>
> @@ -343,6 +363,9 @@
>        overwrite="true"/>
>      <copy file="${forrest.core}/var/initial_plugins_sitemap.xmap"
>        tofile="${project.temp-dir}/internal.xmap"
> +      overwrite="true"/>
> +    <copy file="${forrest.core}/var/initial_plugins_locationmap.xml"
> +          tofile="${project.temp-dir}/locationmap.xml"
>        overwrite="true"/>
>
>        <for list="${project.required.plugins}" param="name">
>
> Added: forrest/trunk/main/var/initial_plugins_locationmap.xml
> URL: http://svn.apache.org/viewcvs/forrest/trunk/main/var/initial_plugins_locationmap.xml?rev=321175&view=auto
> ==============================================================================
> --- forrest/trunk/main/var/initial_plugins_locationmap.xml (added)
> +++ forrest/trunk/main/var/initial_plugins_locationmap.xml Fri Oct 14 11:53:31 2005
> @@ -0,0 +1,30 @@
> +<?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.
> +-->
> +<locationmap
> +  xmlns="http://apache.org/forrest/locationmap/1.0">
> +  <components>
> +    <selectors default="exists">
> +      <selector name="exists" logger="sitemap.selector.exists"
> +          src="org.apache.forrest.sourceexists.SourceExistsSelector" />
> +    </selectors>
> +  </components>
> +
> +  <locator>
> +
> +  </locator>
> +</locationmap>
>
> Propchange: forrest/trunk/main/var/initial_plugins_locationmap.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Added: forrest/trunk/main/var/pluginLmMountSnippet.xsl
> URL: http://svn.apache.org/viewcvs/forrest/trunk/main/var/pluginLmMountSnippet.xsl?rev=321175&view=auto
> ==============================================================================
> --- forrest/trunk/main/var/pluginLmMountSnippet.xsl (added)
> +++ forrest/trunk/main/var/pluginLmMountSnippet.xsl Fri Oct 14 11:53:31 2005
> @@ -0,0 +1,56 @@
> +<?xml version="1.0"?>
> +<!--
> +  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.
> +-->
> +<xsl:stylesheet version="1.0"
> +  xmlns="http://apache.org/forrest/locationmap/1.0"
> +  xmlns:lm="http://apache.org/forrest/locationmap/1.0"
> +  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> +
> +
> +   <xsl:output method="xml" indent="yes" />
> +
> +   <xsl:param name="plugin-name"/>
> +
> +
> +   <xsl:template match="lm:locationmap">
> +    <locationmap>
> +      <xsl:apply-templates/>
> +    </locationmap>
> +   </xsl:template>
> +
> +
> +
> +   <xsl:template match="lm:locator">
> +     <locator>
> +       <xsl:apply-templates/>
> +       <xsl:element name="select">
> +           <xsl:element name="mount">
> +             <xsl:attribute name="src">{forrest:plugins}/<xsl:value-of select="$plugin-name"/>/src/documentation/content/locationmap.xml</xsl:attribute>
> +           </xsl:element>
> +       </xsl:element>
> +     </locator>
> +    </xsl:template>
> +
> +
> +  <xsl:template match="@*|*|text()|processing-instruction()|comment()">
> +    <xsl:copy>
> +      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
> +    </xsl:copy>
> +  </xsl:template>
> +
> +</xsl:stylesheet>
> +
>
> Propchange: forrest/trunk/main/var/pluginLmMountSnippet.xsl
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
> Modified: forrest/trunk/main/webapp/locationmap.xml
> URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/locationmap.xml?rev=321175&r1=321174&r2=321175&view=diff
> ==============================================================================
> --- forrest/trunk/main/webapp/locationmap.xml (original)
> +++ forrest/trunk/main/webapp/locationmap.xml Fri Oct 14 11:53:31 2005
> @@ -41,6 +41,13 @@
>      </select>
>
>      <!-- ================================== -->
> +    <!-- Mount project specific locationmap -->
> +    <!-- ================================== -->
> +    <select>
> +      <mount src="{project:temp-dir}/locationmap.xml"/>
> +    </select>
> +
> +    <!-- ================================== -->
>      <!-- Mount forrest locationmaps         -->
>      <!-- ================================== -->
>      <select>
>
>
>