html tag within conditional comments
This is an open discussion with 3 replies, filed under XSLT.
Search
As usual, should have spent more time on Google before posting. Looks like this gist contains the answer, though I have not as yet fully tested it
After more digging and discovering the symphtml5 ensemble, it looks like I had lead myself down completely the wrong path and had introduced a typo somewhere.
Sticking this:
<xsl:comment>paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/</xsl:comment> <xsl:comment><![CDATA[[[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"><![endif]]]></xsl:comment> <xsl:comment><![CDATA[[[if IE 7]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]]]></xsl:comment> <xsl:comment><![CDATA[[if IE 8]><html class="no-js lt-ie9" lang="en"><![endif]]]></xsl:comment> <xsl:comment><![CDATA[[if gt IE 8 ]><!]]></xsl:comment><html class="no-js" lang="en"><xsl:comment><![CDATA[<![endif]]]></xsl:comment>
at the top of my / template and an tag at the bottom works just fine.
@stewartm - Take a look at the HTML5 Doctype extension, and the notes that go along with that.
Create an account or sign in to comment.
Hi - another newbie here. Have recently started using Symphony having worked previously with the usual suspects, particularly Drupal. Am loving the elegance and flexibility but it is taking a little time to adjust to thinking the 'Symphony' way when it comes to XSLT, which I haven't used before. And hence my question.
On a site I am working on, I am trying to marry Symphony to Zurb Foundation. Foundation makes use of Paul Irish's "Conditional Stylesheets vs CSS Hacks? Answer: Neither!" and so I am trying to do this:
in my master.xsl. This fails to parse successfully with:
"This document is not well formed. The following error was returned: loadXML(): Opening and ending tag mismatch: template line 15 and html in Entity, line: 82"
presumably because the html tag has disappeared inside the XSL comment. Is there a way to achieve this in XSLT?