manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1383901 - /manifoldcf/branches/CONNECTORS-518/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
Date Wed, 12 Sep 2012 12:11:14 GMT
Author: kwright
Date: Wed Sep 12 12:11:13 2012
New Revision: 1383901

URL: http://svn.apache.org/viewvc?rev=1383901&view=rev
Log:
Check in patch from Maciej.

Modified:
    manifoldcf/branches/CONNECTORS-518/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java

Modified: manifoldcf/branches/CONNECTORS-518/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-518/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java?rev=1383901&r1=1383900&r2=1383901&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-518/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-518/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
Wed Sep 12 12:11:13 2012
@@ -3436,6 +3436,7 @@ public class WikiConnector extends org.a
   {
     protected Map<String,String> namespaces;
     protected String canonical = null;
+	protected String nsid = null;
     
     public WikiGetNamespacesNsContext(XMLStream theStream, String namespaceURI, String localName,
String qName, Attributes atts,
       Map<String,String> namespaces)
@@ -3449,8 +3450,9 @@ public class WikiConnector extends org.a
     {
       if (qName.equals("ns"))
       {
+        nsid = atts.getValue("id");
         canonical = atts.getValue("canonical");
-        if (canonical != null)
+        if (canonical != null && nsid != null)
           return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
       return super.beginTag(namespaceURI,localName,qName,atts);
@@ -3463,11 +3465,11 @@ public class WikiConnector extends org.a
       String theTag = theContext.getQname();
       if (theTag.equals("ns"))
       {
-        if (canonical != null)
+        if (canonical != null && nsid != null)
         {
           // Pull down the data
           XMLStringContext sc = (XMLStringContext)theContext;
-          namespaces.put(sc.getValue(),canonical);
+          namespaces.put(sc.getValue(),nsid);
         }
         else
           super.endTag();



Mime
View raw message