Hi Leandro. Unfortunately, developers aren't able to change the
DOCTYPE -- DOCTYPEs are set by the container, not the gadget, and
browsers will usually ignore any other DOCTYPE statements that appear
after the first line.

A request for this capability has already been filed in the tracker at
http://code.google.com/p/opensocial-resources/issues/detail?id=167. I
suggest starring this issue to receive notifications when its status
is updated, but I'm sure this isn't right around the corner so you
should design your application to render using HTML Strict, at least
for now.

- Jason

On Sep 22, 7:58 am, Leandro Mutly <[EMAIL PROTECTED]> wrote:
> Hello,
> I'm part of a team developing an app for Orkut, and we're using this
> code on the begining of the app:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <Module>
>         <ModulePrefs title="Terra Filmes - Version: 0.171a">
>                 <Require feature="opensocial-0.7"/>
>                 <Require feature="views"/>
>                 <Require feature="dynamic-height"/>
>                 <Optional feature="content-rewrite">
>                         <Param name="include-urls"></Param>
>                         <Param name="exclude-urls">.*</Param>
>                         <Param 
> name="include-tags">img,script,link,embed</Param>
>                 </Optional>
>         </ModulePrefs>
>         <Content type="html" quirks="false">
>         <![CDATA[
>         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>         <html xmlns="http://www.w3.org/1999/xhtml"; lang="pt-br" xml:lang="pt-
> br">
>         <head>
>                 REST OF APP HERE... closing CDATA...
>
> When I check out the source code of the IFRAME where the app is, I got
> this:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
> TR/html4/strict.dtd"><html><head><style type="text/
> css">body,td,div,span,p{font-family:arial,sans-serif;}a
> {color:#0000cc;}a:visited {color:#551a8b;}a:active
> {color:#ff0000;}body{margin: 0px;padding: 0px;background-
> color:white;}</style></head><body><script 
> src="http://www.sandbox.gmodules.com/gadgets/js/content-rewrite:views:dynamic-hei...";></script><script
> src="/46/o/opensocial-0.8.js"></script><script src="/46/o/
> opensocial7to8.js"></script><script><!--
>
>       // Redefined to mimic old Orkut behavior
>       opensocial.DataRequest.prototype.addDefaultProfileFields =
> function(params) {
>         var fields = opensocial.DataRequest.PeopleRequestFields;
>         var profileFields = params[fields.PROFILE_DETAILS] || [];
>         params[fields.PROFILE_DETAILS] = profileFields.concat(
>           [opensocial.Person.Field.ID,
>            opensocial.Person.Field.NAME,
>            opensocial.Person.Field.THUMBNAIL_URL,
>            opensocial.Person.Field.PROFILE_URL]);
>      };
>    ;
> gadgets.config.init({"rpc":
> {"useLegacyProtocol":false,"parentRelayUrl":"/46/o/
> rpc_relay.html"},"shindig.auth":{},"views":{"canvas":
> {"isOnlyVisible":true,"urlTemplate":"http://localhost/gadgets/canvas?
> {var}","aliases":["FULL_PAGE"]},"profile":
> {"isOnlyVisible":false,"urlTemplate":"http://localhost/gadgets/profile?
> {var}","aliases":["DASHBOARD","default"]}},"core.util":{"content-
> rewrite":{"include-tags":"img,script,link,embed","include-
> urls":"","exclude-urls":".*"},"views":{},"dynamic-height":
> {},"opensocial-0.7":{}},"core.io":
> {"jsonProxyUrl":"makeRequest","proxyUrl":"http://www.orkut.gmodules.com/gadgets/proxy?refresh=%refresh%&url=%url%"}});
> gadgets.Prefs.setMessages_({});gadgets.io.preloaded_ = {};
>
> -->
> </script>
>
>         <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>         <html xmlns="http://www.w3.org/1999/xhtml"; lang="pt-br" xml:lang="pt-
> br">
>
> Orkut puts a doctype on the begining of the file, writes some stuff,
> and then writes OUR doctype and the rest of the app (with some extras
> inserted by orkut).
>
> My question is: how do I change the DOCTYPE of the iframe? I want to
> use xhtml transitional, not html strict. Or should I just leave it as
> it is now, and the second DOCTYPE on the app source code will be the
> right one?
>
> Excuse my bad english, it is still under construction.
>
> Thank you,
> Leandro
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" group.
To post to this group, send email to opensocial-orkut@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to