abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r417654 - /incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
Date Wed, 28 Jun 2006 03:14:01 GMT
Author: jmsnell
Date: Tue Jun 27 20:14:01 2006
New Revision: 417654

URL: http://svn.apache.org/viewvc?rev=417654&view=rev
Log:

 Text.getValue() with type="xhtml" ... now returns the serialized string without the wrapper
div
 Text.setValue() with type="xhtml" ... now automatically adds the wrapper div (regardless
of whether or not the value param already has a div
 
 This automatically bubbles down to entry.getTitle(...), entry.setTitle(...), entry.getRights(...),
entry.setRights(...), as so on
 

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

Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java?rev=417654&r1=417653&r2=417654&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
(original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMText.java
Tue Jun 27 20:14:01 2006
@@ -118,7 +118,7 @@
     } else if (Type.HTML.equals(type)) {
       val = getText();
     } else if (Type.XHTML.equals(type)) {
-      val = this.getFirstChildWithName(Constants.DIV).toString();
+      val = ((FOMDiv)this.getFirstChildWithName(Constants.DIV)).getInternalValue();
     }
     return val;
   }
@@ -134,6 +134,7 @@
         try {
           baseUri = getResolvedBaseUri();
         } catch (Exception e) {}
+        value = "<div xmlns=\"" + XHTML_NS + "\">" + value + "</div>";
         Element element = _parse(value, baseUri);
         if (element != null && element instanceof Div)
           setValueElement((Div)element);



Mime
View raw message