-
Notifications
You must be signed in to change notification settings - Fork 5
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
Missing predefined text in Normative References (sub-clause in Section) #1167
Comments
Sadly, ISO historically did different and daft things, and for reasons that I do not comprehend or approve of, we are graverobbing old ISO standards. It looks like the Metanorma code dealing with boilerplate for reference clauses is expecting them to be top-level clauses, and I can see why it would. Investigating. |
Yeah, this is... bad. The code was structured from the beginning with the presupposition that bibliographies would be banished to back material, under //bibliography/references, even if the normative references were to appear as clause 2. When the bibliography is embedded in a subclause like this, Metanorma still recognises it as a bibliography, but it is no longer located where it expects to find it, in back matter. So I need to allow Metanorma to find bibliographies anywhere in the document. We already are dealing with that in NIST, which puts bibliographies in annexes. |
This is disrupting my existing code structure, and it is forcing code redesign. Which means you are not going to get it immediately, @Intelligent2013 The structure at the moment of the elements is:
But if bibliographies can be shoved into an arbitrary subclause, we can't do that: in the example above, "General" is not a bibliographic clause. Instead, we need a rationalised way of inferring boilerplate location, and ways of overriding it, as we pretty much already have with Terms and definitions.
|
Per metanorma/metanorma-plateau#32, which also does this clause embedding, for terms:
|
So: universally, in Metanorma,
|
Done for standoc, will now need to adjust iso code to integrate the changes. |
There's an idiosyncratic rule in standoc: "places single terms boilerplate at root if there are clauses preceding the terms collection, other than boilerplate". So
That rule is not going to withstand what is happening with nested terms within other clauses, and needs to be dispensed with. We will need a new override rule: if we know a terms clause to be a terms clause because of its heading, we will retain that information, and still make it the default destination of boilerplate, so long as it contains clauses and terms, but not if it also contains symbols. That can now be overridden, but we will have:
So the default algorithm now becomes:
That means:
but
This is horrific, but we do need a default that can cope with Plateau and old ISO, and the existing default won't. And at least now we can override the default behaviour. |
To do this, assign type=terms on clauses that are recognised as terms containers |
And we do not rename to Terms and definitions clauses that are not recognised as terms containers (i.e. heading=Terms and definitions) |
Issue 1 now resolved:
|
Issue 2 now also resolved:
|
Source issue: #1091 (comment)
The source document (ISO_7005_2_1988.zip) contains
Normative references
as sub-clause in the SectionGeneral
:Issue 1: The presentation XML doesn't contain the default predefined text in the
Normative references
sub-clause:If I add the user-defined boilerplate text:
then
Issue 2: the presentation XML contains the user-defined boilerplate text in the element
note
(type="boilerplate"
):instead of just
p
.If I remove the top-level Section:
(and, sure, remove
=
before each sub-clause title), then the boilerplate text generates correctly in the both cases.The text was updated successfully, but these errors were encountered: