2006/unicorn/src/org/w3c/unicorn/util XHTMLize.java,1.6,1.7

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util
In directory hutz:/tmp/cvs-serv29765/src/org/w3c/unicorn/util

Modified Files:
	XHTMLize.java 
Log Message:
new response parsing process
+ implementations for the new observer schema

Index: XHTMLize.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/XHTMLize.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- XHTMLize.java	6 Oct 2009 08:16:02 -0000	1.6
+++ XHTMLize.java	19 Oct 2009 10:09:04 -0000	1.7
@@ -2,9 +2,6 @@
 
 import org.apache.commons.lang.StringEscapeUtils;
 import org.apache.velocity.app.event.ReferenceInsertionEventHandler;
-import org.w3c.unicorn.response.A;
-import org.w3c.unicorn.response.Code;
-import org.w3c.unicorn.response.Img;
 
 /**
  * Escape all XML Entities in the reference insertion. Specifically, the
@@ -31,7 +28,7 @@
 		if (oValue == null) {
 			return null;
 		}
-		if (oValue instanceof A) {
+/*		if (oValue instanceof A) {
 			A link = (A) oValue;
 			return insertA(link);
 		}
@@ -42,11 +39,16 @@
 		if (oValue instanceof Code) {
 			Code code = (Code) oValue;
 			return insertCode(code);
-		}
-		if (sReference.startsWith("$ucn.evaluate"))
+		}*/
+		
+		return oValue.toString();
+		
+		/*if (sReference.startsWith("$ucn.evaluate"))
+			return oValue.toString();
+		if (sReference.contains("getDescription()"))
 			return oValue.toString();
 		else
-			return StringEscapeUtils.escapeHtml(oValue.toString());
+			return StringEscapeUtils.escapeHtml(oValue.toString());*/
 	}
 
 	/**
@@ -56,7 +58,7 @@
 	 *            link to insert
 	 * @return return the object containing the link
 	 */
-	private Object insertA(final A aLink) {
+/*	private Object insertA(final A aLink) {
 		String sResultat = "<a href=\""
 			    + StringEscapeUtils.escapeHtml(aLink.getHref()) + "\">";
 		for (final Object oElement : aLink.getContent()) {
@@ -77,7 +79,7 @@
 	 *            code to insert
 	 * @return object with code inserted
 	 */
-	private Object insertCode(final Code aCode) {
+/*	private Object insertCode(final Code aCode) {
 		String sResultat = "<code>";
 		for (final Object oElement : aCode.getContent()) {
 			if (oElement instanceof A) {
@@ -99,10 +101,10 @@
 	 *            image path to insert
 	 * @return the string containing the image tag
 	 */
-	private String insertImg(final Img aImage) {
+/*	private String insertImg(final Img aImage) {
 		return "<img src=\"" + StringEscapeUtils.escapeHtml(aImage.getSrc())
 				+ "\" alt=\"" + StringEscapeUtils.escapeHtml(aImage.getAlt())
 				+ "\"/>";
-	}
+	}*/
 
 }

Received on Monday, 19 October 2009 10:09:11 UTC