commit: treats titles as mixed text/html elements

changeset:   1178:c145af8efb86
user:        Thomas Gambet <tgambet@w3.org>
date:        Thu Jun 10 11:17:49 2010 -0400
files:       src/org/w3c/unicorn/response/impl/DefaultMessageXBeans.java
description:
treats titles as mixed text/html elements


diff -r 430052d51cc1 -r c145af8efb86 src/org/w3c/unicorn/response/impl/DefaultMessageXBeans.java
--- a/src/org/w3c/unicorn/response/impl/DefaultMessageXBeans.java	Thu Jun 10 11:17:18 2010 -0400
+++ b/src/org/w3c/unicorn/response/impl/DefaultMessageXBeans.java	Thu Jun 10 11:17:49 2010 -0400
@@ -33,7 +33,15 @@
 	
 	public DefaultMessageXBeans(MessageType message) {
 		
-		title = message.getTitle();
+		XmlOptions opts = new XmlOptions();
+		opts.setSaveCDataLengthThreshold(10000000);
+		opts.setSaveCDataEntityCountThreshold(-1);
+		opts.setUseDefaultNamespace();
+		
+		title = message.getTitle().xmlText(opts)
+				.replaceAll("[ ]*xmlns=\"[^>]*\"", "").replaceAll("</?xml-fragment[^>]*>", "");
+
+		//title = message.getTitle();
 		
 		lang = message.getLang();
 		
@@ -54,10 +62,6 @@
 			group = message.getGroup();
 		
 		if (message.isSetDescription()) {
-			XmlOptions opts = new XmlOptions();
-			opts.setSaveCDataLengthThreshold(10000000);
-			opts.setSaveCDataEntityCountThreshold(-1);
-			opts.setUseDefaultNamespace();
 			description = message.getDescription().xmlText(opts)
 				.replaceAll("[ ]*xmlns=\"[^>]*\"", "").replaceAll("</?xml-fragment[^>]*>", "");
 		}

Received on Thursday, 10 June 2010 18:56:48 UTC