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/05/30 14:58:59 UTC

svn commit: r542812 - /lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UuidToUrlTransformer.java

Author: andreas
Date: Wed May 30 05:58:58 2007
New Revision: 542812

URL: http://svn.apache.org/viewvc?view=rev&rev=542812
Log:
[minor change] added javadocs for uuid2url configuration, code formatting

Modified:
    lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UuidToUrlTransformer.java

Modified: lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UuidToUrlTransformer.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=542812&r1=542811&r2=542812
==============================================================================
--- lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UuidToUrlTransformer.java (original)
+++ lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/UuidToUrlTransformer.java Wed May 30 05:58:58 2007
@@ -64,8 +64,8 @@
  * 
  * <p>
  * This transformer is applied to an XHMTL document. It processes all links
- * following the {@link LinkResolver} syntax which are denoted by
- * {@link org.apache.lenya.cms.publication.ResourceType#getLinkAttributeXPaths()}.
+ * following the {@link LinkResolver} syntax which are configured using
+ * <code>&lt;transform/&gt;</code> elements (see below).
  * </p>
  * <p>
  * These links are resolved using the following rules:
@@ -90,15 +90,17 @@
  * either configure this when declaring the transformer:
  * </p>
  * <code><pre>
- *   &lt;map:transformer ... &gt;
- *     &lt;urls type=&quot;relative&quot;/&gt;
- *   &lt;/map:transformer&gt;
+ * &lt;map:transformer ... &gt;
+ *   &lt;urls type="relative"/&gt;
+ *   &lt;transform namespace="http://www.w3.org/1999/xhtml" element="a" attribute="href"/&gt;
+ *   &lt;transform namespace="..." ... /&gt;
+ * &lt;/map:transformer&gt;
  * </pre></code>
  * <p>
  * or pass a parameter:
  * </p>
  * <code><pre>
- *  &lt;map:parameter name=&quot;urls&quot; value=&quot;relative&quot;/&gt;
+ * &lt;map:parameter name=&quot;urls&quot; value=&quot;relative&quot;/&gt;
  * </pre></code>
  * 
  * $Id: LinkRewritingTransformer.java,v 1.7 2004/03/16 11:12:16 gregor
@@ -261,8 +263,8 @@
     protected static final String[] elementNames = { "a", "object", "img", "link" };
     protected static final String[] attributeNames = { "href", "src", "data" };
 
-    protected AttributeConfiguration[] getMatchingConfigurations(String namespace, String localName,
-            Attributes attrs) {
+    protected AttributeConfiguration[] getMatchingConfigurations(String namespace,
+            String localName, Attributes attrs) {
         List configs = new ArrayList();
         for (Iterator i = this.attributeConfigurations.iterator(); i.hasNext();) {
             AttributeConfiguration config = (AttributeConfiguration) i.next();
@@ -270,7 +272,8 @@
                 configs.add(config);
             }
         }
-        return (AttributeConfiguration[]) configs.toArray(new AttributeConfiguration[configs.size()]);
+        return (AttributeConfiguration[]) configs
+                .toArray(new AttributeConfiguration[configs.size()]);
     }
 
     /**
@@ -288,9 +291,9 @@
         }
 
         AttributesImpl newAttrs = null;
-        
+
         AttributeConfiguration[] configs = getMatchingConfigurations(uri, name, attrs);
-        
+
         if (configs.length > 0) {
 
             this.ignoreLinkElement = false;
@@ -533,7 +536,7 @@
             getLogger().debug(this.indent + "</" + qname + ">");
         }
         boolean matches = false;
-        for (Iterator i = this.attributeConfigurations.iterator(); i.hasNext(); ) {
+        for (Iterator i = this.attributeConfigurations.iterator(); i.hasNext();) {
             AttributeConfiguration config = (AttributeConfiguration) i.next();
             if (config.namespace.equals(uri) && config.element.equals(name)) {
                 matches = true;



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