1 //------------------------------------------------------------------------------
2 // <copyright file="CommentAction.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // <owner current="true" primary="true">Microsoft</owner>
6 //------------------------------------------------------------------------------
8 namespace System
.Xml
.Xsl
.XsltOld
{
9 using Res
= System
.Xml
.Utils
.Res
;
11 using System
.Diagnostics
;
13 using System
.Xml
.XPath
;
15 internal class CommentAction
: ContainerAction
{
16 internal override void Compile(Compiler compiler
) {
17 CompileAttributes(compiler
);
19 if (compiler
.Recurse()) {
20 CompileTemplate(compiler
);
25 internal override void Execute(Processor processor
, ActionFrame frame
) {
26 Debug
.Assert(processor
!= null && frame
!= null);
28 switch (frame
.State
) {
30 if (processor
.BeginEvent(XPathNodeType
.Comment
, string.Empty
, string.Empty
, string.Empty
, false) == false) {
35 processor
.PushActionFrame(frame
);
36 frame
.State
= ProcessingChildren
;
37 break; // Allow children to run
39 case ProcessingChildren
:
40 if (processor
.EndEvent(XPathNodeType
.Comment
) == false) {
48 Debug
.Fail("Invalid IfAction execution state");