Closed clehner closed 3 years ago
I will answer your questions in reverse order.
node
should be subject node
here.entry
has a @value
entry, which can only happen in a recursive call from 6.12.3 (or possibly through 6.12.3 then 5.2). Notice that 6.12.3 sets active subject
to id
, which is always a string, and has a corresponding entry in graph
(which, in turn, is the value of the active graph
entry). So in this situation, node subject
is always a map. I grant you that this is far from obvious, and should be made more explicit.subject node
remaining unset when active subject
is a map: it should actually not matter. Indeed, if active subject
is a map, we are dealing with a reverse property, so element is bound to be a node object, and step 4 and 5 will be skipped. Obviously, step 6.6. will also be skipped. Therefore, subject node
will never be used. But again, compilers, linters, or careful programmers as yourself might complain about that, so setting it to null is a safer option.I'll make a PR to clarify these points.
@iherman since the changes in #520 are only editorial, does this issue still needs to be flagged as an erratum?
@iherman since the changes in #520 are only editorial, does this issue still needs to be flagged as an erratum?
Let us be conservative: yes. Keep the 'Editorial' flag that I have just added, and that will be displayed in the report accordingly.
@pchampin Thanks for clarifying and addressing it.
PR is merged. As this is really just editorial, I don't think it really reservers an erratum tag, but that's up to @iherman. We can close this issue if @clehner is satisfied.
Fine by me. Thanks all.
I think it is better to keep it as an erratum. After all, an erratum is relative to the official publication that hasn't changed.
Summary: Improved the description of the Node Map Generation Algorithm to handle the case where active subject is a map
, which is treated as if it were null
. Also, notes areas in the algorithm where the node subject will always be a map
.
@iherman change from ErratumRaised to Erratum when you're satisfied.
@iherman change from ErratumRaised to Erratum when you're satisfied.
Done. The issue can be closed, too, the errata page should show it regardless.
Node Map Generation step 2 says "If the active subject is null, set node to null otherwise reference the active subject entry of graph using the variable subject node." This seems to imply that if
active subject
is not null then it must be a string so as to be a map key. Butactive subject
may also be a map, as when called from step6.9.3.1.1
and handled in step6.5
. In my implementation, ifactive subject
at step 2 is a map or anything other than a string, I treat that as if it was null. Is that correct? Or should we take the@id
entry of the map instead?I am also unsure about how
subject node
is supposed to be handled when not set. It is referenced later in the algorithm without any checking, for example:4.1.1) If subject node does not have an active property entry, create one and initialize its value to an array containing element.
What is supposed to happen here ifsubject node
has not been set? In my implementation I throw an error.Step 2 says to set
node
to null if the active subject is null. But I don't seenode
referenced later in the algorithm before re-setting it at step6.4
. Should step 2 say to setsubject node
to null instead? That would remove the apparently used variable, and also make suresubject node
is initialized. But this would still not fully explain what to do ifsubject node
is null when it is later referenced in e.g. step4.1.1
.