Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

title-intro instead of title-main #156

Closed
opoudjis opened this issue Oct 21, 2023 · 4 comments
Closed

title-intro instead of title-main #156

opoudjis opened this issue Oct 21, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@opoudjis
Copy link
Contributor

The specs in metanorma-standoc have all been addressed by your update to 1.16.2, thank you!

Except:

If you fetch ISO/IEC TR 12382:1992 with the new relaton-iso, it is now populating title-intro instead of title-main.

<bibdata type="standard" schema-version="v1.2.4">
  <fetched>2023-10-21</fetched>
  <title type="title-intro" format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
  <title type="main" format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
  <title type="title-intro" format="text/plain" language="fr" script="Latn">Index permuté du vocabulaire des technologies de l'information</title>
  <title type="main" format="text/plain" language="fr" script="Latn">Index permuté du vocabulaire des technologies de l'information</title>

That is incorrect. The hierarchy is always title-main > title-intro, title-part. If only one title-* is present, it needs to be treated as title-main.

Not urgent for this release, I'll deal, but it's still an error.

@opoudjis opoudjis added the bug Something isn't working label Oct 21, 2023
@opoudjis
Copy link
Contributor Author

In addition,

ISO 31-0 was fetching as:

               <title type="title-intro" format="text/plain" language="en" script="Latn">Title missing</title>
                <title type="title-main" format="text/plain" language="en" script="Latn">Legacy paper document</title>
                <title type="main" format="text/plain" language="en" script="Latn">Title missing — Legacy paper document</title>

and is now fetching as:

 <title type="title-intro" format="text/plain" language="en" script="Latn">Title missing — Legacy paper document</title>
<title type="main" format="text/plain" language="en" script="Latn">Title missing — Legacy paper document</title>

So it is not splitting intro and main any more.

And ISO 683-3 was fetching as:

                <title type="title-main" format="text/plain" language="en" script="Latn">Heat-treatable steels, alloy steels and free-cutting steels</title>
                <title type="title-part" format="text/plain" language="en" script="Latn">Part 3: Case-hardening steels</title>
                <title type="main" format="text/plain" language="en" script="Latn">Heat-treatable steels, alloy steels and free-cutting steels — Part 3: Case-hardening steels</title>

and is now fetching as:

     <title type="title-intro" format="text/plain" language="en" script="Latn">Heat-treatable steels, alloy steels and free-cutting steels</title>
     <title type="title-main" format="text/plain" language="en" script="Latn">Part 3: Case-hardening steels</title>
     <title type="main" format="text/plain" language="en" script="Latn">Heat-treatable steels, alloy steels and free-cutting steels — Part 3: Case-hardening steels</title>

So part titles are no longer being recognised.

.

@opoudjis
Copy link
Contributor Author

Because ISO keeps changing its site, we really do need to test live screenscraping of ISO against a fixture, as part of gem testing. Currently, metanorma is catching these changes instead of relaton, and that is a result of poor testing technique in metanorma, keeping the fetched records fixed in the spec.

andrew2net added a commit that referenced this issue Oct 21, 2023
@ronaldtse
Copy link
Contributor

@andrew2net can we fix this ASAP?

We also need to keep specs that involve ISO's live site and have them run daily so we can catch these issues before our users do.

@andrew2net
Copy link
Contributor

Fixed in v1.16.3

$ relaton fetch 'ISO/IEC TR 12382:1992'
Resolving dependencies...
[relaton-iso] (ISO/IEC TR 12382:1992) Fetching from iso.org ...
[relaton-iso] (ISO/IEC TR 12382:1992) Found: `ISO/IEC TR 12382:1992`
<bibdata type="standard" schema-version="v1.2.4">
  <fetched>2023-10-21</fetched>
  <title type="title-main" format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
  <title type="main" format="text/plain" language="en" script="Latn">Permuted index of the vocabulary of information technology</title>
  <title type="title-main" format="text/plain" language="fr" script="Latn">Index permuté du vocabulaire des technologies de l'information</title>
  <title type="main" format="text/plain" language="fr" script="Latn">Index permuté du vocabulaire des technologies de l'information</title>
  ...

$ relaton fetch 'ISO 31-0'              
Resolving dependencies...
[relaton-iso] (ISO 31-0) Fetching from iso.org ...
[relaton-iso] (ISO 31-0) Found: `ISO 31-0:1974`
<bibdata type="standard" schema-version="v1.2.4">
  <fetched>2023-10-21</fetched>
  <title type="title-intro" format="text/plain" language="en" script="Latn">Title missing</title>
  <title type="title-main" format="text/plain" language="en" script="Latn">Legacy paper document</title>
  <title type="main" format="text/plain" language="en" script="Latn">Title missing - Legacy paper document</title>
  <title type="title-intro" format="text/plain" language="fr" script="Latn">Title missing</title>
  <title type="title-main" format="text/plain" language="fr" script="Latn">Legacy paper document</title>
  <title type="main" format="text/plain" language="fr" script="Latn">Title missing - Legacy paper document</title>
  ...

$ relaton fetch 'ISO 683-3'
Resolving dependencies...
[relaton-iso] (ISO 683-3) Fetching from iso.org ...
[relaton-iso] (ISO 683-3) Found: `ISO 683-3:2022`
<bibdata type="standard" schema-version="v1.2.4">
  <fetched>2023-10-21</fetched>
  <title type="title-main" format="text/plain" language="en" script="Latn">Heat-treatable steels, alloy steels and free-cutting steels</title>
  <title type="title-part" format="text/plain" language="en" script="Latn">Part 3: Case-hardening steels</title>
  <title type="main" format="text/plain" language="en" script="Latn">Heat-treatable steels, alloy steels and free-cutting steels - Part 3: Case-hardening steels</title>
  <title type="title-main" format="text/plain" language="fr" script="Latn">Aciers pour traitement thermique, aciers alliés et aciers pour décolletage</title>
  <title type="title-part" format="text/plain" language="fr" script="Latn">Partie 3: Aciers pour cémentation</title>
  <title type="main" format="text/plain" language="fr" script="Latn">Aciers pour traitement thermique, aciers alliés et aciers pour décolletage - Partie 3: Aciers pour cémentation</title>
  ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants