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 2007/02/19 11:43:08 UTC

svn commit: r509150 - in /lenya/trunk/src: modules-core/linking/config/sitemap/ modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/ modules/editors/ modules/editors/java/src/org/apache/lenya/cms/editors/ modules/kupu/ modules/luce...

Author: andreas
Date: Mon Feb 19 02:43:07 2007
New Revision: 509150

URL: http://svn.apache.org/viewvc?view=rev&rev=509150
Log:
Renamed LinkRewritingTransformer to UuidToUrlTransformer, introduced UrlToUuidTransformer

Added:
    lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UrlToUuidTransformer.java
    lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UuidToUrlTransformer.java
      - copied, changed from r507530, lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java
Removed:
    lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java
Modified:
    lenya/trunk/src/modules-core/linking/config/sitemap/transformers.xmap
    lenya/trunk/src/modules/editors/java/src/org/apache/lenya/cms/editors/EditDocument.java
    lenya/trunk/src/modules/editors/sitemap.xmap
    lenya/trunk/src/modules/kupu/sitemap.xmap
    lenya/trunk/src/modules/lucene/sitemap.xmap
    lenya/trunk/src/modules/webdav/java/src/org/apache/lenya/cms/usecases/webdav/Put.java
    lenya/trunk/src/modules/webdav/sitemap.xmap
    lenya/trunk/src/modules/xhtml/sitemap.xmap
    lenya/trunk/src/pubs/default/sitemap.xmap

Modified: lenya/trunk/src/modules-core/linking/config/sitemap/transformers.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/linking/config/sitemap/transformers.xmap?view=diff&rev=509150&r1=509149&r2=509150
==============================================================================
--- lenya/trunk/src/modules-core/linking/config/sitemap/transformers.xmap (original)
+++ lenya/trunk/src/modules-core/linking/config/sitemap/transformers.xmap Mon Feb 19 02:43:07 2007
@@ -18,6 +18,12 @@
 
 <xmap xpath="/sitemap/components/transformers" 
   unless="/sitemap/components/transformers/transformer[@name = 'link-rewrite']"
-  xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-  <map:transformer name="link-rewrite" logger="lenya.sitemap.transformer.link-rewrite" src="org.apache.lenya.cms.cocoon.transformation.LinkRewritingTransformer"/>
+  xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  
+  <map:transformer name="uuid2url" logger="lenya.sitemap.transformer.uuid2url"
+    src="org.apache.lenya.cms.cocoon.transformation.UuidToUrlTransformer"/>
+    
+  <map:transformer name="url2uuid" logger="lenya.sitemap.transformer.url2uuid"
+    src="org.apache.lenya.cms.cocoon.transformation.UrlToUuidTransformer"/>
+    
 </xmap>

Added: lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UrlToUuidTransformer.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UrlToUuidTransformer.java?view=auto&rev=509150
==============================================================================
--- lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UrlToUuidTransformer.java (added)
+++ lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UrlToUuidTransformer.java Mon Feb 19 02:43:07 2007
@@ -0,0 +1,272 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You 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.
+ *
+ */
+package org.apache.lenya.cms.cocoon.transformation;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Map;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.transformation.AbstractSAXTransformer;
+import org.apache.lenya.ac.AccessControlException;
+import org.apache.lenya.cms.linking.Link;
+import org.apache.lenya.cms.linking.LinkResolver;
+import org.apache.lenya.cms.publication.Document;
+import org.apache.lenya.cms.publication.DocumentFactory;
+import org.apache.lenya.cms.publication.DocumentUtil;
+import org.apache.lenya.cms.repository.RepositoryUtil;
+import org.apache.lenya.cms.repository.Session;
+import org.apache.lenya.util.ServletHelper;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.AttributesImpl;
+
+/**
+ * <p>
+ * URL to UUID transformer.
+ * </p>
+ * 
+ * <p>
+ * This transformer is applied to an XHMTL document. It processes all URL-based
+ * links to links following the {@link LinkResolver} syntax.
+ * </p>
+ * 
+ * $Id: LinkRewritingTransformer.java,v 1.7 2004/03/16 11:12:16 gregor
+ */
+public class UrlToUuidTransformer extends AbstractSAXTransformer {
+
+    private boolean ignoreLinkElement = false;
+    private Document currentDocument;
+    private DocumentFactory factory;
+    private String contextPath;
+
+    /**
+     * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(org.apache.cocoon.environment.SourceResolver,
+     *      java.util.Map, java.lang.String,
+     *      org.apache.avalon.framework.parameters.Parameters)
+     */
+    public void setup(SourceResolver _resolver, Map _objectModel, String _source,
+            Parameters _parameters) throws ProcessingException, SAXException, IOException {
+        super.setup(_resolver, _objectModel, _source, _parameters);
+
+        Request _request = ObjectModelHelper.getRequest(_objectModel);
+        this.contextPath = _request.getContextPath();
+
+        try {
+            Session session = RepositoryUtil.getSession(this.manager, _request);
+            this.factory = DocumentUtil.createDocumentFactory(this.manager, session);
+            String url = ServletHelper.getWebappURI(_request);
+            this.currentDocument = this.factory.getFromURL(url);
+        } catch (final Exception e1) {
+            throw new ProcessingException(e1);
+        }
+
+        if (getLogger().isDebugEnabled()) {
+            getLogger().debug("Setting up transformer");
+            getLogger().debug("    Processed version:       [" + getCurrentDocument() + "]");
+        }
+    }
+
+    /**
+     * Returns the currently processed document.
+     * 
+     * @return A document.
+     */
+    protected Document getCurrentDocument() {
+        return this.currentDocument;
+    }
+
+    private String indent = "";
+
+    /**
+     * @see org.xml.sax.ContentHandler#startElement(java.lang.String,
+     *      java.lang.String, java.lang.String, org.xml.sax.Attributes)
+     */
+    public void startElement(String uri, String name, String qname, Attributes attrs)
+            throws SAXException {
+
+        if (getLogger().isDebugEnabled()) {
+            getLogger().debug(
+                    this.indent + "<" + qname + "> (ignoreAElement = " + this.ignoreLinkElement
+                            + ")");
+            this.indent += "  ";
+        }
+
+        AttributesImpl newAttrs = null;
+        if (lookingAtLinkElement(name)) {
+
+            this.ignoreLinkElement = false;
+
+            for (int i = 0; i < UuidToUrlTransformer.attributeNames.length; i++) {
+                String completeUrl = attrs.getValue(UuidToUrlTransformer.attributeNames[i]);
+                if (completeUrl != null) {
+                    try {
+                        newAttrs = new AttributesImpl(attrs);
+
+                        if (getLogger().isDebugEnabled()) {
+                            getLogger().debug(this.indent + "link URL: [" + completeUrl + "]");
+                        }
+
+                        String pubId = this.currentDocument.getPublication().getId();
+                        String area = this.currentDocument.getArea();
+
+                        if (completeUrl.startsWith(this.contextPath + "/" + pubId + "/" + area
+                                + "/")) {
+                            final String webappUrl = completeUrl.substring(this.contextPath
+                                    .length());
+
+                            String anchor = null;
+                            String url = null;
+
+                            int anchorIndex = webappUrl.indexOf("#");
+                            if (anchorIndex > -1) {
+                                url = webappUrl.substring(0, anchorIndex);
+                                anchor = webappUrl.substring(anchorIndex + 1);
+                            } else {
+                                url = webappUrl;
+                            }
+
+                            String[] linkUrlAndQuery = url.split("\\?");
+                            String linkUrl = linkUrlAndQuery[0];
+                            String queryString = null;
+                            if (linkUrlAndQuery.length > 1) {
+                                queryString = linkUrlAndQuery[1];
+                            }
+
+                            if (factory.isDocument(linkUrl)) {
+                                Document targetDocument = factory.getFromURL(linkUrl);
+
+                                if (getLogger().isDebugEnabled()) {
+                                    getLogger().debug(
+                                            "Convert links: Check webapp URL [" + linkUrl + "]");
+                                }
+
+                                rewriteLink(newAttrs, UuidToUrlTransformer.attributeNames[i],
+                                        targetDocument, anchor, queryString);
+                            }
+                        }
+
+                    } catch (final Exception e) {
+                        getLogger().error("startElement failed: ", e);
+                        throw new SAXException(e);
+                    }
+                }
+            }
+        }
+
+        if (getLogger().isDebugEnabled()) {
+            getLogger().debug(this.indent + "ignoreAElement: " + this.ignoreLinkElement);
+        }
+
+        if (!(lookingAtLinkElement(name) && this.ignoreLinkElement)) {
+            if (newAttrs != null) {
+                attrs = newAttrs;
+            }
+            super.startElement(uri, name, qname, attrs);
+            if (getLogger().isDebugEnabled()) {
+                getLogger().debug(this.indent + "<" + qname + "> sent");
+            }
+        }
+    }
+
+    /**
+     * Rewrites a link.
+     * 
+     * @param newAttrs The new attributes.
+     * @param attributeName The name of the attribute to rewrite.
+     * @param targetDocument The target document.
+     * @param anchor The anchor (the string after the # character in the URL).
+     * @param queryString The query string without question mark.
+     * @param extension The extension to use.
+     * @throws AccessControlException when something went wrong.
+     */
+    protected void rewriteLink(AttributesImpl newAttrs, String attributeName,
+            Document targetDocument, String anchor, String queryString)
+            throws AccessControlException {
+
+        Link link = new Link();
+        link.setUuid(targetDocument.getUUID());
+
+        String linkUri = link.getUri();
+
+        if (anchor != null) {
+            linkUri += "#" + anchor;
+        }
+
+        if (queryString != null) {
+            linkUri += "?" + queryString;
+        }
+
+        if (getLogger().isDebugEnabled()) {
+            getLogger().debug(this.indent + "Rewriting URL to: [" + linkUri + "]");
+        }
+
+        setAttribute(newAttrs, attributeName, linkUri);
+    }
+
+    /**
+     * Sets the value of the href attribute.
+     * 
+     * @param attr The attributes.
+     * @param name The attribute name.
+     * @param value The value.
+     * @throws IllegalArgumentException if the href attribute is not contained
+     *         in this attributes.
+     */
+    protected void setAttribute(AttributesImpl attr, String name, String value) {
+        int position = attr.getIndex(name);
+        if (position == -1) {
+            throw new IllegalArgumentException("The href attribute is not available!");
+        }
+        attr.setValue(position, value);
+    }
+
+    /**
+     * @see org.xml.sax.ContentHandler#endElement(java.lang.String,
+     *      java.lang.String, java.lang.String)
+     */
+    public void endElement(String uri, String name, String qname) throws SAXException {
+        if (getLogger().isDebugEnabled()) {
+            this.indent = this.indent.substring(2);
+            getLogger().debug(this.indent + "</" + qname + ">");
+        }
+        if (lookingAtLinkElement(name) && this.ignoreLinkElement) {
+            this.ignoreLinkElement = false;
+        } else {
+            if (getLogger().isDebugEnabled()) {
+                getLogger().debug(this.indent + "</" + qname + "> sent");
+            }
+            super.endElement(uri, name, qname);
+        }
+    }
+
+    private boolean lookingAtLinkElement(String name) {
+        return Arrays.asList(UuidToUrlTransformer.elementNames).contains(name);
+    }
+
+    /**
+     * @see org.apache.avalon.excalibur.pool.Recyclable#recycle()
+     */
+    public void recycle() {
+        this.ignoreLinkElement = false;
+    }
+}
\ No newline at end of file

Copied: lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UuidToUrlTransformer.java (from r507530, lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java)
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UuidToUrlTransformer.java?view=diff&rev=509150&p1=lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java&r1=507530&p2=lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UuidToUrlTransformer.java&r2=509150
==============================================================================
--- lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/LinkRewritingTransformer.java (original)
+++ lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UuidToUrlTransformer.java Mon Feb 19 02:43:07 2007
@@ -52,7 +52,7 @@
 
 /**
  * <p>
- * Link rewriting transformer.
+ * UUID to URL transformer.
  * </p>
  * 
  * <p>
@@ -76,7 +76,7 @@
  * 
  * $Id: LinkRewritingTransformer.java,v 1.7 2004/03/16 11:12:16 gregor
  */
-public class LinkRewritingTransformer extends AbstractSAXTransformer implements Disposable {
+public class UuidToUrlTransformer extends AbstractSAXTransformer implements Disposable {
 
     protected static final String BROKEN_ATTRIB = "class";
     protected static final String BROKEN_VALUE = "brokenlink";
@@ -157,8 +157,8 @@
 
     private String indent = "";
 
-    protected String[] elementNames = { "a", "object", "img" };
-    protected String[] attributeNames = { "href", "src", "data" };
+    protected static final String[] elementNames = { "a", "object", "img" };
+    protected static final String[] attributeNames = { "href", "src", "data" };
 
     /**
      * @see org.xml.sax.ContentHandler#startElement(java.lang.String,
@@ -357,7 +357,7 @@
     }
 
     private boolean lookingAtLinkElement(String name) {
-        return Arrays.asList(this.elementNames).contains(name);
+        return Arrays.asList(elementNames).contains(name);
     }
 
     /**

Modified: lenya/trunk/src/modules/editors/java/src/org/apache/lenya/cms/editors/EditDocument.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/editors/java/src/org/apache/lenya/cms/editors/EditDocument.java?view=diff&rev=509150&r1=509149&r2=509150
==============================================================================
--- lenya/trunk/src/modules/editors/java/src/org/apache/lenya/cms/editors/EditDocument.java (original)
+++ lenya/trunk/src/modules/editors/java/src/org/apache/lenya/cms/editors/EditDocument.java Mon Feb 19 02:43:07 2007
@@ -18,7 +18,6 @@
 package org.apache.lenya.cms.editors;
 
 import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.linking.LinkConverter;
 import org.apache.lenya.cms.publication.Document;
 import org.apache.lenya.cms.publication.ResourceType;
 import org.apache.lenya.cms.repository.Node;
@@ -84,10 +83,6 @@
 
         if (!hasErrors()) {
             SourceUtil.writeDOM(xmlDoc, sourceDoc.getOutputStream());
-
-            LinkConverter converter = new LinkConverter(this.manager, getLogger());
-            converter.convertUrlsToUuids(getSourceDocument(), true);
-
             String event = getParameterAsString(EVENT, DEFAULT_EVENT);
             WorkflowUtil
                     .invoke(this.manager, getSession(), getLogger(), getSourceDocument(), event);

Modified: lenya/trunk/src/modules/editors/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/editors/sitemap.xmap?view=diff&rev=509150&r1=509149&r2=509150
==============================================================================
--- lenya/trunk/src/modules/editors/sitemap.xmap (original)
+++ lenya/trunk/src/modules/editors/sitemap.xmap Mon Feb 19 02:43:07 2007
@@ -73,6 +73,7 @@
       
       <map:match pattern="stream.xml">
         <map:generate type="stream"/>
+        <map:transform type="url2uuid"/>
         <map:serialize type="xml"/>
       </map:match>
       

Modified: lenya/trunk/src/modules/kupu/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/kupu/sitemap.xmap?view=diff&rev=509150&r1=509149&r2=509150
==============================================================================
--- lenya/trunk/src/modules/kupu/sitemap.xmap (original)
+++ lenya/trunk/src/modules/kupu/sitemap.xmap Mon Feb 19 02:43:07 2007
@@ -144,7 +144,7 @@
         <map:match pattern="content" type="step">
           <map:match pattern="*/authoring/**">
             <map:generate src="lenyadoc:/{page-envelope:document-language}/{page-envelope:document-uuid}"/>
-            <map:transform type="link-rewrite"/>
+            <map:transform type="uuid2url"/>
             <map:transform 
               src="fallback://lenya/modules/kupu/resources/kupu/apache-lenya/lenya/content2edit.xsl">
               <map:parameter name="css" 

Modified: lenya/trunk/src/modules/lucene/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/lucene/sitemap.xmap?view=diff&rev=509150&r1=509149&r2=509150
==============================================================================
--- lenya/trunk/src/modules/lucene/sitemap.xmap (original)
+++ lenya/trunk/src/modules/lucene/sitemap.xmap Mon Feb 19 02:43:07 2007
@@ -112,7 +112,7 @@
         </map:transform>
         
         <map:transform type="cinclude"/>
-        <map:transform type="link-rewrite"/>
+        <map:transform type="uuid2url"/>
         <map:transform type="i18n"/>
 
         <map:serialize type="xml"/>

Modified: lenya/trunk/src/modules/webdav/java/src/org/apache/lenya/cms/usecases/webdav/Put.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/webdav/java/src/org/apache/lenya/cms/usecases/webdav/Put.java?view=diff&rev=509150&r1=509149&r2=509150
==============================================================================
--- lenya/trunk/src/modules/webdav/java/src/org/apache/lenya/cms/usecases/webdav/Put.java (original)
+++ lenya/trunk/src/modules/webdav/java/src/org/apache/lenya/cms/usecases/webdav/Put.java Mon Feb 19 02:43:07 2007
@@ -27,7 +27,6 @@
 import org.apache.avalon.framework.service.ServiceSelector;
 import org.apache.excalibur.source.SourceResolver;
 import org.apache.lenya.cms.cocoon.source.SourceUtil;
-import org.apache.lenya.cms.linking.LinkConverter;
 import org.apache.lenya.cms.metadata.MetaData;
 import org.apache.lenya.cms.metadata.MetaDataException;
 import org.apache.lenya.cms.metadata.dublincore.DublinCore;
@@ -157,9 +156,6 @@
                     addErrorMessage("invalid source xml. Full exception: " + e);
                 }
             }
-            
-            LinkConverter converter = new LinkConverter(this.manager, getLogger());
-            converter.convertUrlsToUuids(doc, true);
 
             String event = getParameterAsString(EVENT);
             if (event != null) {

Modified: lenya/trunk/src/modules/webdav/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/webdav/sitemap.xmap?view=diff&rev=509150&r1=509149&r2=509150
==============================================================================
--- lenya/trunk/src/modules/webdav/sitemap.xmap (original)
+++ lenya/trunk/src/modules/webdav/sitemap.xmap Mon Feb 19 02:43:07 2007
@@ -93,6 +93,7 @@
       
       <map:match pattern="request/generate">
         <map:generate type="stream" />
+        <map:transform type="url2uuid"/>
         <map:serialize type="xml" />
       </map:match>
       
@@ -102,15 +103,15 @@
           | generate the input for the PUT method.
           + -->
       <map:match pattern="request/PUT/*">    
+        <map:generate type="stream">
+          <map:parameter name="defaultContentType" value="text/xml" />
+        </map:generate>
         <map:act type="resource-exists" src="fallback://lenya/modules/{page-envelope:document-type}/xslt/clean-{page-envelope:document-type}.xsl">
-          <map:generate type="stream">
-            <map:parameter name="defaultContentType" value="text/xml" />
-          </map:generate>
           <map:transform src="fallback://lenya/modules/{page-envelope:document-type}/xslt/clean-{page-envelope:document-type}.xsl"/>        
           <map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/>
-          <map:serialize type="xml" />
         </map:act>
-        <map:read type="request"/>
+        <map:transform type="url2uuid"/>
+        <map:serialize type="xml"/>
       </map:match>
       
     </map:pipeline>

Modified: lenya/trunk/src/modules/xhtml/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/xhtml/sitemap.xmap?view=diff&rev=509150&r1=509149&r2=509150
==============================================================================
--- lenya/trunk/src/modules/xhtml/sitemap.xmap (original)
+++ lenya/trunk/src/modules/xhtml/sitemap.xmap Mon Feb 19 02:43:07 2007
@@ -72,7 +72,7 @@
         <map:act type="set-header">
           <map:parameter name="Last-Modified" value="{date-iso8601-rfc822:{page-envelope:document-lastmodified}}" />
           <map:generate src="lenya-document:{page-envelope:document-uuid},lang={page-envelope:document-language}"/>
-          <map:transform type="link-rewrite"/>
+          <map:transform type="uuid2url"/>
           <map:serialize type="xml-get"/>
         </map:act>
       </map:match>

Modified: lenya/trunk/src/pubs/default/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/sitemap.xmap?view=diff&rev=509150&r1=509149&r2=509150
==============================================================================
--- lenya/trunk/src/pubs/default/sitemap.xmap (original)
+++ lenya/trunk/src/pubs/default/sitemap.xmap Mon Feb 19 02:43:07 2007
@@ -151,7 +151,7 @@
       <!-- /lenyabody-{rendertype}/{publication-id}/{area}/{doctype}/{url} -->
       <map:match pattern="lenyabody-*/*/*/*/**">
         <map:generate src="cocoon:/lenyabody-raw-{1}/{2}/{3}/{page-envelope:default-language}/{page-envelope:document-language}/{4}/{5}"/>
-        <map:transform type="link-rewrite"/>
+        <map:transform type="uuid2url"/>
         <map:transform src="fallback://lenya/modules/svg/xslt/image2svg.xsl"/>
         <map:select type="resource-exists">
           <map:parameter name="prefix" value="fallback://"/>
@@ -214,7 +214,7 @@
         <map:transform type="i18n">      
           <map:parameter name="locale" value="{page-envelope:document-language}"/>
         </map:transform>
-        <map:transform type="link-rewrite"/>
+        <map:transform type="uuid2url"/>
         <map:serialize type="xml"/>
       </map:match>
     </map:pipeline>



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