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 2008/03/20 02:49:47 UTC
svn commit: r639108 -
/lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/AbstractLinkTransformer.java
Author: andreas
Date: Wed Mar 19 18:49:44 2008
New Revision: 639108
URL: http://svn.apache.org/viewvc?rev=639108&view=rev
Log:
Make AbstractLinkTransformer work with multiple matched attributes on a single element.
Modified:
lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/AbstractLinkTransformer.java
Modified: lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/AbstractLinkTransformer.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/AbstractLinkTransformer.java?rev=639108&r1=639107&r2=639108&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/AbstractLinkTransformer.java (original)
+++ lenya/trunk/src/modules-core/linking/java/src/org/apache/lenya/cms/cocoon/transformation/AbstractLinkTransformer.java Wed Mar 19 18:49:44 2008
@@ -222,22 +222,20 @@
this.indent += " ";
}
- AttributesImpl newAttrs = null;
-
Set configs = getMatchingConfigurations(uri, name, attrs);
+ AttributesImpl newAttrs = null;
if (!configs.isEmpty()) {
-
+ newAttrs = new AttributesImpl(attrs);
this.ignoreLinkElement = false;
for (Iterator i = configs.iterator(); i.hasNext(); ) {
AttributeConfiguration config = (AttributeConfiguration) i.next();
- String linkUrl = attrs.getValue(config.attribute);
+ String linkUrl = newAttrs.getValue(config.attribute);
try {
if (getLogger().isDebugEnabled()) {
getLogger().debug(this.indent + "link URL: [" + linkUrl + "]");
}
- newAttrs = new AttributesImpl(attrs);
handleLink(linkUrl, config, newAttrs);
} catch (final Exception e) {
getLogger().error("startElement failed: ", e);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org