You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2005/11/11 23:28:20 UTC

svn commit: r332656 - in /forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org: ./ resources/stylesheets/

Author: rgardler
Date: Fri Nov 11 14:27:56 2005
New Revision: 332656

URL: http://svn.apache.org/viewcvs?rev=332656&view=rev
Log:
use the locationmap (FOR-726)

Added:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/locationmap.xml   (with props)
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-common-to-forrest.xsl
      - copied unchanged from r332593, forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-common2forrest.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-impress-to-forrest.xsl
      - copied, changed from r332593, forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-impress2forrest.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-writer-to-forrest.xsl
      - copied, changed from r332593, forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-writer2forrest.xsl
Removed:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-common2forrest.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-impress2forrest.xsl
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-writer2forrest.xsl
Modified:
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/build.xml
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/input.xmap
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources.xmap
    forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/status.xml

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/build.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/build.xml?rev=332656&r1=332655&r2=332656&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/build.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/build.xml Fri Nov 11 14:27:56 2005
@@ -18,7 +18,7 @@
 <project default="docs" basedir="." name="Forrest plugin build file">
 
   <property name="plugin-name" value="org.apache.forrest.plugin.input.OpenOffice.org"/>
-  <property name="forrest.version" value="0.7"/>
+  <property name="forrest.version" value="0.8"/>
   <property name="type" value="input"/>
   <property name="plugin-version" value="0.1"/>
   <property name="description" value="Use various OpenOffice.org document formats as input sources."/>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/input.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/input.xmap?rev=332656&r1=332655&r2=332656&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/input.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/input.xmap Fri Nov 11 14:27:56 2005
@@ -26,14 +26,15 @@
   <map:resources>
     <map:resource name="file-resolver">
       <map:select type="exists">
-        <map:when test="{project:content.xdocs}{uri}.sxw">
+        <map:when test="{lm:project.{uri}.sxw}">
           <map:match type="regexp" pattern="^(.*?)([^/]*).xml$">
-            <map:generate src="resources/stylesheets/aggregates/openoffice.xml"/>
-            <map:transform src="resources/stylesheets/aggregates/openoffice-document.xsl">
-              <map:parameter name="src" value="{project:content.xdocs}{1}{2}.sxw"/>
+            <!-- FIXME: use the OOo generator as seen in the resume plugin -->
+            <map:generate src="{lm:OOo.bootstrap}"/>
+            <map:transform src="{lm:OOo.transform.xsl.aggregates/openoffice-document}">
+              <map:parameter name="src" value="{lm:project.{1}{2}.sxw}"/>
             </map:transform>
             <map:transform type="cinclude"/>
-            <map:transform src="resources/stylesheets/openoffice-writer2forrest.xsl">
+            <map:transform src="{lm:OOo.transform.openoffice-writer.forrest}">
               <map:parameter name="filename" value="{2}" />
               <map:parameter name="extension" value="sxw" />
             </map:transform>
@@ -41,14 +42,15 @@
           </map:match>
         </map:when>  
         
-        <map:when test="{project:content.xdocs}{uri}.sxi">
+        <map:when test="{lm:project.{uri}.sxi}">
           <map:match type="regexp" pattern="^(.*?)([^/]*).xml$">
-            <map:generate src="resources/stylesheets/aggregates/openoffice.xml"/>
-            <map:transform src="resources/stylesheets/aggregates/openoffice-document.xsl">
-              <map:parameter name="src" value="{project:content.xdocs}{1}{2}.sxi"/>
+            <!-- FIXME: use the OOo generator as seen in the resume plugin -->
+            <map:generate src="{lm:OOo.bootstrap}"/>
+            <map:transform src="{lm:OOo.transform.xsl.aggregates/openoffice-document}">
+              <map:parameter name="src" value="{lm:project.{1}{2}.sxi}"/>
             </map:transform>
             <map:transform type="cinclude"/>
-            <map:transform src="resources/stylesheets/openoffice-impress2forrest.xsl">
+            <map:transform src="{lm:OOo.transform.openoffice-impress.forrest}">
               <map:parameter name="filename" value="{2}" />
               <map:parameter name="extension" value="sxi" />
             </map:transform>

Added: forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/locationmap.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/locationmap.xml?rev=332656&view=auto
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/locationmap.xml (added)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/locationmap.xml Fri Nov 11 14:27:56 2005
@@ -0,0 +1,46 @@
+<?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>
+    <matchers default="lm">
+      <matcher 
+        name="lm" 
+        src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/>
+    </matchers>
+    <selectors default="exists">
+          <selector name="exists" logger="sitemap.selector.exists"  
+                    src="org.apache.forrest.sourceexists.SourceExistsSelector" />
+    </selectors>
+  </components>
+  
+  <locator>  
+    
+    <match pattern="OOo.transform.xsl.**">
+        <location src="resources/stylesheets/{1}.xsl" />
+    </match>
+    
+    <match pattern="OOo.transform.*.*">
+        <location src="resources/stylesheets/{1}-to-{2}.xsl" />
+    </match>
+    
+    <match pattern="OOo.bootstrap">
+      <location src="resources/stylesheets/aggregates/openoffice.xml"/>
+    </match>
+  </locator>
+</locationmap>

Propchange: forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/locationmap.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources.xmap?rev=332656&r1=332655&r2=332656&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources.xmap Fri Nov 11 14:27:56 2005
@@ -26,11 +26,11 @@
     <map:pipeline internal="true">
 
       <map:match pattern="openOfficeEmbeddedImage/zip-**/file-**.*">
-        <map:read src="jar:file:///{project:content.xdocs}{1}!/{2}.{3}" mime-type="image/{3}" />
+        <map:read src="jar:file:///{lm:project.{1}!/{2}.{3}}" mime-type="image/{3}" />
       </map:match>
       
       <map:match pattern="**/openOfficeEmbeddedImage/zip-**/file-**.*">
-        <map:read src="jar:file:///{project:content.xdocs}{1}/{2}!/{3}.{4}" mime-type="image/{4}" />
+        <map:read src="jar:file:///{lm:project.{1}/{2}!/{3}.{4}}" mime-type="image/{4}" />
       </map:match>
       
     </map:pipeline>

Copied: forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-impress-to-forrest.xsl (from r332593, forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-impress2forrest.xsl)
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-impress-to-forrest.xsl?p2=forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-impress-to-forrest.xsl&p1=forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-impress2forrest.xsl&r1=332593&r2=332656&rev=332656&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-impress2forrest.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-impress-to-forrest.xsl Fri Nov 11 14:27:56 2005
@@ -39,7 +39,7 @@
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
   exclude-result-prefixes="office meta  table number dc fo xlink chart math script xsl draw svg dr3d form config text style">
 
-  <xsl:import href="openoffice-common2forrest.xsl"/>
+  <xsl:import href="openoffice-common-to-forrest.xsl"/>
 
   <!--+
       | create the body 

Copied: forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-writer-to-forrest.xsl (from r332593, forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-writer2forrest.xsl)
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-writer-to-forrest.xsl?p2=forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-writer-to-forrest.xsl&p1=forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-writer2forrest.xsl&r1=332593&r2=332656&rev=332656&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-writer2forrest.xsl (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/resources/stylesheets/openoffice-writer-to-forrest.xsl Fri Nov 11 14:27:56 2005
@@ -18,7 +18,7 @@
 
 <xsl:stylesheet version="1.0" xmlns:style="http://openoffice.org/2000/style" xmlns:text="http://openoffice.org/2000/text" xmlns:office="http://openoffice.org/2000/office" xmlns:table="http://openoffice.org/2000/table" xmlns:draw="http://openoffice.org/2000/drawing" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="http://openoffice.org/2000/meta" xmlns:number="http://openoffice.org/2000/datastyle" xmlns:svg="http://www.w3.org/2000/svg" xmlns:chart="http://openoffice.org/2000/chart" xmlns:dr3d="http://openoffice.org/2000/dr3d" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="http://openoffice.org/2000/form" xmlns:script="http://openoffice.org/2000/script" xmlns:config="http://openoffice.org/2001/config" office:class="text" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="office meta  table number dc fo xlink chart math script xsl draw svg dr3d form
  config text style">
   
-  <xsl:import href="openoffice-common2forrest.xsl"/>
+  <xsl:import href="openoffice-common-to-forrest.xsl"/>
   
   <!-- ================================================================== -->
   <!-- The templates below match special styles created in a special 

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/status.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/status.xml?rev=332656&r1=332655&r2=332656&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/status.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.input.OpenOffice.org/status.xml Fri Nov 11 14:27:56 2005
@@ -31,6 +31,10 @@
 
   <changes>
     <release version="0.1" date="unreleased">
+      <action dev="RDG" type="update" context="code" importance="high">
+        Use locationmap to resolve resources. Exposes internal stylesheets via
+        {lm:OOo.transform.*.*}
+      </action>
       <action dev="RDG" type="update" context="code" 
         due-to="Charles Palmer" fixes-bug="FOR-262">
         Handle merged table cells.