metanorma / metanorma-iso

Metanorma processor for ISO standards
BSD 2-Clause "Simplified" License
14 stars 5 forks source link

PDF: Committee document missing "Reference number" #1246

Open ronaldtse opened 1 week ago

ronaldtse commented 1 week ago

The Reference number is missing in PDF output:

image

The header:

= Description of Terminology Data Model v3
:docidentifier: ISO/IEC JTC 1/WG 15 N0255
:edition: 3
:revdate: 2023-07-21
:copyright-year: 2023
:language: en
:publisher: ISO;IEC
:title-main-en: Description of Terminology Data Model version 3
:title-main-fr: Description du modèle de données terminologiques version 3
:doctype: committee-document

The reference number is also missing from all the page headers, etc.

I tried the following variations but does not fix this problem at all:

Only docidentifier:

= Description of Terminology Data Model v3
:docidentifier: ISO/IEC JTC 1/WG 15 N0255

With tc-docnumber:

= Description of Terminology Data Model v3
:tc-docnumber: N0255
:docidentifier: ISO/IEC JTC 1/WG 15 N0255

With tc-docnumber and docnumber:

= Description of Terminology Data Model v3
:docnumber: N0255
:tc-docnumber: N0255
:docidentifier: ISO/IEC JTC 1/WG 15 N0255

They all give the same output.

Is this a Metanorma XML problem?

From this document:

The desired reference number is:

Screenshot 2024-11-15 at 11 41 37 AM
Intelligent2013 commented 1 week ago

For the https://github.com/metanorma/iso-iec-jtc1-wg15-tdm/, branch main, the PDF has the reference number:

image

I'll try the corrections branch.

Intelligent2013 commented 1 week ago

Confirmed, the PDF generated from the branch corrections doesn't have the reference number. XSLT reads the reference number from iso-standard/bibdata/docidentifier[@type = 'iso-with-lang'].

The differences, left pane - branch correction, right pane - branch main:

So, the most docidentifiers are missing in the Presentation XML after the changes.

ping @opoudjis.

Also, there are a lot differences in terms section: image

ronaldtse commented 1 week ago

@Intelligent2013 Ah, now you say this I realized the difference is this.

There are 2 numbers on the cover page:

Screenshot 2024-11-15 at 4 52 56 PM

Only docnumber

= Title
:docnumber: 0255
...

=> 1 and 2 both present

Only tc-docnumber

= Title
:tc-docnumber: 0255

=> 1, 2 both missing

Only docidentifier

This is technically the preferred way as described in documentation, because we don't know what N number patterns people decide to use.

= Title
:docidentifier: ISO/IEC JTC 1/WG 15 N0255

=> 1 present, 2 missing

docnumber and docidentifier

= Title
:docnumber: 0255
:docidentifier: ISO/IEC JTC 1/WG 15 N0255

=> 1 present, 2 missing

tc-docnumber and docidentifier

= Title
:tc-docnumber: 0255
:docidentifier: ISO/IEC JTC 1/WG 15 N0255

=> 1 present, 2 missing

all 3 present

= Title
:docnumber: 0255
:tc-docnumber: 0255
:docidentifier: ISO/IEC JTC 1/WG 15 N0255

=> 1 present, 2 missing

Conclusion

This means when docidentifier is present, 1 is always missing.

Intelligent2013 commented 23 hours ago

As

Also, there are a lot differences in terms section:

it seems some part of the code metanorma-iso or something isn't working properly when :docidentifier: is present.