private void WriteHtml(IHtmlWriter html, DebugRegion region, int depth)
        {
            if (region.Element != null)
            {
                html.WriteElementLine("p", "zone inherits from '" + region.Element.Name + "' region");
                if (depth != 1)
                {
                    StartIndent(html, false);
                    WriteDebugInfo(html, region.Element.GetDebugInfo(), 2);
                    EndIndent(html);
                }
            }

            if (region.RepeatType != null)
            {
                html.WriteOpenTag("p");
                html.WriteText("Repeat region for each ");
                html.WriteElement("i", region.RepeatType.DisplayName());
                if (!string.IsNullOrEmpty(region.RepeatScope))
                {
                    html.WriteText(" in '" + region.RepeatScope + "' scope");
                }
                html.WriteText(" from ");
                html.WriteElement("i", region.ListType.DisplayName());
                if (!string.IsNullOrEmpty(region.ListScope))
                {
                    html.WriteText(" in '" + region.ListScope + "' scope");
                }
                html.WriteCloseTag("p");
                html.WriteLine();
            }

            if (region.Scope != null)
            {
                if (region.Scope.Scopes != null)
                {
                    html.WriteElementLine("p", "zone data scope");
                    StartIndent(html, false);
                    WriteDebugInfo(html, region.Scope, 3);
                    EndIndent(html);
                }
            }

            if (region.Children != null && region.Children.Count > 0)
            {
                html.WriteElementLine("p", "zone has contents");
                if (depth != 1)
                {
                    StartIndent(html, true);
                    WriteDebugInfo(html, region.Children[0], depth - 1);
                    EndIndent(html);
                }
            }
        }