Closed ronaldtse closed 5 months ago
Either we change this behavior or document this on metanorma.org.
This behaviour does indeed need to change. I suspect I have already fixed this in the relaton-render refactor, which excludes ISBN as an "authoritative" (i.e. citeable) document identifier; if not, I need to ensure it does. The point of the refactor was to make relaton-render the single source of truth for authoritative docidentifiers.
This happens with DOI identifiers as well, with the DOI identifier appearing as as reference tag in inline citations.
The last refactor addressed the fact that the citation docidentifier was being calculated in two places, isodoc biblio-tags and relaton-render; it removed the first in favour of the second.
But the citation docidentifier is calculated a third time, in standoc, providing the value of eref/@citeas
. The third time it is calculated has a more naive ruleset, which is allowing ISBN and DOI to be treated as citation identifiers.
That is bad design, and citeas is not truly semantic information at all; I am going to get rid of citeas in Semantic XML, and populate it in Presentation XML, when the definitive identifier for each reference is already calculated.
I won't get rid of it in standoc, because it is useful for validation (and the alternative would become spaghetti); but I will overwrite it in isodoc.
== Scope
This is ISBN <<snow_crash>>
This is DOI <<handbook>>
[bibliography]
== Bibliography
* [[[snow_crash,ISBN 9780553562613]]]
* [[[handbook,doi:10.1201/9781420049367.ch4]]]
now renders as:
<title depth="1">1<tab/>Scope</title>
<p id="_1a31ee62-be2f-e4f0-ecb7-7b6cd630f8a3">This is ISBN <xref type="inline" target="snow_crash">[2]</xref></p>
<p id="_46a35f9b-c586-b4ce-3a72-e1c2e47cdadc">This is DOI <xref type="inline" target="handbook">[1]</xref></p>
</clause>
(The order is reversed, because under ISO, the DOI reference Polyhydroxyalkanoates comes before the ISBN reference Snow Crash.)
Bibliography:
On the other hand, this works: