metanorma / metanorma-plugin-glossarist

Glossarist plugin for Metanorma
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Malformed reference anchors #31

Open opoudjis opened 1 month ago

opoudjis commented 1 month ago

From https://github.com/metanorma/metanorma/issues/75, TC 211

This may be a data source issue, but: Metanorma is quite specific about what goes into the fetch code of a bibliographic reference. If it is not a standard identifier, then a full bibliographic reference needs to be given, following one of the conventions in https://www.metanorma.org/author/topics/sections/bibliography/ . The preferred format is https://www.metanorma.org/author/topics/sections/bibliography/#annotated-spans . But that will end up a separate ticket.

In addition, the fetch code needs to be well-formed; that means no ] (since ] is a delimiter in the bibliographic reference), no parenthetic comments (ISO/IEC TR 14252(Adapted from) is not a bibliographic reference, it is a bibliographic reference plus commentary, and it should have been fixed in the YAML), and no discursive chatter.

Metanorma is finding something objectionable in all of the following:

https://www.metanorma.com/author/topics/document-format/bibliography/ ,
https://www.metanorma.com/author/iso/topics/markup/#bibliographies
: [[[19161-1_2020,19161-1:2020]]]
AsciiDoc Input: (ID _bibliography): no anchor on reference, markup may be malformed: see
https://www.metanorma.com/author/topics/document-format/bibliography/ ,
https://www.metanorma.com/author/iso/topics/markup/#bibliographies
: [[[DCAT[8],DCAT[8]]]]
AsciiDoc Input: (ID _bibliography): no anchor on reference, markup may be malformed: see
https://www.metanorma.com/author/topics/document-format/bibliography/ ,
https://www.metanorma.com/author/iso/topics/markup/#bibliographies
: [[[DWBP[7],DWBP[7]]]]
AsciiDoc Input: (ID _bibliography): no anchor on reference, markup may be malformed: see
https://www.metanorma.com/author/topics/document-format/bibliography/ ,
https://www.metanorma.com/author/iso/topics/markup/#bibliographies
: [[[Derived_from_FindLaw_for_“agent”,Derived from FindLaw for “agent”]]]
AsciiDoc Input: (ID _bibliography): no anchor on reference, markup may be malformed: see
https://www.metanorma.com/author/topics/document-format/bibliography/ ,
https://www.metanorma.com/author/iso/topics/markup/#bibliographies
: [[[Derived_from_Palmer_&_Dodge,Derived from Palmer & Dodge]]]
AsciiDoc Input: (ID _bibliography): no anchor on reference, markup may be malformed: see
https://www.metanorma.com/author/topics/document-format/bibliography/ ,
https://www.metanorma.com/author/iso/topics/markup/#bibliographies
: [[[ISO_19107_2003€,ISO 19107:2003€]]]
AsciiDoc Input: (ID _bibliography): no anchor on reference, markup may be malformed: see
https://www.metanorma.com/author/topics/document-format/bibliography/ ,
https://www.metanorma.com/author/iso/topics/markup/#bibliographies
: [[[,]]]
AsciiDoc Input: (ID _bibliography): no anchor on reference, markup may be malformed: see
https://www.metanorma.com/author/topics/document-format/bibliography/ ,
https://www.metanorma.com/author/iso/topics/markup/#bibliographies
: [[[ISO_IEC_TR_14252(Adapted_from),ISO/IEC TR 14252(Adapted from)]]]
AsciiDoc Input: (ID _bibliography): no anchor on reference, markup may be malformed: see
https://www.metanorma.com/author/topics/document-format/bibliography/ ,
https://www.metanorma.com/author/iso/topics/markup/#bibliographies
: [[[Implementation_Specification_—_a_Draught_Information_System_for_the_St._Lawrence_Seaway,Implementation Specification — a Draught Information System for the St. Lawrence Seaway]]]

Of these:

[.source]
<<Palmer__amp;_Dodge>>,

(for just ", modified")

[.source,status=modified]
<<Palmer__amp;_Dodge>>

(will end up the same)

[.source,status=unspecified]
<<Palmer__amp;_Dodge>>

(I don't recommend that, but it allows an underspecified relation. I recommend "modified", and that is what ISO expects to see.)

[.source,status=modified]
<<ISO_IEC_TR_14252>>

(Of course, it would be far preferable if the "modified/adapted" were indicated as status attributes on the source in the YAML.

This may well be forcing a bunch of QA on the termbase. At the risk of callousness, that's not my problem, that's the data provider's. Bibliographic entries like "Adapted from Albota 2002" are simply malformed, and we should not expect them to provide a coherent bibliographic reference. (After all, the expectation is that it links to "Albota 2002" somehow.)

opoudjis commented 1 month ago

And something has clearly gone colossally wrong with the bibliographic anchor:

ISO 6709:2008, 4.1, modified &#8211; The preferred term is "measurement accuracy" rather than "accuracy" and Notes 1 to 3 have been added.

That should have been marked up as follows; recall that clause references are marked separately from the work, https://github.com/metanorma/metanorma-plugin-glossarist/issues/29, and that modifications of definitions are parsed as text following the source reference (minus the "modified —" introductory text, which Metanorma adds automatically):

[.source]
<<ISO_6709_2008,clause=4.1>>, The preferred term is "measurement accuracy" rather than "accuracy" and Notes 1 to 3 have been added.