<meta charset="utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">I like the idea of standardizing the dump output and the dumping code for that matter. If we can resolve the below, then we can make sure all the dumping logic in dom2string gets moved into dump-as-markup and standardize on that. As best I can tell, there&#39;s only 2 uses of dom2string.<br>

<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

There is another DOM dump format which the html5lib tests use:<br><a href="http://trac.webkit.org/browser/trunk/LayoutTests/html5lib/runner-expected-html5.txt" target="_blank" style="color: rgb(0, 0, 204); ">http://trac.webkit.org/browser/trunk/LayoutTests/html5lib/runner-expected-html5.txt</a><br>

Note, it&#39;s a DOM Dump, not a Markup dump, but it serves a similar<br>purpose.<br></blockquote><br>I&#39;m not really sure what distinction you&#39;re drawing here. They both just dump the DOM. When this came up before, people preferred the name dump-as-markup to dum-as-dom.<br>

<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

I I think I like the html5lib format better for a few reasons:<br>2. The DOM tree indent is nice.<br></blockquote><br>What does the indenting do with linebreaks? For example, &quot;foo\nbar\nbaz&quot;. In dump-as-markup, that gets printed as:<br>

&lt;#text&gt;foo<br>bar<br>baz&lt;/text&gt;<br><br>I guess I&#39;d be OK with indenting, but having anything after a newline not indent.<br><br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

3. &lt;#text&gt; is takes less space.<br></blockquote><br>Meh. I find the quotes confusing, e.g. if there are quotes in the text node:<br>&quot;And then I said, &quot;wot?&quot;&quot;<br><br>But I guess that&#39;s not too bad and it is a bit easier on the eyes overall. I&#39;m ok with changing this if that&#39;s what others think is better.<br>

<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">

I suggest adding # signs to the selection pseudo-elements,<br>just to avoid the tiny risk of conflicting with an actual element in a<br>test. Also, perhaps it would be better to show tag names in lowercase -<br>that can be achieved by using localName instead of nodeName or tagName.<br>

</blockquote><br>Both of these make sense.<br><br>Filed <a href="https://bugs.webkit.org/show_bug.cgi?id=43015" target="_blank" style="color: rgb(0, 0, 204); ">https://bugs.webkit.org/show_bug.cgi?id=43015</a>.<br><br>Ojan<br>

</span>