manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1428143 - in /manifoldcf/trunk: ./ connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/
Date Thu, 03 Jan 2013 02:16:20 GMT
Author: kwright
Date: Thu Jan  3 02:16:20 2013
New Revision: 1428143

URL: http://svn.apache.org/viewvc?rev=1428143&view=rev
Log:
Fix for CONNECTORS-596. Use localName rather than qName for feed tags.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1428143&r1=1428142&r2=1428143&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Jan  3 02:16:20 2013
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 1.1-dev =====================
 
+CONNECTORS-596: RSS and Web connectors need to peel off any
+namespace qualifies from tag names when processing XML feeds.
+(David Morana, Karl Wright)
+
 CONNECTORS-594: Port Solr connector to use SolrJ, and add
 capability to work with SolrCloud installations.
 (Minoru Osuka, Ryan McKinley, Karl Wright)

Modified: manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java?rev=1428143&r1=1428142&r2=1428143&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
(original)
+++ manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/RSSConnector.java
Thu Jan  3 02:16:20 2013
@@ -3487,7 +3487,7 @@ public class RSSConnector extends org.ap
     protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes
atts)
       throws ManifoldCFException, ServiceInterruption
     {
-      if (qName.equals("rss"))
+      if (localName.equals("rss"))
       {
         // RSS feed detected
         outerTagCount++;
@@ -3495,19 +3495,19 @@ public class RSSConnector extends org.ap
           Logging.connectors.debug("RSS: Parsed bottom-level XML for RSS document '"+documentIdentifier+"'");
         return new RSSContextClass(theStream,namespaceURI,localName,qName,atts,documentIdentifier,activities,filter);
       }
-      else if (qName.equals("rdf:RDF"))
+      else if (localName.equals("RDF"))
       {
         // RDF/Atom feed detected
         outerTagCount++;
         return new RDFContextClass(theStream,namespaceURI,localName,qName,atts,documentIdentifier,activities,filter);
       }
-      else if (qName.equals("feed"))
+      else if (localName.equals("feed"))
       {
         // Basic feed detected
         outerTagCount++;
         return new FeedContextClass(theStream,namespaceURI,localName,qName,atts,documentIdentifier,activities,filter);
       }
-      else if (qName.equals("urlset") || qName.equals("sitemapindex"))
+      else if (localName.equals("urlset") || localName.equals("sitemapindex"))
       {
         // Sitemap detected
         outerTagCount++;
@@ -3523,12 +3523,12 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext context = theStream.getContext();
-      String tagName = context.getQname();
+      String tagName = context.getLocalname();
       if (tagName.equals("rss"))
       {
         rescanTimeSet = ((RSSContextClass)context).process();
       }
-      else if (tagName.equals("rdf:RDF"))
+      else if (tagName.equals("RDF"))
       {
         rescanTimeSet = ((RDFContextClass)context).process();
       }
@@ -3569,7 +3569,7 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       // Handle each channel
-      if (qName.equals("channel"))
+      if (localName.equals("channel"))
       {
         // Channel detected
         return new RSSChannelContextClass(theStream,namespaceURI,localName,qName,atts,documentIdentifier,activities,filter);
@@ -3584,7 +3584,7 @@ public class RSSConnector extends org.ap
     {
       // If it's our channel tag, process global channel information
       XMLContext context = theStream.getContext();
-      String tagName = context.getQname();
+      String tagName = context.getLocalname();
       if (tagName.equals("channel"))
       {
         rescanTimeSet = ((RSSChannelContextClass)context).process();
@@ -3626,12 +3626,12 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("ttl"))
+      if (localName.equals("ttl"))
       {
         // TTL value seen.  Prepare to record it, as a string.
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("item"))
+      else if (localName.equals("item"))
       {
         // Item seen.  We don't need any of the attributes etc., but we need to start a new
context.
         return new RSSItemContextClass(theStream,namespaceURI,localName,qName,atts,filter.getDechromedContentMode());
@@ -3644,7 +3644,7 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("ttl"))
         // If the current context must be the TTL one, record its data value.
         ttlValue = ((XMLStringContext)theContext).getValue();
@@ -3733,27 +3733,27 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("link"))
+      if (localName.equals("link"))
       {
         // "link" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("guid"))
+      else if (localName.equals("guid"))
       {
         // "guid" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("pubDate"))
+      else if (localName.equals("pubDate"))
       {
         // "pubDate" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("title"))
+      else if (localName.equals("title"))
       {
         // "title" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("category"))
+      else if (localName.equals("category"))
       {
         // "category" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
@@ -3766,13 +3766,13 @@ public class RSSConnector extends org.ap
         switch (dechromedContentMode)
         {
         case DECHROMED_NONE:
-          if (qName.equals("description"))
+          if (localName.equals("description"))
           {
             return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
           }
           break;
         case DECHROMED_DESCRIPTION:
-          if (qName.equals("description"))
+          if (localName.equals("description"))
           {
             try
             {
@@ -3794,7 +3794,7 @@ public class RSSConnector extends org.ap
           }
           break;
         case DECHROMED_CONTENT:
-          if (qName.equals("content"))
+          if (localName.equals("content"))
           {
             try
             {
@@ -3814,7 +3814,7 @@ public class RSSConnector extends org.ap
               throw new ManifoldCFException("IO exception creating temp file: "+e.getMessage(),e);
             }
           }
-          else if (qName.equals("description"))
+          else if (localName.equals("description"))
           {
             return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
           }
@@ -3832,7 +3832,7 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("link"))
       {
         linkField = ((XMLStringContext)theContext).getValue();
@@ -4044,12 +4044,12 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("ttl"))
+      if (localName.equals("ttl"))
       {
         // TTL value seen.  Prepare to record it, as a string.
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("item"))
+      else if (localName.equals("item"))
       {
         // Item seen.  We don't need any of the attributes etc., but we need to start a new
context.
         return new RDFItemContextClass(theStream,namespaceURI,localName,qName,atts,filter.getDechromedContentMode());
@@ -4062,7 +4062,7 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("ttl"))
         // If the current context must be the TTL one, record its data value.
         ttlValue = ((XMLStringContext)theContext).getValue();
@@ -4149,17 +4149,17 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("link"))
+      if (localName.equals("link"))
       {
         // "link" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("dc:date"))
+      else if (localName.equals("date"))
       {
         // "dc:date" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("title"))
+      else if (localName.equals("title"))
       {
         // "title" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
@@ -4169,13 +4169,13 @@ public class RSSConnector extends org.ap
         switch (dechromedContentMode)
         {
         case DECHROMED_NONE:
-          if (qName.equals("description"))
+          if (localName.equals("description"))
           {
             return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
           }
           break;
         case DECHROMED_DESCRIPTION:
-          if (qName.equals("description"))
+          if (localName.equals("description"))
           {
             try
             {
@@ -4197,7 +4197,7 @@ public class RSSConnector extends org.ap
           }
           break;
         case DECHROMED_CONTENT:
-          if (qName.equals("dc:content"))
+          if (localName.equals("content"))
           {
             try
             {
@@ -4217,7 +4217,7 @@ public class RSSConnector extends org.ap
               throw new ManifoldCFException("IO exception creating temp file: "+e.getMessage(),e);
             }
           }
-          else if (qName.equals("description"))
+          else if (localName.equals("description"))
           {
             return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
           }
@@ -4235,12 +4235,12 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("link"))
       {
         linkField = ((XMLStringContext)theContext).getValue();
       }
-      else if (theTag.equals("dc:date"))
+      else if (theTag.equals("date"))
       {
         pubDateField = ((XMLStringContext)theContext).getValue();
       }
@@ -4411,12 +4411,12 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("ttl"))
+      if (localName.equals("ttl"))
       {
         // TTL value seen.  Prepare to record it, as a string.
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("entry"))
+      else if (localName.equals("entry"))
       {
         // Item seen.  We don't need any of the attributes etc., but we need to start a new
context.
         return new FeedItemContextClass(theStream,namespaceURI,localName,qName,atts,filter.getDechromedContentMode());
@@ -4429,7 +4429,7 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("ttl"))
         // If the current context must be the TTL one, record its data value.
         ttlValue = ((XMLStringContext)theContext).getValue();
@@ -4517,7 +4517,7 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("link"))
+      if (localName.equals("link"))
       {
         // "link" tag
         String ref = atts.getValue("href");
@@ -4525,17 +4525,17 @@ public class RSSConnector extends org.ap
           linkField.add(ref);
         return super.beginTag(namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("published") || qName.equals("updated"))
+      else if (localName.equals("published") || localName.equals("updated"))
       {
         // "published" pr "updated" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("title"))
+      else if (localName.equals("title"))
       {
         // "title" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("category"))
+      else if (localName.equals("category"))
       {
         String category = atts.getValue("term");
         if (category != null && category.length() > 0)
@@ -4547,13 +4547,13 @@ public class RSSConnector extends org.ap
         switch (dechromedContentMode)
         {
         case DECHROMED_NONE:
-          if (qName.equals("subtitle"))
+          if (localName.equals("subtitle"))
           {
             return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
           }
           break;
         case DECHROMED_DESCRIPTION:
-          if (qName.equals("subtitle"))
+          if (localName.equals("subtitle"))
           {
             try
             {
@@ -4575,7 +4575,7 @@ public class RSSConnector extends org.ap
           }
           break;
         case DECHROMED_CONTENT:
-          if (qName.equals("content"))
+          if (localName.equals("content"))
           {
             try
             {
@@ -4595,7 +4595,7 @@ public class RSSConnector extends org.ap
               throw new ManifoldCFException("IO exception creating temp file: "+e.getMessage(),e);
             }
           }
-          else if (qName.equals("subtitle"))
+          else if (localName.equals("subtitle"))
           {
             return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
           }
@@ -4613,7 +4613,7 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("published") || theTag.equals("updated"))
       {
         pubDateField = ((XMLStringContext)theContext).getValue();
@@ -4804,7 +4804,7 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "url", nothing else.
-      if (qName.equals("url") || qName.equals("sitemap"))
+      if (localName.equals("url") || localName.equals("sitemap"))
       {
         // Item seen.  We don't need any of the attributes etc., but we need to start a new
context.
         return new UrlsetItemContextClass(theStream,namespaceURI,localName,qName,atts);
@@ -4817,7 +4817,7 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("url") || theTag.equals("sitemap"))
       {
         // It's an item.
@@ -4896,12 +4896,12 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "loc" and "lastmod", nothing else.
-      if (qName.equals("loc"))
+      if (localName.equals("loc"))
       {
         // "loc" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("lastmod"))
+      else if (localName.equals("lastmod"))
       {
         // "lastmod" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
@@ -4918,7 +4918,7 @@ public class RSSConnector extends org.ap
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("loc"))
       {
         linkField = ((XMLStringContext)theContext).getValue();

Modified: manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java?rev=1428143&r1=1428142&r2=1428143&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
(original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/WebcrawlerConnector.java
Thu Jan  3 02:16:20 2013
@@ -6111,7 +6111,7 @@ public class WebcrawlerConnector extends
     protected XMLContext beginTag(String namespaceURI, String localName, String qName, Attributes
atts)
       throws ManifoldCFException, ServiceInterruption
     {
-      if (qName.equals("rss"))
+      if (localName.equals("rss"))
       {
         // RSS feed detected
         outerTagCount++;
@@ -6119,19 +6119,19 @@ public class WebcrawlerConnector extends
           Logging.connectors.debug("WEB: Parsed bottom-level XML for RSS document '"+documentURI+"'");
         return new RSSContextClass(theStream,namespaceURI,localName,qName,atts,documentURI,handler);
       }
-      else if (qName.equals("rdf:RDF"))
+      else if (localName.equals("RDF"))
       {
         // RDF/Atom feed detected
         outerTagCount++;
         return new RDFContextClass(theStream,namespaceURI,localName,qName,atts,documentURI,handler);
       }
-      else if (qName.equals("feed"))
+      else if (localName.equals("feed"))
       {
         // Basic feed detected
         outerTagCount++;
         return new FeedContextClass(theStream,namespaceURI,localName,qName,atts,documentURI,handler);
       }
-      else if (qName.equals("urlset") || qName.equals("sitemapindex"))
+      else if (localName.equals("urlset") || localName.equals("sitemapindex"))
       {
         // Sitemap detected
         outerTagCount++;
@@ -6147,8 +6147,8 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext context = theStream.getContext();
-      String tagName = context.getQname();
-      if (tagName.equals("rdf:RDF"))
+      String tagName = context.getLocalname();
+      if (tagName.equals("RDF"))
       {
         ((RDFContextClass)context).process();
       }
@@ -6184,7 +6184,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       // Handle each channel
-      if (qName.equals("channel"))
+      if (localName.equals("channel"))
       {
         // Channel detected
         return new RSSChannelContextClass(theStream,namespaceURI,localName,qName,atts,documentURI,handler);
@@ -6199,7 +6199,7 @@ public class WebcrawlerConnector extends
     {
       // If it's our channel tag, process global channel information
       XMLContext context = theStream.getContext();
-      String tagName = context.getQname();
+      String tagName = context.getLocalname();
       if (tagName.equals("channel"))
       {
         ((RSSChannelContextClass)context).process();
@@ -6230,12 +6230,12 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("ttl"))
+      if (localName.equals("ttl"))
       {
         // TTL value seen.  Prepare to record it, as a string.
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("item"))
+      else if (localName.equals("item"))
       {
         // Item seen.  We don't need any of the attributes etc., but we need to start a new
context.
         return new RSSItemContextClass(theStream,namespaceURI,localName,qName,atts);
@@ -6248,7 +6248,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("ttl"))
         // If the current context must be the TTL one, record its data value.
         ttlValue = ((XMLStringContext)theContext).getValue();
@@ -6297,12 +6297,12 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("link"))
+      if (localName.equals("link"))
       {
         // "link" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("guid"))
+      else if (localName.equals("guid"))
       {
         // "guid" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
@@ -6319,7 +6319,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("link"))
       {
         linkField = ((XMLStringContext)theContext).getValue();
@@ -6376,12 +6376,12 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("ttl"))
+      if (localName.equals("ttl"))
       {
         // TTL value seen.  Prepare to record it, as a string.
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("item"))
+      else if (localName.equals("item"))
       {
         // Item seen.  We don't need any of the attributes etc., but we need to start a new
context.
         return new RDFItemContextClass(theStream,namespaceURI,localName,qName,atts);
@@ -6394,7 +6394,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("ttl"))
         // If the current context must be the TTL one, record its data value.
         ttlValue = ((XMLStringContext)theContext).getValue();
@@ -6438,7 +6438,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("link"))
+      if (localName.equals("link"))
       {
         // "link" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
@@ -6455,7 +6455,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("link"))
       {
         linkField = ((XMLStringContext)theContext).getValue();
@@ -6505,12 +6505,12 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("ttl"))
+      if (localName.equals("ttl"))
       {
         // TTL value seen.  Prepare to record it, as a string.
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
       }
-      else if (qName.equals("entry"))
+      else if (localName.equals("entry"))
       {
         // Item seen.  We don't need any of the attributes etc., but we need to start a new
context.
         return new FeedItemContextClass(theStream,namespaceURI,localName,qName,atts);
@@ -6523,7 +6523,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("ttl"))
         // If the current context must be the TTL one, record its data value.
         ttlValue = ((XMLStringContext)theContext).getValue();
@@ -6568,7 +6568,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "ttl" and "item", nothing else.
-      if (qName.equals("link"))
+      if (localName.equals("link"))
       {
         // "link" tag
         String ref = atts.getValue("href");
@@ -6625,7 +6625,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "url", nothing else.
-      if (qName.equals("url") || qName.equals("sitemap"))
+      if (localName.equals("url") || localName.equals("sitemap"))
       {
         // Item seen.  We don't need any of the attributes etc., but we need to start a new
context.
         return new UrlsetItemContextClass(theStream,namespaceURI,localName,qName,atts);
@@ -6638,7 +6638,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("url") || theTag.equals("sitemap"))
       {
         // It's an item.
@@ -6683,7 +6683,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       // The tags we care about are "loc", nothing else.
-      if (qName.equals("loc"))
+      if (localName.equals("loc"))
       {
         // "loc" tag
         return new XMLStringContext(theStream,namespaceURI,localName,qName,atts);
@@ -6700,7 +6700,7 @@ public class WebcrawlerConnector extends
       throws ManifoldCFException, ServiceInterruption
     {
       XMLContext theContext = theStream.getContext();
-      String theTag = theContext.getQname();
+      String theTag = theContext.getLocalname();
       if (theTag.equals("loc"))
       {
         linkField = ((XMLStringContext)theContext).getValue();



Mime
View raw message