--- /home/cpdev/src/classpath/gnu/xml/xpath/LangFunction.java	2006-01-16 17:32:46.000000000 +0000
+++ gnu/xml/xpath/LangFunction.java	2005-09-14 21:51:33.000000000 +0000
@@ -1,5 +1,5 @@
 /* LangFunction.java -- 
-   Copyright (C) 2004,2006 Free Software Foundation, Inc.
+   Copyright (C) 2004 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -91,15 +91,9 @@
 
   String getLang(Node node)
   {
-    while (node != null)
+    if (node.getNodeType() == Node.ELEMENT_NODE)
       {
-        if (node.getNodeType() == Node.ELEMENT_NODE)
-          {
-            String lang = ((Element) node).getAttribute("xml:lang");
-            if (lang != null)
-              return lang;
-          }
-        node = node.getParentNode();
+        return ((Element) node).getAttribute("xml:lang");
       }
     return null;
   }
