abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r522042 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
Date Sat, 24 Mar 2007 15:55:13 GMT
Author: jmsnell
Date: Sat Mar 24 08:55:12 2007
New Revision: 522042

URL: http://svn.apache.org/viewvc?view=rev&rev=522042
Log:
xml:lang Language context was not be propogated down to child elements

Modified:
    incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java?view=diff&rev=522042&r1=522041&r2=522042
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMElement.java
Sat Mar 24 08:55:12 2007
@@ -214,7 +214,11 @@
   }
   
   public String getLanguage() {
-    return getAttributeValue(LANG);
+    String lang = getAttributeValue(LANG);
+    Base parent = this.getParentElement();
+    return (lang != null) ? lang :
+      (parent != null && parent instanceof Element) ? 
+        ((Element)parent).getLanguage() : null;
   }
 
   public void setLanguage(String language) {



Mime
View raw message