[MOBY-guts] biomoby commit

Mark Wilkinson mwilkinson at pub.open-bio.org
Sun Sep 14 15:28:47 EDT 2003


mwilkinson
Sun Sep 14 14:28:47 EDT 2003
Update of /home/repository/moby/moby-live/Perl/MOBY
In directory pub.open-bio.org:/tmp/cvs-serv25300/Perl/MOBY

Modified Files:
	CommonSubs.pm 
Log Message:
fixing and flexiblizing the common subs

moby-live/Perl/MOBY CommonSubs.pm,1.13,1.14
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm	2003/09/13 02:48:55	1.13
+++ /home/repository/moby/moby-live/Perl/MOBY/CommonSubs.pm	2003/09/14 18:28:47	1.14
@@ -410,9 +410,9 @@
 =head2 isSimpleArticle
 
  name     : isSimpleArticle
- function : tests an XML or XML DOM node to see if it represents a Simple article
+ function : tests XML (text) or an XML DOM node to see if it represents a Simple article
  usage    : if (isSimpleArticle($node)){do something to it}
- input    : an XML::DOM node, or straight XML
+ input    : an XML::DOM node, an XML::DOM::Document or straight XML
  returns  : boolean
 
 =cut
@@ -426,6 +426,7 @@
         return 0 if ($@);
         $DOM = $doc->getDocumentElement();
     }
+    $DOM = $DOM->getDocumentElement if ($DOM->isa("XML::DOM::Document"));
     return 1 if ($DOM->getTagName eq "Simple");
     return 0;
 }
@@ -433,9 +434,9 @@
 =head2 isCollectionArticle
 
  name     : isCollectionArticle
- function : tests an XML or XML DOM node to see if it represents a Collection article
+ function : tests XML (text) or an XML DOM node to see if it represents a Collection article
  usage    : if (isCollectionArticle($node)){do something to it}
- input    : an XML::DOM node, or straight XML
+ input    : an XML::DOM node, an XML::DOM::Document or straight XML
  returns  : boolean
 
 =cut
@@ -449,6 +450,7 @@
         return 0 if ($@);
         $DOM = $doc->getDocumentElement();
     }
+    $DOM = $DOM->getDocumentElement if ($DOM->isa("XML::DOM::Document"));
     return 1 if ($DOM->getTagName eq "Collection");
     return 0;
 }



More information about the MOBY-guts mailing list