tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/10325-switching-template-to-html5-boilerplate-while-using-xslt-on-the-configuration-setCascade CMS: Discussion 2014-01-07T20:26:24Ztag:help-archives.hannonhill.com,2010-02-09:Comment/309771242014-01-07T16:45:22Z2014-01-07T16:45:22ZSwitching template to HTML5 boilerplate while using XSLT on the configuration set<div><p>Hi Jonathan,</p>
<blockquote>
<p>I think the issue is that we have an XSLT format applied to the
configuration set itself</p>
</blockquote>
<p>You are definitely on the right track here. Because the XSLT
Format is applied on render, the code is escaped, as you noted.</p>
<p>Fortunately, a few clients encountered this so and we have a
workaround, which you can <a href=
"https://gist.github.com/rgriffith/3c8eea7f8acad60cfee6">find the
here</a>. You will find the XSLT to generate the HTML5BP code
(basically what you would add to the Template) and some comments on
how to include the Format into your existing Format as well as how
to call the template. Also, there is a sample Template that
demonstrates how the <code><html></code> tag should be added
to your Template(s).</p>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/309771242014-01-07T17:08:22Z2014-01-07T17:08:22ZSwitching template to HTML5 boilerplate while using XSLT on the configuration set<div><p>Hey Ryan,</p>
<p>Thanks so much. That does work pretty well, but I did notice
that the HTML it generates is invalid:<br></p>
<pre>
<code><!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"><![endif]--><!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]--><!--[if IE 8]> <html class="no-js lt-ie9" lang="en"><![endif]--><!--[if gt IE 8]><!--><html class="no-js" lang="en"/><!--<![endif]--></code>
</pre>
<p>I added the lang="en" part for accessibility, but it's the
closing / on the final <code><html></code> that the validator
doesn't like. I assume this is because the format does actually
have a closing HTML tag to keep Cascade happy. Is there anything
that we could do about this?</p>
<p>Thanks,<br>
Jonathan</p></div>jonathan.stegalltag:help-archives.hannonhill.com,2010-02-09:Comment/309771242014-01-07T19:11:08Z2014-01-07T19:11:08ZSwitching template to HTML5 boilerplate while using XSLT on the configuration set<div><p>Hi Jonathan,</p>
<p>My apologies, it looks like there is a minor issue with the XSLT
that is causing this self-closing <code><html/></code> tag at
the end.</p>
<p>Specifically, notice the <code><!--#casade-skip--></code>
comments. These are actually being ignored during render because
XSLT thinks this is an XSLT comment and is not actually generating
the code section. When you have a moment, update your Format to use
the following and let me know how it works out:</p>
<pre>
<code><xsl:template match="html5bp">
<xsl:comment>#protect-top<![CDATA[<!DOCTYPE html>]]>#protect-top</xsl:comment>
<xsl:comment>[if lt IE 7]&gt; <![CDATA[<html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]]]></xsl:comment>
<xsl:comment>[if IE 7]&gt; <![CDATA[<html class="no-js lt-ie9 lt-ie8"><![endif]]]></xsl:comment>
<xsl:comment>[if IE 8]&gt; <![CDATA[<html class="no-js lt-ie9"><![endif]]]></xsl:comment>
<xsl:comment>[if gt IE 8]&gt;![CDATA[<!]]></xsl:comment><html class="no-js"><xsl:comment>#cascade-skip</xsl:comment></html><xsl:comment>#cascade-skip</xsl:comment><xsl:comment><![CDATA[<![endif]]]></xsl:comment>
</xsl:template></code>
</pre>
<p>Please let me know if you have any questions.</p>
<p>Thanks!</p></div>Ryan Griffithtag:help-archives.hannonhill.com,2010-02-09:Comment/309771242014-01-07T19:20:11Z2014-01-07T19:20:11ZSwitching template to HTML5 boilerplate while using XSLT on the configuration set<div><p>Hey Ryan,</p>
<p>Thanks again. There was a <code><</code> that I needed to add
(right after the greater than IE8 part, but it seems to work fine
now, and it validates. Here it is with that character:</p>
<pre>
<code><xsl:template match="html5bp">
<xsl:comment>#protect-top<![CDATA[<!DOCTYPE html>]]>#protect-top</xsl:comment>
<xsl:comment>[if lt IE 7]&gt; <![CDATA[<html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]]]></xsl:comment>
<xsl:comment>[if IE 7]&gt; <![CDATA[<html class="no-js lt-ie9 lt-ie8"><![endif]]]></xsl:comment>
<xsl:comment>[if IE 8]&gt; <![CDATA[<html class="no-js lt-ie9"><![endif]]]></xsl:comment>
<xsl:comment>[if gt IE 8]&gt;<![CDATA[<!]]></xsl:comment>
<html class="no-js"><xsl:comment>#cascade-skip</xsl:comment></html><xsl:comment>#cascade-skip</xsl:comment><xsl:comment><![CDATA[<![endif]]]></xsl:comment>
</xsl:template></code>
</pre>
<p>Thanks so much,<br>
Jonathan</p></div>jonathan.stegalltag:help-archives.hannonhill.com,2010-02-09:Comment/309771242014-01-07T20:26:23Z2014-01-07T20:26:23ZSwitching template to HTML5 boilerplate while using XSLT on the configuration set<div><p>Thank you for following up, Jonathan. I am glad to hear that did
the trick. I will be sure to update my gist with the corresponding
tweaks as well.</p>
<p>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.</p>
<p>Have a great day!</p></div>Ryan Griffith