Re: Spurious warnings for missing attributes (attribute-missing=warn)
Posted by
mojavelinux on
URL: https://discuss.asciidoctor.org/Spurious-warnings-for-missing-attributes-attribute-missing-warn-tp7426p7431.html
Is there some way you can isolate and simplify this into a reproducible test scenario?
-Dan
On Mon, Dec 16, 2019 at 5:58 AM wolandscat [via Asciidoctor :: Discussion] <
[hidden email]> wrote:
Hi Dan,
to reproduce, you could clone 2 repos (one that contains various include files with numerous attribute definitions), and one specifications repo, containing normal content, and run the publisher script. I.e.:
$ mkdir openEHR # a place you can clone 2 of our repos & trash later
$ cd openEHR
$ git clone https://github.com/openEHR/specifications-AA_GLOBAL.git # include files
$ git clone https://github.com/openEHR/specifications-AM.git # an .adoc content repo
$ cp specifications-AA_GLOBAL/bin/do_spec_publish.sh .
$ ./do_spec_publish.sh -rwf AM # Run AD on the specifications-AM repo
That last command runs asciidoctor;
r = use remote CSS
w = turn on missing attribute warnings
f = force regenerate
v = will turn on AD verbose
t = will turn on AD trace
h = help, to see all options
You should see this (I get the same on both Windows/cygwin/Asciidoctor 2, and a Linux mint current build, with Asciidoctor 2):
$ ./do_spec_publish.sh -rfw AM
setting pub_home to /cygdrive/c/dev/openEHR-specifications
setting work_root to /cygdrive/c/dev/openEHR-specifications
setting ref_dir to /cygdrive/c/dev/openEHR-specifications/specifications-AA_GLOBAL
setting base_dir to /cygdrive/c/dev/openEHR-specifications/specifications-BASE
+++++++++ Processing components:
specifications-AM
using remote CSS location
setting stylesdir to https://specifications.openehr.org/styles
========= cd specifications-AM ==========
------------- checking docs/ADL1.4 REBUILD ---------------
asciidoctor: WARNING: skipping reference to missing attribute: openehr_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_aom14
asciidoctor: WARNING: skipping reference to missing attribute: rfc2781
asciidoctor: WARNING: skipping reference to missing attribute: m
asciidoctor: WARNING: skipping reference to missing attribute: w3c_xpath
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_id
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_aom2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_aom2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_aom2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_aom2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_aom2
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: 1
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: 2
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: m
generated /cygdrive/c/dev/openEHR-specifications/specifications-AM/docs/ADL1.4/../ADL1.4.html
------------- checking docs/ADL2 REBUILD ---------------
asciidoctor: WARNING: skipping reference to missing attribute: iso_13606
asciidoctor: WARNING: skipping reference to missing attribute: openehr_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_aom2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_opt2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_resource
asciidoctor: WARNING: skipping reference to missing attribute: rfc2781
asciidoctor: WARNING: skipping reference to missing attribute: m
asciidoctor: WARNING: skipping reference to missing attribute: 3
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: w3c_xpath
asciidoctor: WARNING: skipping reference to missing attribute: openehr_awb_github
asciidoctor: WARNING: skipping reference to missing attribute: openehr_awb_github
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: 1
asciidoctor: WARNING: skipping reference to missing attribute: 0
...
generated /cygdrive/c/dev/openEHR-specifications/specifications-AM/docs/ADL2/../ADL2.html
------------- checking docs/AOM1.4 REBUILD ---------------
asciidoctor: WARNING: skipping reference to missing attribute: openehr_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_adl14
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_oap
asciidoctor: WARNING: skipping reference to missing attribute: validity_kind
asciidoctor: WARNING: skipping reference to missing attribute: validity_kind
...
asciidoctor: WARNING: skipping reference to missing attribute: validity_kind
asciidoctor: WARNING: skipping reference to missing attribute: validity_kind
generated /cygdrive/c/dev/openEHR-specifications/specifications-AM/docs/AOM1.4/../AOM1.4.html
------------- checking docs/AOM2 REBUILD ---------------
asciidoctor: WARNING: skipping reference to missing attribute: iso_13606
asciidoctor: WARNING: skipping reference to missing attribute: openehr_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_base_types
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_adl2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_opt2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_adl2
asciidoctor: WARNING: skipping reference to missing attribute: snomed_ct
asciidoctor: WARNING: skipping reference to missing attribute: who_icd
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_adl2
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: openehr_el
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: 0
generated /cygdrive/c/dev/openEHR-specifications/specifications-AM/docs/AOM2/../AOM2.html
------------- checking docs/Identification REBUILD ---------------
asciidoctor: WARNING: skipping reference to missing attribute: openehr_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_base_types
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_aom2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_adl2
asciidoctor: WARNING: skipping reference to missing attribute: semver
generated /cygdrive/c/dev/openEHR-specifications/specifications-AM/docs/Identification/../Identification.html
------------- checking docs/OPT2 REBUILD ---------------
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_overview
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_aom2
asciidoctor: WARNING: skipping reference to missing attribute: 0
asciidoctor: WARNING: skipping reference to missing attribute: 0
...
generated /cygdrive/c/dev/openEHR-specifications/specifications-AM/docs/OPT2/../OPT2.html
------------- checking docs/Overview REBUILD ---------------
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_id
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_adl2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_aom2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_am_opt2
asciidoctor: WARNING: skipping reference to missing attribute: openehr_query_aql
generated /cygdrive/c/dev/openEHR-specifications/specifications-AM/docs/Overview/../Overview.html
------------- cd docs ---------------
generated /cygdrive/c/dev/openEHR-specifications/specifications-AM/docs/./index.html
You can ignore 'attributes' like '0', 'validity_kind' etc - these are syntax in one of our languages. However, the variables like openehr_am_adl2 etc are in my opinion all correctly defined (in the file .../openEHR/specifications-AA_GLOBAL/docs/references/reference_definitions.adoc. and also in .../openEHR/specifications-AA_GLOBAL/docs/boilerplate/global_vars.adoc). If you look at the HTML output files in .../openEHR/specifications-AM/docs you will see that the substitutions have been made. For example, look at section 1.2 of AOM1.4.html, where you will see a bullet list with two links. The source of that looks like (.../openEHR/specifications-AM/docs/AOM1.4/master01-preface.adoc):
== Related Documents
Prerequisite documents for reading this document include:
* The {openehr_overview}[openEHR Architecture Overview^];
* The {openehr_am_overview}[openEHR Archetypes Technical Overview^].
Related documents include:
* The {openehr_am_adl14}[openEHR Definition Language^];
* The {openehr_am_oap}[openEHR Archetype Profile^].
Those are some of the variables being complained about, but a) they are being substituted correctly (the HTML contains correct links) and they are properly defined and included (in .../openEHR/specifications-AA_GLOBAL/docs/references/reference_definitions.adoc).
I am most likely doing something dumb, but after 2h I cannot see what it is!
--