metanorma-standoc 1.3.29 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/asciidoctor/standoc/base.rb +2 -25
- data/lib/asciidoctor/standoc/biblio.rng +13 -3
- data/lib/asciidoctor/standoc/blocks.rb +20 -17
- data/lib/asciidoctor/standoc/cleanup.rb +2 -0
- data/lib/asciidoctor/standoc/cleanup_block.rb +2 -2
- data/lib/asciidoctor/standoc/cleanup_section.rb +8 -125
- data/lib/asciidoctor/standoc/cleanup_terms.rb +134 -0
- data/lib/asciidoctor/standoc/datamodel/attributes_table_preprocessor.rb +57 -0
- data/lib/asciidoctor/standoc/datamodel/diagram_preprocessor.rb +102 -0
- data/lib/asciidoctor/standoc/datamodel/plantuml_renderer.rb +408 -0
- data/lib/asciidoctor/standoc/inline.rb +10 -5
- data/lib/asciidoctor/standoc/isodoc.rng +17 -1
- data/lib/asciidoctor/standoc/macros.rb +13 -8
- data/lib/asciidoctor/standoc/macros_yaml2text.rb +19 -13
- data/lib/asciidoctor/standoc/ref.rb +13 -56
- data/lib/asciidoctor/standoc/ref_sect.rb +124 -0
- data/lib/asciidoctor/standoc/section.rb +2 -46
- data/lib/asciidoctor/standoc/views/datamodel/model_representation.adoc.erb +30 -0
- data/lib/asciidoctor/standoc/views/datamodel/plantuml_representation.adoc.erb +20 -0
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +1 -1
- data/spec/asciidoctor-standoc/cleanup_spec.rb +51 -0
- data/spec/asciidoctor-standoc/datamodel/attributes_table_preprocessor_spec.rb +76 -0
- data/spec/asciidoctor-standoc/datamodel/diagram_preprocessor_spec.rb +72 -0
- data/spec/asciidoctor-standoc/inline_spec.rb +5 -1
- data/spec/asciidoctor-standoc/macros_spec.rb +50 -0
- data/spec/asciidoctor-standoc/macros_yaml2text_spec.rb +2 -1
- data/spec/asciidoctor-standoc/refs_spec.rb +0 -4
- data/spec/examples/datamodel/address_class_profile.adoc +4 -0
- data/spec/examples/datamodel/address_component_profile.adoc +4 -0
- data/spec/examples/datamodel/common_models_diagram.adoc +4 -0
- data/spec/examples/datamodel/models/models/AddressClassProfile.yml +90 -0
- data/spec/examples/datamodel/models/models/AddressComponentProfile.yml +63 -0
- data/spec/examples/datamodel/models/models/AddressComponentSpecification.yml +15 -0
- data/spec/examples/datamodel/models/models/AddressProfile.yml +36 -0
- data/spec/examples/datamodel/models/models/AttributeProfile.yml +32 -0
- data/spec/examples/datamodel/models/models/InterchangeAddressClassProfile.yml +79 -0
- data/spec/examples/datamodel/models/models/Localization copy.yml +23 -0
- data/spec/examples/datamodel/models/models/Localization.yml +23 -0
- data/spec/examples/datamodel/models/models/ProfileCompliantAddress.yml +36 -0
- data/spec/examples/datamodel/models/models/ProfileCompliantAddressComponent.yml +15 -0
- data/spec/examples/datamodel/models/models/Signature copy.yml +20 -0
- data/spec/examples/datamodel/models/models/Signature.yml +20 -0
- data/spec/examples/datamodel/models/models/TextDirectionCode copy.yml +16 -0
- data/spec/examples/datamodel/models/models/TextDirectionCode.yml +16 -0
- data/spec/examples/datamodel/models/models/Validity.yml +14 -0
- data/spec/examples/datamodel/models/models/iso19160-1/Address.yml +22 -0
- data/spec/examples/datamodel/models/models/iso19160-1/AddressComponent.yml +2 -0
- data/spec/examples/datamodel/models/style.uml.inc +37 -0
- data/spec/examples/datamodel/models/views/CommonModels.yml +9 -0
- data/spec/examples/datamodel/models/views/TopDown.yml +62 -0
- data/spec/examples/datamodel/top_down_diagram.adoc +4 -0
- data/spec/fixtures/macros_datamodel/address_class_profile.xml +149 -0
- data/spec/fixtures/macros_datamodel/address_component_profile.xml +71 -0
- data/spec/fixtures/macros_datamodel/common_models_diagram.xml +7 -0
- data/spec/fixtures/macros_datamodel/top_down_diagram.xml +7 -0
- data/spec/spec_helper.rb +13 -2
- data/spec/vcr_cassettes/dated_iso_ref_joint_iso_iec.yml +66 -66
- data/spec/vcr_cassettes/isobib_get_123.yml +36 -36
- data/spec/vcr_cassettes/isobib_get_123_2001.yml +16 -16
- data/spec/vcr_cassettes/isobib_get_124.yml +17 -17
- data/spec/vcr_cassettes/rfcbib_get_rfc8341.yml +8 -8
- data/spec/vcr_cassettes/separates_iev_citations_by_top_level_clause.yml +41 -38
- metadata +41 -4
@@ -0,0 +1,63 @@
|
|
1
|
+
name: AddressComponentProfile
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
An `AddressComponentProfile` represents a profile of a `ProfileCompliantAddressComponent`,
|
5
|
+
which is extended from the `AddressComponent` model defined in <<ISO19160-1>>.
|
6
|
+
|
7
|
+
It represents additional attributes and restrictions to the `Address` model
|
8
|
+
of a `ProfileCompliantAddress`. It also represents metadata for the use of
|
9
|
+
the profile.
|
10
|
+
attributes:
|
11
|
+
key:
|
12
|
+
definition: An identifier of this `AddressComponentProfile`, shall be unique within the `AddressProfile`.
|
13
|
+
type: CharacterString
|
14
|
+
description:
|
15
|
+
definition: Textual description of this component.
|
16
|
+
type: CharacterString
|
17
|
+
example:
|
18
|
+
definition: A textual example to demonstrate the correct use of this component.
|
19
|
+
type: CharacterString
|
20
|
+
cardinality:
|
21
|
+
min: 0
|
22
|
+
max: 1
|
23
|
+
relations:
|
24
|
+
- target: AddressClassProfile
|
25
|
+
relationship:
|
26
|
+
target:
|
27
|
+
type: aggregation
|
28
|
+
attribute:
|
29
|
+
componentProfile:
|
30
|
+
cardinality:
|
31
|
+
min: 0
|
32
|
+
max: "*"
|
33
|
+
association: AddressComponentSpecification
|
34
|
+
action:
|
35
|
+
verb: uses
|
36
|
+
direction: source
|
37
|
+
|
38
|
+
- target: AttributeProfile
|
39
|
+
relationship:
|
40
|
+
source:
|
41
|
+
type: aggregation
|
42
|
+
attribute:
|
43
|
+
addressClassProfile:
|
44
|
+
target:
|
45
|
+
type: direct
|
46
|
+
attribute:
|
47
|
+
attributeProfile:
|
48
|
+
cardinality:
|
49
|
+
min: 0
|
50
|
+
max: '*'
|
51
|
+
|
52
|
+
- target: ProfileCompliantAddressComponent
|
53
|
+
relationship:
|
54
|
+
target:
|
55
|
+
type: direct
|
56
|
+
attribute:
|
57
|
+
profile:
|
58
|
+
cardinality:
|
59
|
+
min: 1
|
60
|
+
max: 1
|
61
|
+
action:
|
62
|
+
verb: compliesWith
|
63
|
+
direction: source
|
@@ -0,0 +1,15 @@
|
|
1
|
+
name: AddressComponentSpecification
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
An `AddressComponentSpecification` specifies the cardinalities between a
|
5
|
+
`ProfileCompliantAddress` and `ProfileCompliantAddressComponents`.
|
6
|
+
|
7
|
+
A `ProfileComplinatAddress` MUST conform to this
|
8
|
+
`AddressComponentSpecification` to specifies its components.
|
9
|
+
attributes:
|
10
|
+
maxCardinality:
|
11
|
+
definition: The maximum number of instances of the specific `ProfileCompliantAddressComponent` of a `ProfileCompliantAddress`.
|
12
|
+
type: Integer
|
13
|
+
minCardinality:
|
14
|
+
definition: The minimum number of instances of the specific `ProfileCompliantAddressComponent` of a `ProfileCompliantAddress`.
|
15
|
+
type: Integer
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: AddressProfile
|
2
|
+
modelType: class
|
3
|
+
definition:
|
4
|
+
attributes:
|
5
|
+
country:
|
6
|
+
definition: The country of which this AddressProfile represents.
|
7
|
+
type: iso3166Code
|
8
|
+
cardinality:
|
9
|
+
min: 0
|
10
|
+
max: "*"
|
11
|
+
relations:
|
12
|
+
- target: AddressComponentProfile
|
13
|
+
relationship:
|
14
|
+
source:
|
15
|
+
type: aggregation
|
16
|
+
attribute:
|
17
|
+
componentProfile:
|
18
|
+
cardinality:
|
19
|
+
min: 0
|
20
|
+
max: "*"
|
21
|
+
action:
|
22
|
+
verb: defines
|
23
|
+
direction: target
|
24
|
+
|
25
|
+
- target: AddressClassProfile
|
26
|
+
relationship:
|
27
|
+
source:
|
28
|
+
type: aggregation
|
29
|
+
attribute:
|
30
|
+
addressProfile:
|
31
|
+
cardinality:
|
32
|
+
min: 0
|
33
|
+
max: "*"
|
34
|
+
action:
|
35
|
+
verb: defines
|
36
|
+
direction: target
|
@@ -0,0 +1,32 @@
|
|
1
|
+
modelType: class
|
2
|
+
definition: |
|
3
|
+
An `AttributeProfile` represents name, cardinalities and value type of an
|
4
|
+
attribute in a model that complies with a profile that includes this
|
5
|
+
AttributeProfile.
|
6
|
+
|
7
|
+
If it represents an attribute that has been previously defined, e.g. an
|
8
|
+
attribute in Address model defined in <<ISO19160-1>>, it extends the
|
9
|
+
definition of the attribute by redefining the name, cardinalities and value
|
10
|
+
type.
|
11
|
+
attributes:
|
12
|
+
name:
|
13
|
+
definition: The name of the attribute represented by this AttributeProfile.
|
14
|
+
type: CharacterString
|
15
|
+
minCardinality:
|
16
|
+
definition: The minimum number of occurrences of the attribute represented by this AttributeProfile.
|
17
|
+
type: Integer
|
18
|
+
cardinality:
|
19
|
+
min: 0
|
20
|
+
max: 1
|
21
|
+
maxCardinality:
|
22
|
+
definition: The maximum number of occurences of the attribute represented by this AttributeProfile.
|
23
|
+
type: Integer
|
24
|
+
cardinality:
|
25
|
+
min: 0
|
26
|
+
max: 1
|
27
|
+
valueType:
|
28
|
+
definition: The data type of values of the attribute represented by this AttributeProfile.
|
29
|
+
type: CharacterString
|
30
|
+
cardinality:
|
31
|
+
min: 0
|
32
|
+
max: 1
|
@@ -0,0 +1,79 @@
|
|
1
|
+
name: InterchangeAddressClassProfile
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
This `InterchangeAddressClassProfile` extends from `AddressClassProfile` to
|
5
|
+
enforce the existence of several subclasses of `AttributeProfile` for
|
6
|
+
interchange.
|
7
|
+
|
8
|
+
It also introduces `FormTemplate` and `DisplayTemplate` to
|
9
|
+
to allow the display, entry of, and the interchange of an
|
10
|
+
`ProfileCompliantAddress` (address
|
11
|
+
instance complying with an `InterchangeAddressClassProfile`).
|
12
|
+
--
|
13
|
+
attributes:
|
14
|
+
relations:
|
15
|
+
- target: AddressClassProfile
|
16
|
+
relationship:
|
17
|
+
target:
|
18
|
+
type: inheritance
|
19
|
+
|
20
|
+
- target: AttributeProfileSignature
|
21
|
+
relationship:
|
22
|
+
source:
|
23
|
+
type: aggregation
|
24
|
+
attribute:
|
25
|
+
attributeProfile:
|
26
|
+
target:
|
27
|
+
type: direct
|
28
|
+
attribute:
|
29
|
+
addressClassProfile:
|
30
|
+
|
31
|
+
- target: AttributeProfileAddressFeature
|
32
|
+
relationship:
|
33
|
+
source:
|
34
|
+
type: aggregation
|
35
|
+
attribute:
|
36
|
+
attributeProfile:
|
37
|
+
target:
|
38
|
+
type: direct
|
39
|
+
attribute:
|
40
|
+
addressClassProfile:
|
41
|
+
|
42
|
+
- target: AttributeProfileValidity
|
43
|
+
relationship:
|
44
|
+
source:
|
45
|
+
type: aggregation
|
46
|
+
attribute:
|
47
|
+
attributeProfile:
|
48
|
+
target:
|
49
|
+
type: direct
|
50
|
+
attribute:
|
51
|
+
addressClassProfile:
|
52
|
+
|
53
|
+
- target: FormTemplate
|
54
|
+
relationship:
|
55
|
+
source:
|
56
|
+
type: aggregation
|
57
|
+
target:
|
58
|
+
attribute:
|
59
|
+
formTemplate:
|
60
|
+
cardinality:
|
61
|
+
min: 0
|
62
|
+
max: "*"
|
63
|
+
action:
|
64
|
+
verb: defines
|
65
|
+
direction: target
|
66
|
+
|
67
|
+
- target: DisplayTemplate
|
68
|
+
relationship:
|
69
|
+
source:
|
70
|
+
type: aggregation
|
71
|
+
target:
|
72
|
+
attribute:
|
73
|
+
displayTemplate:
|
74
|
+
cardinality:
|
75
|
+
min: 0
|
76
|
+
max: "*"
|
77
|
+
action:
|
78
|
+
verb: defines
|
79
|
+
direction: target
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Localization
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
The language and script used within the parent object.
|
5
|
+
|
6
|
+
Represented by the `PT_Locale` object defined in <<ISO19115-1>> and an
|
7
|
+
<<ISO15924>> script code.
|
8
|
+
attributes:
|
9
|
+
locale:
|
10
|
+
definition: The locale of the parent object.
|
11
|
+
type: iso19115PT_Locale
|
12
|
+
script:
|
13
|
+
definition: The type of written script used in the parent object.
|
14
|
+
type: iso15924Code
|
15
|
+
textDirection:
|
16
|
+
definition: Indicating in which direction the text of the parent should be read.
|
17
|
+
type: TextDirectionCode
|
18
|
+
relations:
|
19
|
+
- target: Validity
|
20
|
+
relationship:
|
21
|
+
target:
|
22
|
+
type: direct
|
23
|
+
direction: "[hidden]"
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: Localization
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
The language and script used within the parent object.
|
5
|
+
|
6
|
+
Represented by the `PT_Locale` object defined in <<ISO19115-1>> and an
|
7
|
+
<<ISO15924>> script code.
|
8
|
+
attributes:
|
9
|
+
locale:
|
10
|
+
definition: The locale of the parent object.
|
11
|
+
type: iso19115PT_Locale
|
12
|
+
script:
|
13
|
+
definition: The type of written script used in the parent object.
|
14
|
+
type: iso15924Code
|
15
|
+
textDirection:
|
16
|
+
definition: Indicating in which direction the text of the parent should be read.
|
17
|
+
type: TextDirectionCode
|
18
|
+
relations:
|
19
|
+
- target: Validity
|
20
|
+
relationship:
|
21
|
+
target:
|
22
|
+
type: direct
|
23
|
+
direction: "[hidden]"
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: ProfileCompliantAddress
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
ProfileCompliantAddress extends from the `Address` model defined in
|
5
|
+
<<ISO19160-1>> to represent an `Address` complying with an
|
6
|
+
`AddressClassProfile`.
|
7
|
+
|
8
|
+
A `ProfileCompliantAddress` MUST conform to the constraints and
|
9
|
+
requirements specified in `AddressClassProfile`, and its associated
|
10
|
+
profiles and specifications.
|
11
|
+
relations:
|
12
|
+
- target: Address
|
13
|
+
relationship:
|
14
|
+
target:
|
15
|
+
type: inheritance
|
16
|
+
|
17
|
+
- target: ProfileCompliantAddressComponent
|
18
|
+
relationship:
|
19
|
+
source:
|
20
|
+
type: aggregation
|
21
|
+
attributes:
|
22
|
+
address:
|
23
|
+
cardinality:
|
24
|
+
min: 1
|
25
|
+
max: "*"
|
26
|
+
target:
|
27
|
+
type: direct
|
28
|
+
attributes:
|
29
|
+
addressComponent:
|
30
|
+
cardinality:
|
31
|
+
min: 1
|
32
|
+
max: "*"
|
33
|
+
association: AddressComponentSpecification
|
34
|
+
action:
|
35
|
+
verb: comprises
|
36
|
+
direction: target
|
@@ -0,0 +1,15 @@
|
|
1
|
+
name: ProfileCompliantAddressComponent
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
ProfileCompliantAddressComponent extends from the AddressComponent model
|
5
|
+
defined in <<ISO19160-1>> to represent an Address complying with an
|
6
|
+
AddressClassProfile.
|
7
|
+
|
8
|
+
A ProfileCompliantAddressComponent MUST conform to the constraints and
|
9
|
+
requirements specified in AddressComponentProfile, and its associated
|
10
|
+
profiles and specifications.
|
11
|
+
relations:
|
12
|
+
- target: AddressComponent
|
13
|
+
relationship:
|
14
|
+
target:
|
15
|
+
type: inheritance
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Signature
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
A cryptographic signature used to determine data integrity and validity of the object it belongs to.
|
5
|
+
attributes:
|
6
|
+
algorithm:
|
7
|
+
definition: The public key cryptographic algorithm used for this digital signature.
|
8
|
+
type: iso14888Oid
|
9
|
+
publicKey:
|
10
|
+
definition: A reference to the actual public key used to verify the digital signature, a URI where the public key of the signer used for this signature is found.
|
11
|
+
type: Uri
|
12
|
+
signature:
|
13
|
+
definition: The actual digital signature value encoded in Base64 format.
|
14
|
+
type: CharacterString
|
15
|
+
relations:
|
16
|
+
- target: Localization
|
17
|
+
relationship:
|
18
|
+
target:
|
19
|
+
type: direct
|
20
|
+
direction: "[hidden]"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Signature
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
A cryptographic signature used to determine data integrity and validity of the object it belongs to.
|
5
|
+
attributes:
|
6
|
+
algorithm:
|
7
|
+
definition: The public key cryptographic algorithm used for this digital signature.
|
8
|
+
type: iso14888Oid
|
9
|
+
publicKey:
|
10
|
+
definition: A reference to the actual public key used to verify the digital signature, a URI where the public key of the signer used for this signature is found.
|
11
|
+
type: Uri
|
12
|
+
signature:
|
13
|
+
definition: The actual digital signature value encoded in Base64 format.
|
14
|
+
type: CharacterString
|
15
|
+
relations:
|
16
|
+
- target: Localization
|
17
|
+
relationship:
|
18
|
+
target:
|
19
|
+
type: direct
|
20
|
+
direction: "[hidden]"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
name: TextDirectionCode
|
2
|
+
modelType: enum
|
3
|
+
definition: |
|
4
|
+
An enumeration value of TextDirectionCode represents the reading
|
5
|
+
direction of textual data whether it is from left to right or right to
|
6
|
+
left, and from top to bottom or bottom to top.
|
7
|
+
type: enumeration
|
8
|
+
values:
|
9
|
+
leftToRightTopToBottom:
|
10
|
+
definition: Indicating that text should be read left to right, and top to bottom.
|
11
|
+
rightToLeftTopToBottom:
|
12
|
+
definition: Indicating that text should be read right to left, and top to bottom.
|
13
|
+
leftToRightBottomToTop:
|
14
|
+
definition: Indicating that text should be read left to right, and bottom to top.
|
15
|
+
rightToLeftBottomToTop:
|
16
|
+
definition: Indicating that text should be read right to left, and bottom to top.
|
@@ -0,0 +1,16 @@
|
|
1
|
+
name: TextDirectionCode
|
2
|
+
modelType: enum
|
3
|
+
definition: |
|
4
|
+
An enumeration value of TextDirectionCode represents the reading
|
5
|
+
direction of textual data whether it is from left to right or right to
|
6
|
+
left, and from top to bottom or bottom to top.
|
7
|
+
type: enumeration
|
8
|
+
values:
|
9
|
+
leftToRightTopToBottom:
|
10
|
+
definition: Indicating that text should be read left to right, and top to bottom.
|
11
|
+
rightToLeftTopToBottom:
|
12
|
+
definition: Indicating that text should be read right to left, and top to bottom.
|
13
|
+
leftToRightBottomToTop:
|
14
|
+
definition: Indicating that text should be read left to right, and bottom to top.
|
15
|
+
rightToLeftBottomToTop:
|
16
|
+
definition: Indicating that text should be read right to left, and bottom to top.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
name: Validity
|
2
|
+
modelType: class
|
3
|
+
definition: |
|
4
|
+
The time interval where this interchange address profile is determined valid, and the revision number (represented as a date).
|
5
|
+
attributes:
|
6
|
+
validityBegins:
|
7
|
+
definition: The date and time when this object becomes valid.
|
8
|
+
type: iso19115CI_Date
|
9
|
+
validityEnds:
|
10
|
+
definition: The date and time when this object becomes invalid.
|
11
|
+
type: iso19115CI_Date
|
12
|
+
revision:
|
13
|
+
definition: Issuance date/time of this object.
|
14
|
+
type: iso19115CI_Date
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: Address
|
2
|
+
modelType: class
|
3
|
+
relations:
|
4
|
+
- target: AddressComponent
|
5
|
+
relationship:
|
6
|
+
source:
|
7
|
+
type: aggregation
|
8
|
+
attributes:
|
9
|
+
address:
|
10
|
+
cardinality:
|
11
|
+
min: 1
|
12
|
+
max: "*"
|
13
|
+
target:
|
14
|
+
type: direct
|
15
|
+
attributes:
|
16
|
+
addressComponent:
|
17
|
+
cardinality:
|
18
|
+
min: 1
|
19
|
+
max: "*"
|
20
|
+
action:
|
21
|
+
verb: comprises
|
22
|
+
direction: target
|