2006/unicorn/src/org/w3c/unicorn/response/impl DefaultMessageXBeans.java,1.4,1.5

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl
In directory hutz:/tmp/cvs-serv18798/src/org/w3c/unicorn/response/impl

Modified Files:
	DefaultMessageXBeans.java 
Log Message:
fixed: in specific cases a message description was not correctly transcribed 

Index: DefaultMessageXBeans.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl/DefaultMessageXBeans.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- DefaultMessageXBeans.java	23 Oct 2009 12:36:13 -0000	1.4
+++ DefaultMessageXBeans.java	14 May 2010 16:07:51 -0000	1.5
@@ -54,10 +54,15 @@
 		if (message.isSetGroup())
 			group = message.getGroup();
 		
-		if (message.isSetDescription())
-			description = message.getDescription().xmlText(new XmlOptions().setUseDefaultNamespace()
-					.setSavePrettyPrint()).replaceAll("</?xml-fragment[^>]*>", "").replaceAll("xmlns=\".*\"", "");
-	
+		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[^>]*>", "");
+		}
+		
 		for (ContextType context : message.getContextList())
 			contexts.add(new DefaultContextXBeans(context));
 	}

Received on Friday, 14 May 2010 16:07:55 UTC