xmlns namespace for outlook

hohan's Avatar

hohan

29 Jun, 2015 03:50 PM

I'm trying to add xmlns:v and xmlns:o to my template with the following code.

<!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" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">

However, when you look at the actual page, you can only see <html xmlns="http://www.w3.org/1999/xhtml">. Is there any way I can add these to my newsletter template?

Cascade version is v7.12.5 and I tried #protect and <o:root/> trick.
Thanks,
Han

  1. 1 Posted by Ryan Griffith on 29 Jun, 2015 06:24 PM

    Ryan Griffith's Avatar

    Hi Han,

    It looks like there is perhaps one of the routines during page rendering is stripping out the additional namespaces, since they appear to be left alone when adding them to the Template.

    When you have a moment, I believe I was able to get things to work using the following:

    <!--#cascade-skip--><html xmlns="http://www.w3.org/1999/xhtml"><!--#cascade-skip-->
    <![CDATA[#protect-top
    <!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" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
    #protect-top]]>
    

    To summarize, the first <html> tag will be removed on render due to the #cascade-skip tags and the contents of the #protect-top code section will be promoted to the top of the rendered source.

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by hohan on 29 Jun, 2015 06:55 PM

    hohan's Avatar

    Hi Ryan,

    I tried your code, but it still gives me the same stripped out code <html
    xmlns="http://www.w3.org/1999/xhtml>.
    Han

  3. 3 Posted by Ryan Griffith on 30 Jun, 2015 02:02 PM

    Ryan Griffith's Avatar

    Hi Han,

    Definitely interesting, I was able to get it this to work in my local 7.12.5 instance. I am attaching the contents of my Template so you can see the snippet I provided in action.

    Also, are you using a page, config set or template level XSLT Format?

    Please let me know if you have any questions.

    Thanks!

  4. 4 Posted by hohan on 30 Jun, 2015 03:31 PM

    hohan's Avatar

    Hi Ryan,

    It magically works.
    Thanks,
    Han

  5. 5 Posted by Ryan Griffith on 30 Jun, 2015 04:06 PM

    Ryan Griffith's Avatar

    Thank you for following up, Han, I am glad to hear the proposed tweak to your Template did the trick.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  6. Ryan Griffith closed this discussion on 30 Jun, 2015 04:06 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac