I don't think that I broke anything, I was able to test with cadaver (make edits) on xhtml pages.

OpenOffice almost works ;). You can browse the collection of html documents, open an html page, edit, but I cant seem to save. OpenOffice doesn't seem to care for the response of a "PROPFIND /default/webdav/concepts_en.html". I didn't have the time yesterday, but it shouldn't be too hard to figure out (pull apart a working request response with axis).

Next step, hack something together so that ODTs work. Then figure out the best way to provide this via a module.

--Doug

Michael Wechner wrote:

Hey Doug


Very cool. Does it already work? Do you mind if I start hacking on making ODTs available?

Thanks

Michi

[EMAIL PROTECTED] wrote:

Author: chestnut
Date: Thu Dec 22 09:47:39 2005
New Revision: 358595

URL: http://svn.apache.org/viewcvs?rev=358595&view=rev
Log:
making webdav work via /pubid/webdav/ instead of /pubid/authoring/ path. This way we no longer have to rely on the
useragent header to determine dav clients

Modified:
    lenya/trunk/src/confpatch/pipelines.xmap
lenya/trunk/src/java/org/apache/lenya/cms/publication/Publication.java lenya/trunk/src/java/org/apache/lenya/cms/publication/PublicationImpl.java lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Propfind.java lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/init.xsl lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/propfind.jx lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap
    lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap

Modified: lenya/trunk/src/confpatch/pipelines.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/confpatch/pipelines.xmap?rev=358595&r1=358594&r2=358595&view=diff ==============================================================================
--- lenya/trunk/src/confpatch/pipelines.xmap (original)
+++ lenya/trunk/src/confpatch/pipelines.xmap Thu Dec 22 09:47:39 2005
@@ -61,31 +61,27 @@
     <map:pipeline>
<map:match pattern="**">
-      <map:select type="client">
-        <map:when test="webdav">
-            <map:act type="authenticator">
-              <map:act type="authorizer">
- <map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/> - </map:act>
-              <map:act type="set-header">
- <map:parameter name="WWW-Authenticate" value="Basic Realm=lenya" /> - <map:generate type="html" src="fallback://lenya/usecases/webdav/401error.html"/>
-                <map:serialize type="xhtml" status-code="401"/>
-              </map:act>
-            </map:act>
-            <map:act type="set-header">
- <map:parameter name="WWW-Authenticate" value="Basic Realm=lenya" /> - <map:generate type="html" src="fallback://lenya/usecases/webdav/401error.html"/>
-              <map:serialize type="xhtml" status-code="401"/>
-            </map:act>
-        </map:when>
-        <map:otherwise>
+      <map:match pattern="*/webdav**">
+        <map:act type="authenticator">
           <map:act type="authorizer">
- <map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/> + <map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/> </map:act> - <map:redirect-to uri="{request:requestURI}?lenya.usecase=ac.login&amp;referrerQueryString={request:queryString}" session="true"/> - </map:otherwise>
-      </map:select>
+          <map:act type="set-header">
+ <map:parameter name="WWW-Authenticate" value="Basic Realm=lenya" /> + <map:generate type="html" src="fallback://lenya/usecases/webdav/401error.html"/>
+            <map:serialize type="xhtml" status-code="401"/>
+          </map:act>
+        </map:act>
+        <map:act type="set-header">
+ <map:parameter name="WWW-Authenticate" value="Basic Realm=lenya" /> + <map:generate type="html" src="fallback://lenya/usecases/webdav/401error.html"/>
+          <map:serialize type="xhtml" status-code="401"/>
+        </map:act>
+      </map:match>
+      <map:act type="authorizer">
+ <map:mount uri-prefix="" src="global-sitemap.xmap" check-reload="true" reload-method="synchron"/>
+      </map:act>
+ <map:redirect-to uri="{request:requestURI}?lenya.usecase=ac.login&amp;referrerQueryString={request:queryString}" session="true"/> </map:match> </map:pipeline>

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/Publication.java URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/Publication.java?rev=358595&r1=358594&r2=358595&view=diff ============================================================================== --- lenya/trunk/src/java/org/apache/lenya/cms/publication/Publication.java (original) +++ lenya/trunk/src/java/org/apache/lenya/cms/publication/Publication.java Thu Dec 22 09:47:39 2005
@@ -31,6 +31,10 @@
      */
     String AUTHORING_AREA = "authoring";
     /**
+     * <code>DAV_AREA</code> The webDAV authoring area
+     */
+    String DAV_AREA = "webdav";
+    /**
      * <code>STAGING_AREA</code> The staging area
      */
     String STAGING_AREA = "staging";

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/PublicationImpl.java URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/PublicationImpl.java?rev=358595&r1=358594&r2=358595&view=diff ============================================================================== --- lenya/trunk/src/java/org/apache/lenya/cms/publication/PublicationImpl.java (original) +++ lenya/trunk/src/java/org/apache/lenya/cms/publication/PublicationImpl.java Thu Dec 22 09:47:39 2005
@@ -35,7 +35,7 @@
  */
public class PublicationImpl extends AbstractLogEnabled implements Publication { - private static final String[] areas = { AUTHORING_AREA, STAGING_AREA, LIVE_AREA, ADMIN_AREA, + private static final String[] areas = { AUTHORING_AREA, DAV_AREA, STAGING_AREA, LIVE_AREA, ADMIN_AREA,
             ARCHIVE_AREA, TRASH_AREA };
private String id;

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java?rev=358595&r1=358594&r2=358595&view=diff ============================================================================== --- lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java (original) +++ lenya/trunk/src/java/org/apache/lenya/cms/publication/URLInformation.java Thu Dec 22 09:47:39 2005
@@ -85,6 +85,8 @@
if (this.completeArea.startsWith(Publication.SEARCH_AREA_PREFIX)) { this.area = this.completeArea.substring(Publication.SEARCH_AREA_PREFIX.length()); + } else if (this.completeArea.equals(Publication.DAV_AREA)) {
+                    this.area = Publication.AUTHORING_AREA;
                 } else {
                     this.area = this.completeArea;
                 }

Modified: lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Propfind.java URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Propfind.java?rev=358595&r1=358594&r2=358595&view=diff ============================================================================== --- lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Propfind.java (original) +++ lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/webdav/Propfind.java Thu Dec 22 09:47:39 2005
@@ -80,6 +80,9 @@
             request = request.substring(0, request.indexOf(".html"));
         if (!request.endsWith("/"))
             request = request + "/";
+        if (request.indexOf("webdav") > -1) {
+            request = request.replaceFirst("webdav","authoring");
+        }
         try {
             // get Parameters for RC
String publicationPath = _publication.getDirectory().getCanonicalPath();
@@ -100,7 +103,7 @@
siteManager = (SiteManager) siteManagerSelector.select(_publication.getSiteManagerHint()); Document[] documents = siteManager.getDocuments(getDocumentIdentityMap(),
                     _publication,
-                    this.getArea());
+                    Publication.AUTHORING_AREA);
docBuilderSelector = (ServiceSelector) this.manager.lookup(DocumentBuilder.ROLE
                     + "Selector");
@@ -187,8 +190,7 @@
      * @return The area without the "info-" prefix.
      */
     public String getArea() {
-        URLInformation info = new URLInformation(getSourceURL());
-        return info.getArea();
+        return Publication.AUTHORING_AREA;
     }
private Publication publication;

Modified: lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/init.xsl URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/init.xsl?rev=358595&r1=358594&r2=358595&view=diff ============================================================================== --- lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/init.xsl (original) +++ lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/init.xsl Thu Dec 22 09:47:39 2005
@@ -30,11 +30,11 @@
            </D:response>
<D:response> - <D:href>/<xsl:value-of select="$pubid" />/authoring</D:href>
+              <D:href>/<xsl:value-of select="$pubid" />/webdav</D:href>
<D:propstat>
                  <D:prop>
-                    <D:displayname>authoring</D:displayname>
+                    <D:displayname>webdav</D:displayname>
<D:getlastmodified></D:getlastmodified> Modified: lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/propfind.jx URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/propfind.jx?rev=358595&r1=358594&r2=358595&view=diff ============================================================================== --- lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/propfind.jx (original) +++ lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/propfind.jx Thu Dec 22 09:47:39 2005
@@ -10,7 +10,7 @@
           <D:href>${sourceURL}</D:href>
           <D:propstat>
             <D:prop>
-              <D:displayname>authoring</D:displayname>
+              <D:displayname>webdav</D:displayname>
<D:getlastmodified>${dateFormat.format(moddate)}</D:getlastmodified>
               <D:creationdate></D:creationdate>
               <D:resourcetype>

Modified: lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap?rev=358595&r1=358594&r2=358595&view=diff ============================================================================== --- lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap (original) +++ lenya/trunk/src/webapp/lenya/pubs/default/lenya/usecases/webdav/sitemap.xmap Thu Dec 22 09:47:39 2005
@@ -115,13 +115,13 @@
          <map:pipeline type="caching">
  -      <map:match pattern="authoring">
+      <map:match pattern="webdav">
         <map:call function="selectMethod">
           <map:parameter name="page" value=""/>
<map:parameter name="requestURI" value="{request:requestURI}" />
         </map:call>
       </map:match>
-      <map:match pattern="authoring/**">
+      <map:match pattern="webdav/**">
         <map:call function="selectMethod">
           <map:parameter name="page" value="{1}"/>
<map:parameter name="requestURI" value="{request:requestURI}" />
@@ -150,6 +150,10 @@
           </map:match>
           <map:match pattern="GET/**/*_*.html">
<map:generate src="context://lenya/pubs/{page-envelope:publication-id}/content/authoring/{1}/{2}/index_{3}.xml"/>
+            <map:serialize type="xml-get"/>
+          </map:match>
+          <map:match pattern="GET/**.html">
+ <map:generate src="context://lenya/pubs/{page-envelope:publication-id}/content/authoring/{1}/index_{page-envelope:document-language}.xml"/>
             <map:serialize type="xml-get"/>
           </map:match>
         </map:act>

Modified: lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap?rev=358595&r1=358594&r2=358595&view=diff ==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap (original)
+++ lenya/trunk/src/webapp/lenya/pubs/default/sitemap.xmap Thu Dec 22 09:47:39 2005
@@ -58,11 +58,9 @@
<map:pipeline>
       <map:match pattern="**">
-        <map:select type="client">
-          <map:when test="webdav">
- <map:mount uri-prefix="" src="{fallback:lenya/usecases/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/> - </map:when>
-        </map:select>
+        <map:match pattern="webdav**">
+ <map:mount uri-prefix="" src="{fallback:lenya/usecases/webdav/sitemap.xmap}" check-reload="true" reload-method="synchron"/> + </map:match>
         <map:select type="request-method">
           <!-- many client editors like to PUT changes -->
           <map:when test="PUT">



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to