Re: Requirements for (level >=3) tests

On Fri, Feb 17, 2012 at 8:48 AM, Aryeh Gregor <ayg@aryeh.name> wrote:
> On Thu, Feb 16, 2012 at 8:47 PM, Linss, Peter <peter.linss@hp.com> wrote:
>> HTML5 input is acceptable now, but XHTML is still preferred as it avoids potential parser/markup issues.
>
> What are some examples?

I would assume it's just "if the HTML parser isn't fully spec-compliant".


>> Another issue with submitting tests in a minimal markup form is that it has the potential to introduce unnecessary diffs. Shepherd will at some point allow editing of test metadata via the web interface, when this happens, the test will be re-serialized from its DOM and will contain significantly more diffs than those required by the edit, which will be bad. Others may use other tools to edit the files and have similar results.
>
> This should apply to any document that doesn't round-trip through
> serialization, though, right?  It could be just as relevant to XHTML
> 1.0.  For instance, if the input file had something like:
>
>  <p style="color: green"
>     class="foo">Some text</p>
>
> it will probably get serialized to something like:
>
>  <p style="color: green" class="foo">Some text</p>
>
> The diff will be smaller, but still potentially very confusing.  This
> seems like a reason not to ever try to round-trip the files through
> serialization.  If automated markup alteration is desired, perhaps a
> better approach would be to try doing a dumb regex-based substitution
> or insertion, check if the parsed DOM was modified as intended, and
> fail with an error if it wasn't.

Or alternately, *immediately* reserialize upon importing into the test
system, so that diffs are against the relatively stable serialized
formatting from the start.

~TJ

Received on Friday, 17 February 2012 16:56:51 UTC