Skip to content

Trouble understanding a parable of specification, under the "ensure pre-insertion validity" list of steps #870

@amn

Description

@amn

Under point 6 of the list of steps to take to "ensure pre-insertion validity", as part of an attempt to implement a procedure involving the particular list of steps, I am having trouble unambiguously interpreting the following statement:

parent has an element child, child is a doctype, or child is non-null and a doctype is following child.

The test described by the statement is only effective if the node is an element, as evidenced by text prior to the quote above. However, I am unsure if the expression quoted above is equivalent to:

"*parent* has an element child _and_ (emphasis mine) *child* is a doctype, or *child* is non-null and a doctype is following *child*."

or if it is equivalent to:

"*parent* has an element child, _or_ (emphasis mine) *child* is a doctype, or *child* is non-null and a doctype is following *child*."

When implementing the procedure conforming to the list of steps, proper interpretation, as you might imagine, is absolutely critical.

I am asking whether the sentence should be re-worded to remove the kind of difficulty I am experiencing, if I am on to anything here. Alternatively, perhaps there is a "how to read the specification"-kind of document somewhere, which explains how to interpret these kind of linguistic statements? I consider myself well versed in English, but feel free to point out if this is a mistake I am making somewhere.

There may be other statements where this kind of ambiguity surfaces, the one quoted above was just an example, and happens to be the one I am practically involved with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clarificationStandard could be clearergood first issueIdeal for someone new to a WHATWG standard or software project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions