You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2006/03/09 09:13:39 UTC
svn commit: r384456 - in /cocoon/branches/BRANCH_2_1_X:
src/blocks/portal/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java
status.xml
Author: cziegeler
Date: Thu Mar 9 00:13:36 2006
New Revision: 384456
URL: http://svn.apache.org/viewcvs?rev=384456&view=rev
Log:
Remove "external" attribute from coplet links.
Modified:
cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java
cocoon/branches/BRANCH_2_1_X/status.xml
Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java?rev=384456&r1=384455&r2=384456&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/portal/java/org/apache/cocoon/portal/transformation/HTMLEventLinkTransformer.java Thu Mar 9 00:13:36 2006
@@ -68,10 +68,12 @@
throws SAXException {
boolean processed = false;
if ("a".equals(name) ) {
+ final AttributesImpl a = this.getMutableAttributes(attr);
+ attr = a;
boolean convert = false;
final boolean isRemoteAnchor = this.isRemoteAnchor(attr);
if ( isRemoteAnchor ) {
- convert = !this.isExternalLink(attr);
+ convert = !this.isExternalLink(a);
}
this.stack.push(convert ? Boolean.TRUE: Boolean.FALSE);
if ( convert ) {
@@ -79,7 +81,9 @@
processed = true;
}
} else if ("form".equals(name) ) {
- boolean convert = !this.isExternalForm(attr);
+ final AttributesImpl a = this.getMutableAttributes(attr);
+ attr = a;
+ boolean convert = !this.isExternalForm(a);
this.stack.push(convert ? Boolean.TRUE: Boolean.FALSE);
if ( convert ) {
this.createFormEvent(attr);
@@ -201,8 +205,12 @@
* @param attributes attributes of the node
* @return true if the attribute 'external' is 'true'
*/
- private boolean isExternalLink (Attributes attributes) {
+ private boolean isExternalLink (AttributesImpl attributes) {
final String external = attributes.getValue("external");
+ // remote attribute
+ if ( external != null ) {
+ attributes.removeAttribute("external");
+ }
// links to external documents will be not transformed to portal links
if (external != null && external.trim().length() > 0
&& external.trim().toLowerCase().equals ("true") ) {
@@ -225,8 +233,12 @@
* @param attributes attributes of the node
* @return True if the action is external.
*/
- private boolean isExternalForm(Attributes attributes) {
+ private boolean isExternalForm(AttributesImpl attributes) {
final String external = attributes.getValue("external");
+ // remote attribute
+ if ( external != null ) {
+ attributes.removeAttribute("external");
+ }
// links to external documents will be not transformed to portal links
if (external != null && external.trim().length() > 0
&& external.trim().toLowerCase().equals ("true") ) {
Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/status.xml?rev=384456&r1=384455&r2=384456&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Thu Mar 9 00:13:36 2006
@@ -181,6 +181,9 @@
-->
<release version="2.1.9" date="TBD">
<action dev="CZ" type="fix">
+ Portal Block: Remove "external" attribute from coplet links.
+ </action>
+ <action dev="CZ" type="fix">
Portal Block: Fix handling of several instances of the same portlet where all instances
showed the contents of the last portlet instance. This only applies to JSR-168 portlets,
not to coplets.