You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ed...@apache.org on 2005/11/09 18:35:47 UTC

svn commit: r332085 - in /lenya/branches/BRANCH_1_2_X/src: java/org/apache/lenya/cms/cocoon/components/modules/input/ webapp/WEB-INF/ webapp/lenya/ webapp/lenya/pubs/default/ webapp/lenya/pubs/default/config/

Author: edith
Date: Wed Nov  9 09:35:30 2005
New Revision: 332085

URL: http://svn.apache.org/viewcvs?rev=332085&view=rev
Log:
Get the content path with help of the new PublicationContentDirModule in all default's sitemaps

Modified:
    lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationContentDirModule.java
    lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/cocoon-xconf.xsl
    lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf
    lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap
    lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap
    lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap
    lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap

Modified: lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationContentDirModule.java
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationContentDirModule.java?rev=332085&r1=332084&r2=332085&view=diff
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationContentDirModule.java (original)
+++ lenya/branches/BRANCH_1_2_X/src/java/org/apache/lenya/cms/cocoon/components/modules/input/PublicationContentDirModule.java Wed Nov  9 09:35:30 2005
@@ -27,9 +27,11 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.cocoon.components.modules.input.AbstractInputModule;
-import org.apache.excalibur.source.Source;
-import org.apache.excalibur.source.SourceNotFoundException;
+import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.excalibur.source.SourceResolver;
+import org.apache.lenya.cms.publication.Publication;
+import org.apache.lenya.cms.publication.PublicationException;
+import org.apache.lenya.cms.publication.PublicationFactory;
 
 /**
  * Gets the content directory of a specific publication and specific area
@@ -42,25 +44,26 @@
     public Object getAttribute(String name, Configuration modeConf, Map objectModel)
         throws ConfigurationException {
 
-        String resourceURI = name;
-        
-        Source source = null;
-        boolean exists = false;
-        try {
-            source = resolver.resolveURI(resourceURI);
-            exists = source.exists();
-        } catch (SourceNotFoundException e) {
-            exists = false;
-        } catch (Exception e) {
-            getLogger().warn("Exception resolving resource [" + resourceURI + "]", e);
-            exists = false;
-        } finally {
-            if (source != null) {
-                resolver.release(source);
-            }
+    	if (getLogger().isDebugEnabled()) {
+            getLogger().debug("Resolving directory path for [" + name + "]");
         }
-
-        return Boolean.toString(exists);
+    	String[] pubidAndArea = name.split(",");
+        if (pubidAndArea.length < 2) {
+            throw new ConfigurationException("Invalid number of parameters: " + pubidAndArea.length
+                    + ". Expected pub, area.");
+        }
+           
+        String id = pubidAndArea[0];
+        String area = pubidAndArea[1];
+    	String contextPath = ObjectModelHelper.getContext(objectModel).getRealPath("");
+    	
+    	try {
+			Publication pub = PublicationFactory.getPublication(id, contextPath);
+			return pub.getContentDirectory(area);
+		} catch (PublicationException e) {
+            throw new ConfigurationException("Obtaining value for [" + name + "] failed: ", e);
+		}
+    	
     }
 
     /* (non-Javadoc)

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/cocoon-xconf.xsl
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/cocoon-xconf.xsl?rev=332085&r1=332084&r2=332085&view=diff
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/cocoon-xconf.xsl (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/WEB-INF/cocoon-xconf.xsl Wed Nov  9 09:35:30 2005
@@ -104,8 +104,12 @@
       <format>yyyy-M-dd HH:mm:ss Z</format>
     </component-instance>
     
-  <component-instance name="proxy-url" logger="sitemap.modules.input.proxy-url"
+    <component-instance name="proxy-url" logger="sitemap.modules.input.proxy-url"
       class="org.apache.lenya.cms.cocoon.components.modules.input.ProxyUrlModule"/>
+
+    <component-instance logger="core.modules.input.content-dir" name="content-dir"
+      class="org.apache.lenya.cms.cocoon.components.modules.input.PublicationContentDirModule">
+    </component-instance>
 
   </xsl:copy>
 </xsl:template>

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf?rev=332085&r1=332084&r2=332085&view=diff
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf Wed Nov  9 09:35:30 2005
@@ -27,11 +27,9 @@
   <breadcrumb-prefix/>
 
   <!-- NOTE: The configuration of content directories has NOT been fully tested yet and might lead to unexpected results. Use at own risk;-) -->
-  <content-authoring-dir>content/authoring</content-authoring-dir>
-  <!--
-  <content-authoring-dir>/home/USERNAME/data/lenya/author</content-authoring-dir>
-  -->
-  <content-live-dir>content/live</content-live-dir>
+
+  <content-dir area="autoring">/home/edith/data/authoring</content-dir>
+  <content-dir area="live">/home/edith/blabla/live</content-dir>
   
   <!-- 
        For information about these settings, read 

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap?rev=332085&r1=332084&r2=332085&view=diff
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap Wed Nov  9 09:35:30 2005
@@ -47,7 +47,7 @@
       <!-- parametrized doctype matcher -->
       <!-- pattern="{rendertype}/{area}/{doctype}/{document-path}" -->
       <map:match pattern="*/*/*/**.xml">
-        <map:generate src="content/{2}/{4}.xml"/>
+        <map:generate src="{content-dir:{page-envelope:publication-id},{2}}/{4}.xml"/>
         <map:transform src="xslt/{3}2xhtml.xsl">
           <map:parameter name="rendertype" value="{1}"/>
           <map:parameter name="nodeid" value="{page-envelope:document-node-id}"/>

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap?rev=332085&r1=332084&r2=332085&view=diff
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap Wed Nov  9 09:35:30 2005
@@ -56,7 +56,7 @@
     <map:pipeline>
       <!-- {area}/{uri} -->
       <map:match pattern="*/**.html">
-	<map:act type="sourcetype" src="content/{1}/{page-envelope:document-path}">
+	<map:act type="sourcetype" src="{content-dir:{page-envelope:publication-id},{1}}/{page-envelope:document-path}">
 	  <map:generate type="serverpages" src="../../config/parameters/default.xsp">
 	    <map:parameter name="value" value="{sourcetype}"/>
 	  </map:generate>
@@ -68,7 +68,7 @@
     <map:pipeline>
       <!-- {area}/{uri} -->
       <map:match pattern="*/**.xml">
-	<map:act type="sourcetype" src="content/{1}/{2}.xml">
+	<map:act type="sourcetype" src="{content-dir:{page-envelope:publication-id},{1}}/{2}.xml">
 	  <map:generate type="serverpages" src="../../config/parameters/default.xsp">
 	    <map:parameter name="value" value="{sourcetype}"/>
 	  </map:generate>

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap?rev=332085&r1=332084&r2=332085&view=diff
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap Wed Nov  9 09:35:30 2005
@@ -228,7 +228,7 @@
           </map:when>
 
           <map:otherwise> <!-- GET -->
-            <map:generate src="content/authoring/{page-envelope:document-path}"/>
+            <map:generate src="{content-dir:{page-envelope:publication-id},{page-envelope:area}}/{page-envelope:document-path}"/>
             <map:transform src="../../xslt/bxeng/change-object-path.xsl">
               <map:parameter name="documentid" value="{page-envelope:document-id}"/>
             </map:transform>

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap?rev=332085&r1=332084&r2=332085&view=diff
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap Wed Nov  9 09:35:30 2005
@@ -389,11 +389,7 @@
         
                   <map:generate type="stream"/>
                   <map:transform src="xslt/authoring/edit/addSourceTags.xsl">
-                    <map:parameter name="source" value="pubs/{1}/content/{2}/{page-envelope:document-path}"/>
-<!-- TODO: Get content-dir from config/publication.xconf -->
-<!--
                     <map:parameter name="source" value="{content-dir:{1},{2}}/{page-envelope:document-path}"/>
--->
                     <!--<map:parameter name="source" value="pubs/{1}/test-xopus.xml"/>-->
                   </map:transform>
                   <map:transform type="write-source">
@@ -413,7 +409,7 @@
                     <map:parameter name="Cache-Control" value="pre-check=0" />
                     <map:parameter name="Expires" value="-1" />
                   </map:act>
-                  <map:generate src="pubs/{1}/content/{2}/{page-envelope:document-path}"/>
+                  <map:generate src="{content-dir:{1},{2}}/{page-envelope:document-path}"/>
                   <map:serialize type="xml"/>
                 </map:otherwise>
               </map:select>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org


Re: svn commit: r332085 - in /lenya/branches/BRANCH_1_2_X/src: java/org/apache/lenya/cms/cocoon/components/modules/input/ webapp/WEB-INF/ webapp/lenya/ webapp/lenya/pubs/default/ webapp/lenya/pubs/default/config/

Posted by Felix Röthenbacher <fe...@wyona.com>.

Josias Thoeny wrote:
> On Wed, 2005-11-09 at 17:35 +0000, edith@apache.org wrote:
> [...]
> 
>>Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf
>>URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf?rev=332085&r1=332084&r2=332085&view=diff
>>==============================================================================
>>--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf (original)
>>+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf Wed Nov  9 09:35:30 2005
>>@@ -27,11 +27,9 @@
>>   <breadcrumb-prefix/>
>> 
>>   <!-- NOTE: The configuration of content directories has NOT been fully tested yet and might lead to unexpected results. Use at own risk;-) -->
>>-  <content-authoring-dir>content/authoring</content-authoring-dir>
>>-  <!--
>>-  <content-authoring-dir>/home/USERNAME/data/lenya/author</content-authoring-dir>
>>-  -->
>>-  <content-live-dir>content/live</content-live-dir>
>>+
>>+  <content-dir area="autoring">/home/edith/data/authoring</content-dir>
>>+  <content-dir area="live">/home/edith/blabla/live</content-dir>
> 
> 
> Does that mean that this file has to be edited manually to set the
> correct content path when someone installs Lenya?
> Or how does it work if I just want to use the "normal" relative content
> path?

It seems that Edith keeps her data at /home/edith/data/authoring ;-)

- Felix

> 
> - Josias
> 
> 
-- 
Felix Röthenbacher                  felix.roethenbacher@wyona.com
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r332085 - in /lenya/branches/BRANCH_1_2_X/src: java/org/apache/lenya/cms/cocoon/components/modules/input/ webapp/WEB-INF/ webapp/lenya/ webapp/lenya/pubs/default/ webapp/lenya/pubs/default/config/

Posted by Edith Chevrier <ed...@wyona.com>.
Michael Wechner wrote:

> Josias Thoeny wrote:
>
>> On Wed, 2005-11-09 at 17:35 +0000, edith@apache.org wrote:
>> [...]
>>  
>>
>>> Modified: 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf 
>>>
>>> URL: 
>>> http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf?rev=332085&r1=332084&r2=332085&view=diff 
>>>
>>> ============================================================================== 
>>>
>>> --- 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf 
>>> (original)
>>> +++ 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf 
>>> Wed Nov  9 09:35:30 2005
>>> @@ -27,11 +27,9 @@
>>>   <breadcrumb-prefix/>
>>>
>>>   <!-- NOTE: The configuration of content directories has NOT been 
>>> fully tested yet and might lead to unexpected results. Use at own 
>>> risk;-) -->
>>> -  <content-authoring-dir>content/authoring</content-authoring-dir>
>>> -  <!--
>>> -  
>>> <content-authoring-dir>/home/USERNAME/data/lenya/author</content-authoring-dir> 
>>>
>>> -  -->
>>> -  <content-live-dir>content/live</content-live-dir>
>>> +
>>> +  <content-dir 
>>> area="autoring">/home/edith/data/authoring</content-dir>
>>> +  <content-dir area="live">/home/edith/blabla/live</content-dir>
>>>   
>>
>>
>> Does that mean that this file has to be edited manually to set the
>> correct content path when someone installs Lenya?
>>  
>>
>
> no, I think edith accidentally checked in her private settings
>
>> Or how does it work if I just want to use the "normal" relative content
>> path?
>>  
>>
>
> I have fixed it.
>
Thanks for fixing it.

Edith

> Michi
>
>> - Josias
>>
>>  
>>
>>>     <!--        For information about these settings, read
>>> Modified: 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap
>>> URL: 
>>> http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap?rev=332085&r1=332084&r2=332085&view=diff 
>>>
>>> ============================================================================== 
>>>
>>> --- 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap 
>>> (original)
>>> +++ 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap 
>>> Wed Nov  9 09:35:30 2005
>>> @@ -47,7 +47,7 @@
>>>       <!-- parametrized doctype matcher -->
>>>       <!-- pattern="{rendertype}/{area}/{doctype}/{document-path}" -->
>>>       <map:match pattern="*/*/*/**.xml">
>>> -        <map:generate src="content/{2}/{4}.xml"/>
>>> +        <map:generate 
>>> src="{content-dir:{page-envelope:publication-id},{2}}/{4}.xml"/>
>>>         <map:transform src="xslt/{3}2xhtml.xsl">
>>>           <map:parameter name="rendertype" value="{1}"/>
>>>           <map:parameter name="nodeid" 
>>> value="{page-envelope:document-node-id}"/>
>>>
>>> Modified: 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap 
>>>
>>> URL: 
>>> http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap?rev=332085&r1=332084&r2=332085&view=diff 
>>>
>>> ============================================================================== 
>>>
>>> --- 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap 
>>> (original)
>>> +++ 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap 
>>> Wed Nov  9 09:35:30 2005
>>> @@ -56,7 +56,7 @@
>>>     <map:pipeline>
>>>       <!-- {area}/{uri} -->
>>>       <map:match pattern="*/**.html">
>>> -    <map:act type="sourcetype" 
>>> src="content/{1}/{page-envelope:document-path}">
>>> +    <map:act type="sourcetype" 
>>> src="{content-dir:{page-envelope:publication-id},{1}}/{page-envelope:document-path}"> 
>>>
>>>       <map:generate type="serverpages" 
>>> src="../../config/parameters/default.xsp">
>>>         <map:parameter name="value" value="{sourcetype}"/>
>>>       </map:generate>
>>> @@ -68,7 +68,7 @@
>>>     <map:pipeline>
>>>       <!-- {area}/{uri} -->
>>>       <map:match pattern="*/**.xml">
>>> -    <map:act type="sourcetype" src="content/{1}/{2}.xml">
>>> +    <map:act type="sourcetype" 
>>> src="{content-dir:{page-envelope:publication-id},{1}}/{2}.xml">
>>>       <map:generate type="serverpages" 
>>> src="../../config/parameters/default.xsp">
>>>         <map:parameter name="value" value="{sourcetype}"/>
>>>       </map:generate>
>>>
>>> Modified: 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap 
>>>
>>> URL: 
>>> http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap?rev=332085&r1=332084&r2=332085&view=diff 
>>>
>>> ============================================================================== 
>>>
>>> --- 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap 
>>> (original)
>>> +++ 
>>> lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap 
>>> Wed Nov  9 09:35:30 2005
>>> @@ -228,7 +228,7 @@
>>>           </map:when>
>>>
>>>           <map:otherwise> <!-- GET -->
>>> -            <map:generate 
>>> src="content/authoring/{page-envelope:document-path}"/>
>>> +            <map:generate 
>>> src="{content-dir:{page-envelope:publication-id},{page-envelope:area}}/{page-envelope:document-path}"/> 
>>>
>>>             <map:transform 
>>> src="../../xslt/bxeng/change-object-path.xsl">
>>>               <map:parameter name="documentid" 
>>> value="{page-envelope:document-id}"/>
>>>             </map:transform>
>>>
>>> Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap
>>> URL: 
>>> http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap?rev=332085&r1=332084&r2=332085&view=diff 
>>>
>>> ============================================================================== 
>>>
>>> --- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap 
>>> (original)
>>> +++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap Wed 
>>> Nov  9 09:35:30 2005
>>> @@ -389,11 +389,7 @@
>>>                           <map:generate type="stream"/>
>>>                   <map:transform 
>>> src="xslt/authoring/edit/addSourceTags.xsl">
>>> -                    <map:parameter name="source" 
>>> value="pubs/{1}/content/{2}/{page-envelope:document-path}"/>
>>> -<!-- TODO: Get content-dir from config/publication.xconf -->
>>> -<!--
>>>                     <map:parameter name="source" 
>>> value="{content-dir:{1},{2}}/{page-envelope:document-path}"/>
>>> --->
>>>                     <!--<map:parameter name="source" 
>>> value="pubs/{1}/test-xopus.xml"/>-->
>>>                   </map:transform>
>>>                   <map:transform type="write-source">
>>> @@ -413,7 +409,7 @@
>>>                     <map:parameter name="Cache-Control" 
>>> value="pre-check=0" />
>>>                     <map:parameter name="Expires" value="-1" />
>>>                   </map:act>
>>> -                  <map:generate 
>>> src="pubs/{1}/content/{2}/{page-envelope:document-path}"/>
>>> +                  <map:generate 
>>> src="{content-dir:{1},{2}}/{page-envelope:document-path}"/>
>>>                   <map:serialize type="xml"/>
>>>                 </map:otherwise>
>>>               </map:select>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
>>> For additional commands, e-mail: commits-help@lenya.apache.org
>>>
>>>
>>>   
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>> For additional commands, e-mail: dev-help@lenya.apache.org
>>
>>
>>  
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>


-- 
Edith Chevrier
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://wyona.com                          http://lenya.apache.org
edith.chevrier@wyona.com                         edith@apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r332085 - in /lenya/branches/BRANCH_1_2_X/src: java/org/apache/lenya/cms/cocoon/components/modules/input/ webapp/WEB-INF/ webapp/lenya/ webapp/lenya/pubs/default/ webapp/lenya/pubs/default/config/

Posted by Michael Wechner <mi...@wyona.com>.
Josias Thoeny wrote:

>On Wed, 2005-11-09 at 17:35 +0000, edith@apache.org wrote:
>[...]
>  
>
>>Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf
>>URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf?rev=332085&r1=332084&r2=332085&view=diff
>>==============================================================================
>>--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf (original)
>>+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf Wed Nov  9 09:35:30 2005
>>@@ -27,11 +27,9 @@
>>   <breadcrumb-prefix/>
>> 
>>   <!-- NOTE: The configuration of content directories has NOT been fully tested yet and might lead to unexpected results. Use at own risk;-) -->
>>-  <content-authoring-dir>content/authoring</content-authoring-dir>
>>-  <!--
>>-  <content-authoring-dir>/home/USERNAME/data/lenya/author</content-authoring-dir>
>>-  -->
>>-  <content-live-dir>content/live</content-live-dir>
>>+
>>+  <content-dir area="autoring">/home/edith/data/authoring</content-dir>
>>+  <content-dir area="live">/home/edith/blabla/live</content-dir>
>>    
>>
>
>Does that mean that this file has to be edited manually to set the
>correct content path when someone installs Lenya?
>  
>

no, I think edith accidentally checked in her private settings

>Or how does it work if I just want to use the "normal" relative content
>path?
>  
>

I have fixed it.

Michi

>- Josias
>
>  
>
>>   
>>   <!-- 
>>        For information about these settings, read 
>>
>>Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap
>>URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap?rev=332085&r1=332084&r2=332085&view=diff
>>==============================================================================
>>--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap (original)
>>+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap Wed Nov  9 09:35:30 2005
>>@@ -47,7 +47,7 @@
>>       <!-- parametrized doctype matcher -->
>>       <!-- pattern="{rendertype}/{area}/{doctype}/{document-path}" -->
>>       <map:match pattern="*/*/*/**.xml">
>>-        <map:generate src="content/{2}/{4}.xml"/>
>>+        <map:generate src="{content-dir:{page-envelope:publication-id},{2}}/{4}.xml"/>
>>         <map:transform src="xslt/{3}2xhtml.xsl">
>>           <map:parameter name="rendertype" value="{1}"/>
>>           <map:parameter name="nodeid" value="{page-envelope:document-node-id}"/>
>>
>>Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap
>>URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap?rev=332085&r1=332084&r2=332085&view=diff
>>==============================================================================
>>--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap (original)
>>+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap Wed Nov  9 09:35:30 2005
>>@@ -56,7 +56,7 @@
>>     <map:pipeline>
>>       <!-- {area}/{uri} -->
>>       <map:match pattern="*/**.html">
>>-	<map:act type="sourcetype" src="content/{1}/{page-envelope:document-path}">
>>+	<map:act type="sourcetype" src="{content-dir:{page-envelope:publication-id},{1}}/{page-envelope:document-path}">
>> 	  <map:generate type="serverpages" src="../../config/parameters/default.xsp">
>> 	    <map:parameter name="value" value="{sourcetype}"/>
>> 	  </map:generate>
>>@@ -68,7 +68,7 @@
>>     <map:pipeline>
>>       <!-- {area}/{uri} -->
>>       <map:match pattern="*/**.xml">
>>-	<map:act type="sourcetype" src="content/{1}/{2}.xml">
>>+	<map:act type="sourcetype" src="{content-dir:{page-envelope:publication-id},{1}}/{2}.xml">
>> 	  <map:generate type="serverpages" src="../../config/parameters/default.xsp">
>> 	    <map:parameter name="value" value="{sourcetype}"/>
>> 	  </map:generate>
>>
>>Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap
>>URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap?rev=332085&r1=332084&r2=332085&view=diff
>>==============================================================================
>>--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap (original)
>>+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap Wed Nov  9 09:35:30 2005
>>@@ -228,7 +228,7 @@
>>           </map:when>
>> 
>>           <map:otherwise> <!-- GET -->
>>-            <map:generate src="content/authoring/{page-envelope:document-path}"/>
>>+            <map:generate src="{content-dir:{page-envelope:publication-id},{page-envelope:area}}/{page-envelope:document-path}"/>
>>             <map:transform src="../../xslt/bxeng/change-object-path.xsl">
>>               <map:parameter name="documentid" value="{page-envelope:document-id}"/>
>>             </map:transform>
>>
>>Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap
>>URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap?rev=332085&r1=332084&r2=332085&view=diff
>>==============================================================================
>>--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap (original)
>>+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap Wed Nov  9 09:35:30 2005
>>@@ -389,11 +389,7 @@
>>         
>>                   <map:generate type="stream"/>
>>                   <map:transform src="xslt/authoring/edit/addSourceTags.xsl">
>>-                    <map:parameter name="source" value="pubs/{1}/content/{2}/{page-envelope:document-path}"/>
>>-<!-- TODO: Get content-dir from config/publication.xconf -->
>>-<!--
>>                     <map:parameter name="source" value="{content-dir:{1},{2}}/{page-envelope:document-path}"/>
>>--->
>>                     <!--<map:parameter name="source" value="pubs/{1}/test-xopus.xml"/>-->
>>                   </map:transform>
>>                   <map:transform type="write-source">
>>@@ -413,7 +409,7 @@
>>                     <map:parameter name="Cache-Control" value="pre-check=0" />
>>                     <map:parameter name="Expires" value="-1" />
>>                   </map:act>
>>-                  <map:generate src="pubs/{1}/content/{2}/{page-envelope:document-path}"/>
>>+                  <map:generate src="{content-dir:{1},{2}}/{page-envelope:document-path}"/>
>>                   <map:serialize type="xml"/>
>>                 </map:otherwise>
>>               </map:select>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
>>For additional commands, e-mail: commits-help@lenya.apache.org
>>
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>For additional commands, e-mail: dev-help@lenya.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: svn commit: r332085 - in /lenya/branches/BRANCH_1_2_X/src: java/org/apache/lenya/cms/cocoon/components/modules/input/ webapp/WEB-INF/ webapp/lenya/ webapp/lenya/pubs/default/ webapp/lenya/pubs/default/config/

Posted by Josias Thoeny <jo...@wyona.com>.
On Wed, 2005-11-09 at 17:35 +0000, edith@apache.org wrote:
[...]
> Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf
> URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf?rev=332085&r1=332084&r2=332085&view=diff
> ==============================================================================
> --- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf (original)
> +++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/config/publication.xconf Wed Nov  9 09:35:30 2005
> @@ -27,11 +27,9 @@
>    <breadcrumb-prefix/>
>  
>    <!-- NOTE: The configuration of content directories has NOT been fully tested yet and might lead to unexpected results. Use at own risk;-) -->
> -  <content-authoring-dir>content/authoring</content-authoring-dir>
> -  <!--
> -  <content-authoring-dir>/home/USERNAME/data/lenya/author</content-authoring-dir>
> -  -->
> -  <content-live-dir>content/live</content-live-dir>
> +
> +  <content-dir area="autoring">/home/edith/data/authoring</content-dir>
> +  <content-dir area="live">/home/edith/blabla/live</content-dir>

Does that mean that this file has to be edited manually to set the
correct content path when someone installs Lenya?
Or how does it work if I just want to use the "normal" relative content
path?

- Josias

>    
>    <!-- 
>         For information about these settings, read 
> 
> Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap
> URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap?rev=332085&r1=332084&r2=332085&view=diff
> ==============================================================================
> --- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap (original)
> +++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/doctypes.xmap Wed Nov  9 09:35:30 2005
> @@ -47,7 +47,7 @@
>        <!-- parametrized doctype matcher -->
>        <!-- pattern="{rendertype}/{area}/{doctype}/{document-path}" -->
>        <map:match pattern="*/*/*/**.xml">
> -        <map:generate src="content/{2}/{4}.xml"/>
> +        <map:generate src="{content-dir:{page-envelope:publication-id},{2}}/{4}.xml"/>
>          <map:transform src="xslt/{3}2xhtml.xsl">
>            <map:parameter name="rendertype" value="{1}"/>
>            <map:parameter name="nodeid" value="{page-envelope:document-node-id}"/>
> 
> Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap
> URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap?rev=332085&r1=332084&r2=332085&view=diff
> ==============================================================================
> --- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap (original)
> +++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/parameter-doctype.xmap Wed Nov  9 09:35:30 2005
> @@ -56,7 +56,7 @@
>      <map:pipeline>
>        <!-- {area}/{uri} -->
>        <map:match pattern="*/**.html">
> -	<map:act type="sourcetype" src="content/{1}/{page-envelope:document-path}">
> +	<map:act type="sourcetype" src="{content-dir:{page-envelope:publication-id},{1}}/{page-envelope:document-path}">
>  	  <map:generate type="serverpages" src="../../config/parameters/default.xsp">
>  	    <map:parameter name="value" value="{sourcetype}"/>
>  	  </map:generate>
> @@ -68,7 +68,7 @@
>      <map:pipeline>
>        <!-- {area}/{uri} -->
>        <map:match pattern="*/**.xml">
> -	<map:act type="sourcetype" src="content/{1}/{2}.xml">
> +	<map:act type="sourcetype" src="{content-dir:{page-envelope:publication-id},{1}}/{2}.xml">
>  	  <map:generate type="serverpages" src="../../config/parameters/default.xsp">
>  	    <map:parameter name="value" value="{sourcetype}"/>
>  	  </map:generate>
> 
> Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap
> URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap?rev=332085&r1=332084&r2=332085&view=diff
> ==============================================================================
> --- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap (original)
> +++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/usecase-bxeng.xmap Wed Nov  9 09:35:30 2005
> @@ -228,7 +228,7 @@
>            </map:when>
>  
>            <map:otherwise> <!-- GET -->
> -            <map:generate src="content/authoring/{page-envelope:document-path}"/>
> +            <map:generate src="{content-dir:{page-envelope:publication-id},{page-envelope:area}}/{page-envelope:document-path}"/>
>              <map:transform src="../../xslt/bxeng/change-object-path.xsl">
>                <map:parameter name="documentid" value="{page-envelope:document-id}"/>
>              </map:transform>
> 
> Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap
> URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap?rev=332085&r1=332084&r2=332085&view=diff
> ==============================================================================
> --- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap (original)
> +++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecase.xmap Wed Nov  9 09:35:30 2005
> @@ -389,11 +389,7 @@
>          
>                    <map:generate type="stream"/>
>                    <map:transform src="xslt/authoring/edit/addSourceTags.xsl">
> -                    <map:parameter name="source" value="pubs/{1}/content/{2}/{page-envelope:document-path}"/>
> -<!-- TODO: Get content-dir from config/publication.xconf -->
> -<!--
>                      <map:parameter name="source" value="{content-dir:{1},{2}}/{page-envelope:document-path}"/>
> --->
>                      <!--<map:parameter name="source" value="pubs/{1}/test-xopus.xml"/>-->
>                    </map:transform>
>                    <map:transform type="write-source">
> @@ -413,7 +409,7 @@
>                      <map:parameter name="Cache-Control" value="pre-check=0" />
>                      <map:parameter name="Expires" value="-1" />
>                    </map:act>
> -                  <map:generate src="pubs/{1}/content/{2}/{page-envelope:document-path}"/>
> +                  <map:generate src="{content-dir:{1},{2}}/{page-envelope:document-path}"/>
>                    <map:serialize type="xml"/>
>                  </map:otherwise>
>                </map:select>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
> For additional commands, e-mail: commits-help@lenya.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org