You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2002/04/03 12:12:47 UTC

DO NOT REPLY [Bug 7711] New: - LinkSerializer doesn't process the archive attribute from applet elements

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7711>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7711

LinkSerializer doesn't process the archive attribute from applet elements

           Summary: LinkSerializer doesn't process the archive attribute
                    from applet elements
           Product: Cocoon 2
           Version: Current CVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: sitemap components
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: stephan@vern.chem.tu-berlin.de


The LinkSerializer doesn't process the archive attribute from applet elements.

Index: ExtendedXLinkPipe.java
===================================================================
RCS file:
/home/cvspublic/xml-cocoon2/src/java/org/apache/cocoon/xml/xlink/ExtendedXLinkPipe.java,v
retrieving revision 1.4
diff -u -r1.4 ExtendedXLinkPipe.java
--- ExtendedXLinkPipe.java	22 Feb 2002 07:03:59 -0000	1.4
+++ ExtendedXLinkPipe.java	3 Apr 2002 10:10:49 -0000
@@ -94,6 +94,28 @@
             simpleLink(background, null, null, null, null, null, uri, name,
raw, attr);
             return;
         }
+
+        // FIXME: This solution does only process one jar archive, normally the
archive attribute
+        //        could contain more than one archive separated by a comma.
+        String archive = attr.getValue(uri, "archive");
+        if (archive != null) {
+            if (archive.startsWith("/")) {
+                simpleLink(archive, null, null, null, null, null, uri, name,
raw, attr);
+            }
+            else
+            {  
+                String codebase = attr.getValue(uri, "codebase");
+                if (codebase != null) {
+                   
simpleLink(codebase.endsWith("/")?(codebase+archive):(codebase+"/"+archive), 
+                               null, null, null, null, null, uri, name, raw, attr);
+                }
+                else {
+                    simpleLink(archive, null, null, null, null, null, uri,
name, raw, attr);
+                }
+            }
+            return;
+        }
+
         super.startElement(uri, name, raw, attr);
     }
 
@@ -105,6 +127,8 @@
         if (srcIndex > -1) newattr.setValue(srcIndex, href);
         int backgroundIndex = attr.getIndex(uri, "background");
         if (backgroundIndex > -1) newattr.setValue(backgroundIndex, href);
+        int archiveIndex = attr.getIndex(uri, "archive");
+        if (archiveIndex > -1) newattr.setValue(archiveIndex, href);
         super.startElement(uri, name, raw, newattr);
     }
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org