You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2010/04/10 16:49:21 UTC

svn commit: r932736 - /incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/WidgetManifestModel.java

Author: scottbw
Date: Sat Apr 10 14:49:21 2010
New Revision: 932736

URL: http://svn.apache.org/viewvc?rev=932736&view=rev
Log:
Set default charset and appropriate content-type attributes when adding default start pages to a widget

Modified:
    incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/WidgetManifestModel.java

Modified: incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/WidgetManifestModel.java
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/WidgetManifestModel.java?rev=932736&r1=932735&r2=932736&view=diff
==============================================================================
--- incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/WidgetManifestModel.java (original)
+++ incubator/wookie/trunk/parser/java/src/org/apache/wookie/w3c/impl/WidgetManifestModel.java Sat Apr 10 14:49:21 2010
@@ -126,6 +126,11 @@ public class WidgetManifestModel impleme
 					ContentEntity c = new ContentEntity();
 					c.setLang(WidgetPackageUtils.languageTagForPath(startpath));
 					c.setSrc(startpath);
+					c.setCharSet(IW3CXMLConfiguration.DEFAULT_CHARSET);
+					// Set the default content type
+					if (startpath.endsWith(".htm") || startpath.endsWith(".html")) c.setType("text/html");
+					if (startpath.endsWith(".xht") || startpath.endsWith(".xhtml")) c.setType("application/xhtml+xml");
+					if (startpath.endsWith(".svg")) c.setType("image/svg+xml");
 					fContentList.add(c);	
 				}
 			}