metanorma / metanorma-ieee

Metanorma for IEEE SA
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Deal with non-standards in Normative References #360

Closed opoudjis closed 6 months ago

opoudjis commented 6 months ago

https://github.com/Spatial-Web-Foundation/SWF-Corpus_and_IEEEP2874-D2/issues/1482

Also, note that no real title was provided in that reference:

* [[[dtc,1]]],
span:organization[Digital Twin Consortium].
span:type[misc]
Available at: span:uri[https://www.digitaltwinconsortium.org].

and that is making the citation grab "Available at:" as the only title it can see:

image

opoudjis commented 6 months ago

For most standards, and not just IEEE, normative references are always referenced by their identifier, and they simply don't foresee a case where a normative reference does not have one. What I think is happening here is, in the absence of an identifier, it is grabbing the title to use as a reference, and it thinks that "Available at" is part of the title.

References must have titles to be cited at all, span:title[], and absent a title, I would be plugging in "[Untitled]" (although I'm not sure I even do that yet.) Metanorma is being overzealous in assuming any text not marked up is the title, but... it needs to be. I'll put in a note in the documentation that if you're going to mark text up in bibliographic entries, you really should specify what the title is, otherwise Metanorma is just going to grab all the text it sees, with unpredictable results.

A reference without a title... is a foolhardy thing, in my opinion. The organisation is not really a substitute for the resource title. I'll look into that as well, but try providing a title (even if it is just "Digital Twin Consortium"); and remove "Available at", since that is automatically provided by Metanorma.

ReesePlews commented 6 months ago

@opoudjis thank you for checking this and for the explanation on how to change this. if i were to go through and add span:title[ ] to each of those entries would that take care of things? would it be better to change span:organization[ ] to span:title[ ] instead of adding another span with duplicated content? i think it is probably better that i make changes to my document source then requiring time for you to update/add a special case in the software. if adding the span:title[ ] in these cases will solve the "available at" issue then i think that is the best way, and it follows your advice about "references without titles"...

i will report back here after i make those updates. could be a few days. thanks again

opoudjis commented 6 months ago

I misunderstood the issue. Normative references render fine, it's the bibliographic references that don't:

[1] [normative reference]

Digital Twin Consortium. Available at: . [B1] [bibliography]

There is no title extracted at all; absent a title, Metanorma is falling back on the formatted reference, which is the entire string <formattedref format="application/x-isodoc+xml">Digital Twin Consortium. Available at: <link target="https://www.digitaltwinconsortium.org"/>.</formattedref>. And it is not clever enough to render the link at that point.

Changing the markup from organization:[] to title:[] does indeed render the crossreference as:

Digital Twin Consortium [B1]

—which is what we want.

The only real action here is