3 class XHTMLCompiler_DOMFilter_IEConditionalComments
extends XHTMLCompiler_DOMFilter
6 protected $name = 'IEConditionalComments';
7 protected $xcAttr = array('ie-condition');
9 public function process(DOMDocument
$dom, $page, $manager) {
11 $nodes = $this->query( "//*[@xc:ie-condition]" );
13 foreach ($nodes as $node) {
14 $condition = $this->confiscateAttr($node, $this->ns
, 'ie-condition');
16 $sxml = simplexml_import_dom($node);
17 $code = $sxml->asXml();
18 $comment = "[if $condition]>$code<![endif]";
19 $parent = $node->parentNode
;
20 $parent->replaceChild($dom->createComment($comment), $node);