You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/05/19 14:08:14 UTC

svn commit: r407776 - in /lenya/trunk/src: java/org/apache/lenya/cms/authoring/ java/org/apache/lenya/cms/editors/kupu/ java/org/apache/lenya/cms/publication/ java/org/apache/lenya/cms/repository/ modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/ ...

Author: andreas
Date: Fri May 19 05:08:10 2006
New Revision: 407776

URL: http://svn.apache.org/viewvc?rev=407776&view=rev
Log:
Removed source extensions from content. This way, source files can be read without knowing the source extension, i.e., without accessing the meta data. This solves several problems and simplifies the code.

Added:
    lenya/trunk/src/java/org/apache/lenya/cms/authoring/DocumentCreator.java
      - copied, changed from r407569, lenya/trunk/src/java/org/apache/lenya/cms/authoring/NodeCreatorInterface.java
    lenya/trunk/src/pubs/default/content/authoring/concepts/index_de
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/concepts/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/concepts/index_de.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/concepts/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/concepts/index_en
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/concepts/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/concepts/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/concepts/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/cforms/index_en
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/cforms/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/cforms/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/cforms/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/index_de
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/index_de.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/index_en
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/links/index_en
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/links/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/links/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/links/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_de
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_de.odt
    lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_de.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_en   (with props)
    lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_de
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_de.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_en
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/features/index_de
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/features/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/features/index_de.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/features/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/features/index_en
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/features/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/features/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/features/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/index/index_de
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/index/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/index/index_de.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/index/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/index/index_en
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/index/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/index/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/index/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/links/index_en
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/links/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/links/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/links/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/tutorial/index_de
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/tutorial/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/tutorial/index_de.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/tutorial/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/tutorial/index_en
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/tutorial/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/tutorial/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/tutorial/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/tutorial/new_doctype/index_en
    lenya/trunk/src/pubs/default/content/authoring/tutorial/new_doctype/index_en.meta
      - copied unchanged from r407569, lenya/trunk/src/pubs/default/content/authoring/tutorial/new_doctype/index_en.xml.meta
Removed:
    lenya/trunk/src/java/org/apache/lenya/cms/authoring/NodeCreatorInterface.java
    lenya/trunk/src/pubs/default/content/authoring/concepts/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/concepts/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/concepts/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/concepts/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/cforms/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/cforms/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/links/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/links/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_de.odt
    lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_en.odt
    lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/doctypes/xhtml-document/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/features/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/features/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/features/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/features/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/index/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/index/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/index/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/index/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/links/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/links/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/tutorial/index_de.xml
    lenya/trunk/src/pubs/default/content/authoring/tutorial/index_de.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/tutorial/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/tutorial/index_en.xml.meta
    lenya/trunk/src/pubs/default/content/authoring/tutorial/new_doctype/index_en.xml
    lenya/trunk/src/pubs/default/content/authoring/tutorial/new_doctype/index_en.xml.meta
Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/authoring/DefaultCreator.java
    lenya/trunk/src/java/org/apache/lenya/cms/editors/kupu/Kupu.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocumentIdToPathMapper.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentIdToPathMapper.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/IdentityDocumentIdToPathMapper.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/PageEnvelope.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java
    lenya/trunk/src/java/org/apache/lenya/cms/publication/SingleLanguageIdentityMapper.java
    lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java
    lenya/trunk/src/modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/BXE.java
    lenya/trunk/src/modules/xhtml/sitemap.xmap
    lenya/trunk/src/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java
    lenya/trunk/src/pubs/blog/java/src/org/apache/lenya/cms/site/usecases/CreateBlogEntry.java
    lenya/trunk/src/pubs/blog/sitemap.xmap
    lenya/trunk/src/pubs/blog/xslt/feed/xinclude.xsl
    lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap
    lenya/trunk/src/targets/migration-build.xml

Modified: lenya/trunk/src/java/org/apache/lenya/cms/authoring/DefaultCreator.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/authoring/DefaultCreator.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/authoring/DefaultCreator.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/authoring/DefaultCreator.java Fri May 19 05:08:10 2006
@@ -34,12 +34,12 @@
  * Base creator for creating documents
  * @version $Id$
  */
-public abstract class DefaultCreator extends AbstractLogEnabled implements NodeCreatorInterface {
+public abstract class DefaultCreator extends AbstractLogEnabled implements DocumentCreator {
 
     private ServiceManager manager;
 
     /**
-     * @see org.apache.lenya.cms.authoring.NodeCreatorInterface#init(Configuration, ServiceManager,
+     * @see org.apache.lenya.cms.authoring.DocumentCreator#init(Configuration, ServiceManager,
      *      Logger)
      */
     public void init(Configuration conf, ServiceManager _manager, Logger _logger) {
@@ -62,7 +62,7 @@
     }
 
     /**
-     * @see NodeCreatorInterface#create(String, org.apache.lenya.cms.publication.Document, Map)
+     * @see DocumentCreator#create(String, org.apache.lenya.cms.publication.Document, Map)
      */
     public void create(String initialContentsURI,
             org.apache.lenya.cms.publication.Document document, Map parameters) throws Exception {

Copied: lenya/trunk/src/java/org/apache/lenya/cms/authoring/DocumentCreator.java (from r407569, lenya/trunk/src/java/org/apache/lenya/cms/authoring/NodeCreatorInterface.java)
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/authoring/DocumentCreator.java?p2=lenya/trunk/src/java/org/apache/lenya/cms/authoring/DocumentCreator.java&p1=lenya/trunk/src/java/org/apache/lenya/cms/authoring/NodeCreatorInterface.java&r1=407569&r2=407776&rev=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/authoring/NodeCreatorInterface.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/authoring/DocumentCreator.java Fri May 19 05:08:10 2006
@@ -28,7 +28,7 @@
  * @version $Id$
  * @deprecated This interface and it's implementations will be removed during the 1.4 development cycle
  */
-public interface NodeCreatorInterface {
+public interface DocumentCreator {
 
     /**
      * Configures the Creator, based on a configuration file.

Modified: lenya/trunk/src/java/org/apache/lenya/cms/editors/kupu/Kupu.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/editors/kupu/Kupu.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/editors/kupu/Kupu.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/editors/kupu/Kupu.java Fri May 19 05:08:10 2006
@@ -46,9 +46,7 @@
 
             Document doc = getSourceDocument();
             DocumentIdToPathMapper mapper = doc.getPublication().getPathMapper();
-            String path = mapper.getPath(doc.getId(),
-                    getSourceDocument().getLanguage(),
-                    getSourceDocument().getSourceExtension());
+            String path = mapper.getPath(doc.getId(), getSourceDocument().getLanguage());
             String sourceUri = doc.getSourceURI();
             String pubId = doc.getPublication().getId();
             String tempSourceUri = "context://lenya/pubs/" + pubId + "/work/bxe/content/"

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocument.java Fri May 19 05:08:10 2006
@@ -115,8 +115,7 @@
         return getPublication().getPathMapper().getFile(getPublication(),
                 getArea(),
                 getId(),
-                getLanguage(),
-                getSourceExtension());
+                getLanguage());
     }
 
     /**
@@ -415,12 +414,7 @@
             RepositorySource source = null;
             try {
                 resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
-
-                // TODO: This needs to be improved ...
-                String sourceUri = getPublication().getSourceURI() + "/content/" + getArea()
-                        + getId() + "/index_" + getLanguage() + ".xml";
-
-                source = (RepositorySource) resolver.resolveURI(sourceUri);
+                source = (RepositorySource) resolver.resolveURI(getSourceURI());
                 this.metaDataManager = source.getNode().getMetaDataManager();
             } catch (Exception e) {
                 throw new RuntimeException(e);
@@ -460,9 +454,7 @@
      * @see org.apache.lenya.cms.publication.Document#getSourceURI()
      */
     public String getSourceURI() {
-        String path = getPublication().getPathMapper().getPath(getId(),
-                getLanguage(),
-                getSourceExtension());
+        String path = getPublication().getPathMapper().getPath(getId(), getLanguage());
         return getPublication().getSourceURI() + "/content/" + getArea() + "/" + path;
     }
 

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocumentIdToPathMapper.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocumentIdToPathMapper.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocumentIdToPathMapper.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DefaultDocumentIdToPathMapper.java Fri May 19 05:08:10 2006
@@ -34,12 +34,10 @@
 
     /**
      * @see org.apache.lenya.cms.publication.DocumentIdToPathMapper#getFile(org.apache.lenya.cms.publication.Publication,
-     *      java.lang.String, java.lang.String, java.lang.String, String)
+     *      java.lang.String, java.lang.String, java.lang.String)
      */
-    public File getFile(Publication publication, String area, String documentId, String language,
-            String extension) {
-        File file = new File(getDirectory(publication, area, documentId), getFilename(language,
-                extension));
+    public File getFile(Publication publication, String area, String documentId, String language) {
+        File file = new File(getDirectory(publication, area, documentId), getFilename(language));
         return file;
     }
 
@@ -63,28 +61,27 @@
 
     /**
      * @see org.apache.lenya.cms.publication.DocumentIdToPathMapper#getPath(java.lang.String,
-     *      java.lang.String, String)
+     *      java.lang.String)
      */
-    public String getPath(String documentId, String language, String extension) {
+    public String getPath(String documentId, String language) {
         assert documentId.startsWith("/");
         // remove leading slash
         documentId = documentId.substring(1);
-        return documentId + "/" + getFilename(language, extension);
+        return documentId + "/" + getFilename(language);
     }
 
     /**
      * Constructs the filename for a given language.
      * 
      * @param language The language.
-     * @param extension The extension.
      * @return A string value.
      */
-    protected String getFilename(String language, String extension) {
+    protected String getFilename(String language) {
         String languageSuffix = "";
         if (language != null && !"".equals(language)) {
             languageSuffix = "_" + language;
         }
-        return BASE_FILENAME_PREFIX + languageSuffix + "." + extension;
+        return BASE_FILENAME_PREFIX + languageSuffix;
     }
 
     /**

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentIdToPathMapper.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentIdToPathMapper.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentIdToPathMapper.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentIdToPathMapper.java Fri May 19 05:08:10 2006
@@ -32,11 +32,10 @@
      * 
      * @param documentId the document-id of the document
      * @param language the language of the document
-     * @param extension The source extension.
      * 
      * @return the path to the document, without publication ID and area
      */
-    String getPath(String documentId, String language, String extension);
+    String getPath(String documentId, String language);
 
     /**
      * Compute the document-path for a given publication, area, document-id and language
@@ -45,12 +44,10 @@
      * @param area the area of the document
      * @param documentId the document-id of the document
      * @param language the language of the document
-     * @param extension The source extension.
      * 
      * @return the path to the document
      */
-    File getFile(Publication publication, String area, String documentId, String language,
-            String extension);
+    File getFile(Publication publication, String area, String documentId, String language);
 
     /**
      * Compute the document-path for a given publication, area and document-id. As there are

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/DocumentManagerImpl.java Fri May 19 05:08:10 2006
@@ -27,7 +27,7 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.avalon.framework.service.Serviceable;
-import org.apache.lenya.cms.authoring.NodeCreatorInterface;
+import org.apache.lenya.cms.authoring.DocumentCreator;
 import org.apache.lenya.cms.metadata.LenyaMetaData;
 import org.apache.lenya.cms.metadata.MetaDataManager;
 import org.apache.lenya.cms.publication.util.DocumentSet;
@@ -52,7 +52,7 @@
      * and the resource type to be used)
      * 
      * @see DocumentManager#add(Document, ResourceType, String, String, boolean, Map)
-     * @see org.apache.lenya.cms.authoring.NodeCreatorInterface
+     * @see org.apache.lenya.cms.authoring.DocumentCreator
      * @see org.apache.lenya.cms.publication.DocumentBuilder
      */
     public void add(Document document, ResourceType documentType, String extension,
@@ -106,9 +106,6 @@
 
         try {
 
-            // This locks the meta data node, using the default source URI with the extension ".xml".
-            // Note that the actual source URI with the correct extension is not yet determined,
-            // that's why the node has to be locked again later on.
             Node node = document.getRepositoryNode();
             node.lock();
 
@@ -126,11 +123,8 @@
                 getLogger().debug("    contents URI: [" + initialContentsURI + "]");
             }
 
-            // Now that the correcet source is determined, lock the document node again.
-            document.getRepositoryNode().lock();
-
             // look up creator for documents of this type
-            NodeCreatorInterface creator = documentType.getCreator();
+            DocumentCreator creator = documentType.getCreator();
             creator.create(initialContentsURI, document, parameters);
         } catch (Exception e) {
             throw new DocumentBuildException("call to creator for new document failed", e);

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/IdentityDocumentIdToPathMapper.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/IdentityDocumentIdToPathMapper.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/IdentityDocumentIdToPathMapper.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/IdentityDocumentIdToPathMapper.java Fri May 19 05:08:10 2006
@@ -28,13 +28,12 @@
 
     /**
      * @see org.apache.lenya.cms.publication.DocumentIdToPathMapper#getFile(org.apache.lenya.cms.publication.Publication,
-     *      java.lang.String, java.lang.String, java.lang.String, String)
+     *      java.lang.String, java.lang.String, java.lang.String)
      */
-    public File getFile(Publication publication, String area, String documentId, String language,
-            String extension) {
+    public File getFile(Publication publication, String area, String documentId, String language) {
         File areaDirectory = new File(publication.getDirectory(), Publication.CONTENT_PATH
                 + File.separator + area);
-        File file = new File(areaDirectory, getPath(documentId, language, extension));
+        File file = new File(areaDirectory, getPath(documentId, language));
         return file;
     }
 
@@ -43,32 +42,31 @@
      *      java.lang.String, java.lang.String)
      */
     public File getDirectory(Publication publication, String area, String documentId) {
-        return getFile(publication, area, documentId, null, null).getParentFile();
+        return getFile(publication, area, documentId, null).getParentFile();
     }
 
     /**
      * @see org.apache.lenya.cms.publication.DocumentIdToPathMapper#getPath(java.lang.String,
-     *      java.lang.String, String)
+     *      java.lang.String)
      */
-    public String getPath(String documentId, String language, String extension) {
+    public String getPath(String documentId, String language) {
         assert documentId.startsWith("/");
         // remove leading slash
         documentId = documentId.substring(1);
-        return documentId + getSuffix(language, extension);
+        return documentId + getSuffix(language);
     }
 
     /**
      * Constructs the filename for a given language.
      * @param language The language.
-     * @param extension The extension.
      * @return A string value.
      */
-    protected String getSuffix(String language, String extension) {
+    protected String getSuffix(String language) {
         String languageSuffix = "";
         if (language != null && !"".equals(language)) {
             languageSuffix = "_" + language;
         }
-        return languageSuffix + "." + extension;
+        return languageSuffix;
     }
 
 }

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/PageEnvelope.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/PageEnvelope.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/PageEnvelope.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/PageEnvelope.java Fri May 19 05:08:10 2006
@@ -35,11 +35,11 @@
     public static final String[] PARAMETER_NAMES = { PageEnvelope.AREA, PageEnvelope.CONTEXT,
             PageEnvelope.PUBLICATION_ID, PageEnvelope.PUBLICATION,
             PageEnvelope.PUBLICATION_LANGUAGES_CSV, PageEnvelope.DOCUMENT,
-            PageEnvelope.DOCUMENT_ID, PageEnvelope.DOCUMENT_PARENT, PageEnvelope.DOCUMENT_NAME, PageEnvelope.DOCUMENT_LABEL,
-            PageEnvelope.DOCUMENT_URL, PageEnvelope.DOCUMENT_URL_WITHOUT_LANGUAGE,
-            PageEnvelope.DOCUMENT_PATH, PageEnvelope.DOCUMENT_EXTENSION,
-            PageEnvelope.DOCUMENT_SOURCE_EXTENSION, PageEnvelope.DOCUMENT_UUID,
-            PageEnvelope.DOCUMENT_TYPE, PageEnvelope.DEFAULT_LANGUAGE,
+            PageEnvelope.DOCUMENT_ID, PageEnvelope.DOCUMENT_PARENT, PageEnvelope.DOCUMENT_NAME,
+            PageEnvelope.DOCUMENT_LABEL, PageEnvelope.DOCUMENT_URL,
+            PageEnvelope.DOCUMENT_URL_WITHOUT_LANGUAGE, PageEnvelope.DOCUMENT_PATH,
+            PageEnvelope.DOCUMENT_EXTENSION, PageEnvelope.DOCUMENT_SOURCE_EXTENSION,
+            PageEnvelope.DOCUMENT_UUID, PageEnvelope.DOCUMENT_TYPE, PageEnvelope.DEFAULT_LANGUAGE,
             PageEnvelope.DOCUMENT_LANGUAGE, PageEnvelope.DOCUMENT_LANGUAGES,
             PageEnvelope.DOCUMENT_LANGUAGES_CSV, PageEnvelope.DOCUMENT_LASTMODIFIED,
             PageEnvelope.BREADCRUMB_PREFIX, PageEnvelope.SSL_PREFIX };
@@ -258,9 +258,8 @@
      * @return a <code>File<code> value
      */
     public String getDocumentPath() {
-            return getPublication().getPathMapper().getPath(getDocument().getId(),
-                    getDocument().getLanguage(),
-                    getDocument().getSourceExtension());
+        return getPublication().getPathMapper().getPath(getDocument().getId(),
+                getDocument().getLanguage());
     }
 
     /**

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java Fri May 19 05:08:10 2006
@@ -32,7 +32,7 @@
  */
 package org.apache.lenya.cms.publication;
 
-import org.apache.lenya.cms.authoring.NodeCreatorInterface;
+import org.apache.lenya.cms.authoring.DocumentCreator;
 import org.apache.lenya.xml.Schema;
 
 /**
@@ -83,7 +83,7 @@
     /**
      * @return The creator.
      */
-    NodeCreatorInterface getCreator();
+    DocumentCreator getCreator();
 
     /**
      * @param name The name of the resource type.

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java Fri May 19 05:08:10 2006
@@ -32,7 +32,7 @@
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
 import org.apache.lenya.cms.authoring.DefaultBranchCreator;
-import org.apache.lenya.cms.authoring.NodeCreatorInterface;
+import org.apache.lenya.cms.authoring.DocumentCreator;
 import org.apache.lenya.xml.Schema;
 
 /**
@@ -60,7 +60,7 @@
     private String defaultSampleUri = null;
     private Map sampleUris = new HashMap();
     private String[] linkAttributeXPaths;
-    private NodeCreatorInterface creator;
+    private DocumentCreator creator;
 
     /**
      * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
@@ -82,7 +82,7 @@
             if (creatorConf != null) {
                 String creatorClassName = creatorConf.getAttribute(SRC_ATTRIBUTE);
                 Class creatorClass = Class.forName(creatorClassName);
-                this.creator = (NodeCreatorInterface) creatorClass.newInstance();
+                this.creator = (DocumentCreator) creatorClass.newInstance();
                 this.creator.init(creatorConf, manager, getLogger());
             } else {
                 creator = new DefaultBranchCreator();
@@ -161,7 +161,7 @@
         return this.sampleUri;
     }
 
-    public NodeCreatorInterface getCreator() {
+    public DocumentCreator getCreator() {
         return this.creator;
     }
 

Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/SingleLanguageIdentityMapper.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/SingleLanguageIdentityMapper.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/SingleLanguageIdentityMapper.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/SingleLanguageIdentityMapper.java Fri May 19 05:08:10 2006
@@ -33,7 +33,7 @@
      * @see org.apache.lenya.cms.publication.IdentityDocumentIdToPathMapper#getSuffix(java.lang.String)
      */
     protected String getSuffix(String language) {
-        return ".xml";
+        return "";
     }
 
 }

Modified: lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/repository/SourceNode.java Fri May 19 05:08:10 2006
@@ -59,7 +59,6 @@
     public static final String FILE_PREFIX = "file:/";
     public static final String CONTEXT_PREFIX = "context://";
     public static final String LENYA_META_SUFFIX = "meta";
-    //public static final String LENYA_META_SUFFIX = "lenyameta";
 
     /**
      * Ctor.
@@ -645,12 +644,6 @@
      */
     protected String getMetaSourceURI() {
         String sourceUri = getSourceURI();
-        if (!sourceUri.endsWith(".xml")) {
-            int lastDotIndex = sourceUri.lastIndexOf(".");
-            if (lastDotIndex > -1) {
-                sourceUri = sourceUri.substring(0, lastDotIndex) + ".xml";
-            }
-        }
         return sourceUri + "." + LENYA_META_SUFFIX;
     }
 

Modified: lenya/trunk/src/modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/BXE.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/BXE.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/BXE.java (original)
+++ lenya/trunk/src/modules/bxe/java/src/org/apache/lenya/cms/editors/bxe/BXE.java Fri May 19 05:08:10 2006
@@ -46,7 +46,7 @@
 
             Document doc = getSourceDocument();
             DocumentIdToPathMapper mapper = doc.getPublication().getPathMapper();
-            String path = mapper.getPath(doc.getId(), doc.getLanguage(), doc.getSourceExtension());
+            String path = mapper.getPath(doc.getId(), doc.getLanguage());
             String sourceUri = doc.getSourceURI();
             String pubId = doc.getPublication().getId();
             String tempSourceUri = "context://lenya/pubs/" + pubId + "/work/bxe/content/"

Modified: lenya/trunk/src/modules/xhtml/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/xhtml/sitemap.xmap?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/modules/xhtml/sitemap.xmap (original)
+++ lenya/trunk/src/modules/xhtml/sitemap.xmap Fri May 19 05:08:10 2006
@@ -39,10 +39,9 @@
     <map:pipeline>
       <map:match pattern="lucene-index.xml">
         <map:aggregate element="cmsbody">
-          <!-- TODO Use the standard pipeline for retrieving the document -->
+          <!-- TODO aggregate meta file -->
           <!-- <map:part src="cocoon:/modules/{page-envelope:document-type}/view.xml"/> -->
-          <map:part src="fallback://content/{page-envelope:area}/{page-envelope:document-id}/index_{page-envelope:document-language}.xml.meta"/>
-          <map:part src="fallback://content/{page-envelope:area}/{page-envelope:document-id}/index_{page-envelope:document-language}.xml"/>
+          <map:part src="lenyadoc:/{page-envelope:document-language}/{page-envelope:document-id}"/>
         </map:aggregate>
   
         <map:transform src="fallback://lenya/modules/xhtml/xslt/xhtml2index.xsl">

Modified: lenya/trunk/src/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java (original)
+++ lenya/trunk/src/pubs/blog/java/src/org/apache/lenya/cms/authoring/NewBlogEntryCreator.java Fri May 19 05:08:10 2006
@@ -35,82 +35,4 @@
  */
 public class NewBlogEntryCreator extends DefaultBranchCreator {
 
-    /**
-     * @see org.apache.lenya.cms.authoring.DefaultCreator#transformXML(org.w3c.dom.Document,
-     *      org.apache.lenya.cms.publication.Document, java.util.Map)
-     */
-    public void transformXML(Document doc,
-            org.apache.lenya.cms.publication.Document document,
-            Map parameters) throws Exception {
-
-        // sanity check: blog entry creation depends on certain parameters
-        if (parameters == null)
-            throw new IllegalArgumentException("parameters may not be null for blog entry creation");
-
-        Element parent = doc.getDocumentElement();
-
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("NewBlogEntryCreator.transformXML(): " + document);
-
-        String[] steps = document.getId().split("/");
-        String nodeId = steps[5];
-
-        // Replace id
-        Element element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'id']");
-
-        String year = steps[2];
-        String month = steps[3];
-        String day = steps[4];
-
-        DocumentHelper.setSimpleElementText(element, year + "/" + month + "/"
-                + day + "/" + nodeId);
-
-        // Replace title
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'title']");
-        DocumentHelper.setSimpleElementText(element, (String) parameters.get("title"));
-
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'link']");
-        element.setAttribute("rel", "alternate");
-        element.setAttribute("href", "");
-        element.setAttribute("type", "text/xml");
-
-        // Replace Summary
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'summary']");
-        DocumentHelper.setSimpleElementText(element, "Summary");
-
-        // Replace author
-        Identity identity = (Identity) parameters.get(Identity.class.getName());
-
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'author']/*[local-name() = 'name']");
-
-        if (element == null) {
-            throw new RuntimeException("Element entry/author/name not found.");
-        }
-
-        DocumentHelper.setSimpleElementText(element, identity.getUser().getId());
-
-        // Replace date created, issued and modified
-        DateFormat datefmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
-        DateFormat ofsfmt = new SimpleDateFormat("Z");
-        Date date = new Date();
-
-        String dateofs = ofsfmt.format(date);
-        String datestr = datefmt.format(date) + dateofs.substring(0, 3) + ":"
-                + dateofs.substring(3, 5);
-
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'created']");
-        DocumentHelper.setSimpleElementText(element, datestr);
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'issued']");
-        DocumentHelper.setSimpleElementText(element, datestr);
-        element = (Element) XPathAPI.selectSingleNode(parent,
-                "/*[local-name() = 'entry']/*[local-name() = 'modified']");
-        DocumentHelper.setSimpleElementText(element, datestr);
-    }
 }

Modified: lenya/trunk/src/pubs/blog/java/src/org/apache/lenya/cms/site/usecases/CreateBlogEntry.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/java/src/org/apache/lenya/cms/site/usecases/CreateBlogEntry.java?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/pubs/blog/java/src/org/apache/lenya/cms/site/usecases/CreateBlogEntry.java (original)
+++ lenya/trunk/src/pubs/blog/java/src/org/apache/lenya/cms/site/usecases/CreateBlogEntry.java Fri May 19 05:08:10 2006
@@ -28,6 +28,7 @@
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.Session;
 import org.apache.lenya.ac.Identity;
+import org.apache.lenya.cms.cocoon.source.SourceUtil;
 import org.apache.lenya.cms.metadata.dublincore.DublinCore;
 import org.apache.lenya.cms.publication.Document;
 import org.apache.lenya.cms.publication.DocumentIdentityMap;
@@ -39,6 +40,9 @@
 import org.apache.lenya.cms.site.SiteUtil;
 import org.apache.lenya.cms.usecase.DocumentUsecase;
 import org.apache.lenya.cms.usecase.UsecaseException;
+import org.apache.lenya.xml.DocumentHelper;
+import org.apache.xpath.XPathAPI;
+import org.w3c.dom.Element;
 
 /**
  * Usecase to create a Blog entry.
@@ -101,12 +105,6 @@
         // prepare values necessary for blog entry creation
         Document parent = getSourceDocument();
         String language = parent.getPublication().getDefaultLanguage();
-        Map objectModel = ContextHelper.getObjectModel(getContext());
-        Request request = ObjectModelHelper.getRequest(objectModel);
-        Session session = request.getSession(false);
-        HashMap allParameters = new HashMap();
-        allParameters.put(Identity.class.getName(), session.getAttribute(Identity.class.getName()));
-        allParameters.put("title", getParameterAsString(DublinCore.ELEMENT_TITLE));
 
         // create new document
         // implementation note: since blog does not have a hierarchy,
@@ -115,6 +113,7 @@
         DocumentManager documentManager = null;
         ServiceSelector selector = null;
         ResourceType resourceType = null;
+
         try {
             selector = (ServiceSelector) this.manager.lookup(ResourceType.ROLE + "Selector");
             resourceType = (ResourceType) selector.select(getDocumentTypeName());
@@ -134,7 +133,9 @@
                     "xml",
                     getParameterAsString(DublinCore.ELEMENT_TITLE),
                     true,
-                    allParameters);
+                    new HashMap());
+
+            transformXML(document);
         } finally {
             if (documentManager != null) {
                 this.manager.release(documentManager);
@@ -202,5 +203,80 @@
      */
     protected String getDocumentTypeName() {
         return getParameterAsString(DOCUMENT_TYPE);
+    }
+
+    protected void transformXML(Document document) throws Exception {
+
+        Map objectModel = ContextHelper.getObjectModel(getContext());
+        Request request = ObjectModelHelper.getRequest(objectModel);
+        Session session = request.getSession(false);
+        Identity identity = (Identity) session.getAttribute(Identity.class.getName());
+        String title = getParameterAsString(DublinCore.ELEMENT_TITLE);
+
+        org.w3c.dom.Document xmlDoc = SourceUtil.readDOM(document.getSourceURI(), this.manager);
+
+        Element parent = xmlDoc.getDocumentElement();
+
+        if (getLogger().isDebugEnabled())
+            getLogger().debug("NewBlogEntryCreator.transformXML(): " + document);
+
+        String[] steps = document.getId().split("/");
+        String nodeId = steps[5];
+
+        // Replace id
+        Element element = (Element) XPathAPI.selectSingleNode(parent,
+                "/*[local-name() = 'entry']/*[local-name() = 'id']");
+
+        String year = steps[2];
+        String month = steps[3];
+        String day = steps[4];
+
+        DocumentHelper.setSimpleElementText(element, year + "/" + month + "/" + day + "/" + nodeId);
+
+        // Replace title
+        element = (Element) XPathAPI.selectSingleNode(parent,
+                "/*[local-name() = 'entry']/*[local-name() = 'title']");
+        DocumentHelper.setSimpleElementText(element, title);
+
+        element = (Element) XPathAPI.selectSingleNode(parent,
+                "/*[local-name() = 'entry']/*[local-name() = 'link']");
+        element.setAttribute("rel", "alternate");
+        element.setAttribute("href", "");
+        element.setAttribute("type", "text/xml");
+
+        // Replace Summary
+        element = (Element) XPathAPI.selectSingleNode(parent,
+                "/*[local-name() = 'entry']/*[local-name() = 'summary']");
+        DocumentHelper.setSimpleElementText(element, "Summary");
+
+        element = (Element) XPathAPI.selectSingleNode(parent,
+                "/*[local-name() = 'entry']/*[local-name() = 'author']/*[local-name() = 'name']");
+
+        if (element == null) {
+            throw new RuntimeException("Element entry/author/name not found.");
+        }
+
+        DocumentHelper.setSimpleElementText(element, identity.getUser().getId());
+
+        // Replace date created, issued and modified
+        DateFormat datefmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
+        DateFormat ofsfmt = new SimpleDateFormat("Z");
+        Date date = new Date();
+
+        String dateofs = ofsfmt.format(date);
+        String datestr = datefmt.format(date) + dateofs.substring(0, 3) + ":"
+                + dateofs.substring(3, 5);
+
+        element = (Element) XPathAPI.selectSingleNode(parent,
+                "/*[local-name() = 'entry']/*[local-name() = 'created']");
+        DocumentHelper.setSimpleElementText(element, datestr);
+        element = (Element) XPathAPI.selectSingleNode(parent,
+                "/*[local-name() = 'entry']/*[local-name() = 'issued']");
+        DocumentHelper.setSimpleElementText(element, datestr);
+        element = (Element) XPathAPI.selectSingleNode(parent,
+                "/*[local-name() = 'entry']/*[local-name() = 'modified']");
+        DocumentHelper.setSimpleElementText(element, datestr);
+
+        SourceUtil.writeDOM(xmlDoc, document.getSourceURI(), this.manager);
     }
 }

Modified: lenya/trunk/src/pubs/blog/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/sitemap.xmap?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/pubs/blog/sitemap.xmap (original)
+++ lenya/trunk/src/pubs/blog/sitemap.xmap Fri May 19 05:08:10 2006
@@ -98,7 +98,7 @@
             <map:transform src="fallback://lenya/xslt/rc/toDoc.xsl"/>
           </map:when>
           <map:otherwise>
-            <map:generate src="lenya://lenya/pubs/blog/content/{1}/entries/{2}/{3}/{4}/{5}/index.xml"/>
+            <map:generate src="lenyadoc:/en//entries/{2}/{3}/{4}/{5}/index"/>
           </map:otherwise>
         </map:select>
         <map:serialize type="xml"/>
@@ -112,7 +112,7 @@
             <map:transform src="fallback://lenya/xslt/rc/toDoc.xsl"/>
           </map:when>
           <map:otherwise>
-            <map:generate src="content/{1}/entries/{2}/{3}/{4}/{5}/index.xml"/>
+            <map:generate src="lenyadoc:/en//entries/{2}/{3}/{4}/{5}/index"/>
             <map:transform src="xslt/feed/atom2other.xsl">
               <map:parameter name="type" value="rss"/>
               <map:parameter name="url" value="{global:blog-url}"/>
@@ -125,7 +125,7 @@
       
       <map:match pattern="*/entries/*/*/*/*/lenya-body.xml">
         <map:aggregate element="feed">
-          <map:part src="lenya://lenya/pubs/blog/content/{1}/feeds/all/index.xml"/>
+          <map:part src="lenyadoc:/en//feeds/all/index"/>
           <map:part src="cocoon:/{1}/entries/{2}/{3}/{4}/{5}/index.xml"/>
           <map:part src="lenya://lenya/pubs/blog/content/{1}/sidebar.xml"/>
           <map:part src="cocoon:/{1}/overview?struct=23"/>
@@ -222,7 +222,7 @@
       </map:match>
       <map:match pattern="*/overview/lenya-page-body.xml">
         <map:aggregate element="cmsbody">
-          <map:part src="content/{1}/feeds/all/index.xml"/>
+          <map:part src="lenyadoc:/en//feeds/all"/>
           <map:part src="content/{1}/sidebar.xml"/>
           <map:part src="cocoon:/{1}/overview"/>
           <map:part src="cocoon:/{1}/overview?struct=23"/>

Modified: lenya/trunk/src/pubs/blog/xslt/feed/xinclude.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/blog/xslt/feed/xinclude.xsl?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/pubs/blog/xslt/feed/xinclude.xsl (original)
+++ lenya/trunk/src/pubs/blog/xslt/feed/xinclude.xsl Fri May 19 05:08:10 2006
@@ -22,11 +22,11 @@
   </xsl:template>
   <xsl:template match="blog:blog">
     <echo:feed xmlns:echo="http://purl.org/atom/ns#" xmlns="http://www.w3.org/1999/xhtml" version="0.3" xml:lang="en">
-      <xi:include href="lenya://lenya/pubs/blog/content/{$area}/feeds/{$feedid}/index.xml#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:title)"/>
-      <xi:include href="lenya://lenya/pubs/blog/content/{$area}/feeds/{$feedid}/index.xml#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:link)"/>
-      <xi:include href="lenya://lenya/pubs/blog/content/{$area}/feeds/{$feedid}/index.xml#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:modified)"/>
+      <xi:include href="lenyadoc:/en//feeds/{$feedid}/index#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:title)"/>
+      <xi:include href="lenyadoc:/en//feeds/{$feedid}/index#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:link)"/>
+      <xi:include href="lenyadoc:/en//feeds/{$feedid}/index#xmlns(atom=http://purl.org/atom/ns#)xpointer(/atom:feed/atom:modified)"/>
       <xsl:for-each select="blog:entry">
-        <xi:include href="lenya://lenya/pubs/blog/content/{$area}{@docid}.xml"/>
+        <xi:include href="lenyadoc:/en/{@docid}"/>
       </xsl:for-each>
     </echo:feed>
   </xsl:template>

Added: lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_en
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_en?rev=407776&view=auto
==============================================================================
Binary file - no diff available.

Propchange: lenya/trunk/src/pubs/default/content/authoring/doctypes/opendocument/index_en
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: lenya/trunk/src/pubs/default/content/authoring/tutorial/new_doctype/index_en
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/content/authoring/tutorial/new_doctype/index_en?rev=407776&view=auto
==============================================================================
--- lenya/trunk/src/pubs/default/content/authoring/tutorial/new_doctype/index_en (added)
+++ lenya/trunk/src/pubs/default/content/authoring/tutorial/new_doctype/index_en Fri May 19 05:08:10 2006
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml" 
+xmlns:xhtml="http://www.w3.org/1999/xhtml" 
+xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0">
+
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  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.
+-->
+
+<!-- $Id: index_en.xml 169299 2005-05-09 12:00:43Z jwkaltz $ -->
+  <head>
+    <title>Lenya Tutorial - How to create a new doctype</title>
+  </head>
+  <body>
+    <h1>Lenya Tutorial - How to create a new doctype</h1>
+
+    <p>NOTE: Also see the <a href="http://wiki.apache.org/lenya/AddingCustomDocType">Wiki</a></p>
+
+    <h2>The standard way</h2>
+
+    <p>
+    Add a link where people can click on: <em>config/menus/menu.xsp</em>
+    </p>
+
+    <p>
+    Create a usecase sitemap where the "flow" is defined: <em>usecase-create-my_doctype.xmap</em>
+    </p>
+
+    <p>
+    Define what class shall be used for the actual creation: <em>config/doctypes/doctypes.xconf</em>
+    </p>
+    
+    <p>
+    In many cases a new document is created based on a sample: <em>config/doctypes/samples/my_doctype.xml</em>
+    The name of the sample needs to be configured within <em>config/doctypes/doctypes.xconf</em>
+    </p>
+    
+    <p>
+    Add doctype such that XSLT can be found: <em>parameter-doctype.xmap</em>
+    </p>
+    
+    <p>
+    Create XSLT: <em>xslt/my_doctype2xhtml.xsl</em>
+    </p>
+    
+    <p>
+    OPTIONAL: Create new menu: <em>menus.xmap</em>, <em>config/menus/my_doctype.xsp</em>
+    </p>
+    
+    <p>
+    Create workflow: <em>config/workflow/my_doctype.xml</em>, <em>config/doctypes/doctypes.xconf</em>
+    </p>
+
+  </body>
+</html>

Modified: lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap (original)
+++ lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap Fri May 19 05:08:10 2006
@@ -40,7 +40,7 @@
       <!-- parametrized doctype matcher -->
       <!-- pattern="{rendertype}" -->
       <map:match pattern="*.xml">
-        <map:generate src="lenya://lenya/pubs/{page-envelope:publication-id}/content/{page-envelope:area}/{page-envelope:document-path}"/>
+        <map:generate src="lenyadoc:/{page-envelope:document-language}/{page-envelope:document-id}"/>
         <map:transform src="fallback://lenya/modules/homepage/xslt/homepage2xhtml.xsl">
           <map:parameter name="rendertype" value="{request-param:rendertype}"/>
           <map:parameter name="nodeid" value="{page-envelope:document-name}"/>

Modified: lenya/trunk/src/targets/migration-build.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/targets/migration-build.xml?rev=407776&r1=407775&r2=407776&view=diff
==============================================================================
--- lenya/trunk/src/targets/migration-build.xml (original)
+++ lenya/trunk/src/targets/migration-build.xml Fri May 19 05:08:10 2006
@@ -22,6 +22,21 @@
   <description>
     Migration targets
   </description>
+  
+  <target name="migrate-extensions">
+    <property name="publication" value=""/>
+    <move todir="${build.webapp}/lenya/pubs">
+      <fileset dir="${build.webapp}/lenya/pubs/${publication}">
+        <include name="content/**"/>
+        <exclude name="content/*/site.xml"/>
+        <exclude name="content/*/sitetree.xml"/>
+      </fileset>
+      <compositemapper>
+        <mapper type="glob" from="*.xml" to="*"/>
+        <mapper type="glob" from="*.xml.meta" to="*.meta"/>
+      </compositemapper>
+    </move>
+  </target>
 
   <target name="migrate-14">
     <path id="migration.classpath">



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