@@ -285,15 +285,19 @@ TermSource =
285
285
## Concatenate all consecutive term sources and block sources into a single semicolon delimited expression
286
286
termsource?
287
287
288
- termsource = element termsource {
288
+ ## Concatenate all consecutive term sources and block sources into a single semicolon delimited expression
289
+ fmt_termsource = element fmt-termsource {
289
290
attribute status { SourceStatusType },
290
291
attribute type { SourceTypeType },
291
292
origin,
292
- ## UNWRAP: Replace modification with a commma, then text representing the status, then a dash, then text representing the modification
293
+ ## Replace modification with a commma, then text representing the status, then a dash, then text representing the modification
293
294
## e.g.
294
295
## <termsource status="adapted"><origin>...</origin><modification>enhanced</modification></termsource>
295
296
## becomes:
296
- ## <termsource status="adapted"><origin>...</origin>, adapted – enhanced</termsource>
297
+ ## <fmt-termsource status="adapted"><semx element='termsource'>
298
+ ## <origin>...</origin>,
299
+ ## adapted – <semx element='modification'>enhanced</semx>
300
+ ## </semx></fmt-termsource>
297
301
TextElement*
298
302
}
299
303
@@ -326,18 +330,17 @@ concept = element concept {
326
330
)
327
331
}
328
332
329
- ## UNWRAP: replace <related> with the crossreference to the term being related to
330
- related =
331
- ## paragraph is:
332
- ## <p><strong>{related/@type}:</strong> <em>{related/preferred}</em>
333
- ## ({related/xref | related/eref | related/termref})</p>
334
- ## e.g.
335
- ## <related type='contrast'><preferred><expression><name>Fifth Designation</name></expression></preferred>
336
- ## <xref target='second'/></related>
337
- ## becomes:
338
- ## <p><strong>CONTRAST:</strong> <em><preferred><strong>Fifth Designation</strong></preferred></em>
339
- ## (<xref target='second'>Clause 1.1</xref>)</p>
340
- paragraph
333
+ ## replace <related> with the crossreference to the term being related to (wrapped in semx for related)
334
+ ## paragraph is:
335
+ ## <p><strong>{related/@type}:</strong> <em>{related/preferred}</em>
336
+ ## ({related/xref | related/eref | related/termref})</p>
337
+ ## e.g.
338
+ ## <related type='contrast'><preferred><expression><name>Fifth Designation</name></expression></preferred>
339
+ ## <xref target='second'/></related>
340
+ ## becomes:
341
+ ## <p><strong>CONTRAST:</strong> <em><semx element="preferred"><strong>Fifth Designation</strong></semx></em>
342
+ ## (<xref target='second'>Clause 1.1</xref>)</p>
343
+ fmt_related = element fmt-related { paragraph }
341
344
342
345
erefAttributes =
343
346
attribute normative { xsd:boolean }?,
@@ -424,10 +427,10 @@ attribution-para = element p {
424
427
TextElement* & quote-author & quote-source
425
428
}
426
429
427
- ## TODO the same has been done for term definitions: we are inserting domain as a Semantic XML into the first definition
428
- ## paragraph, rather than leaving that to the renderer. In the future, we will make that instead a span with class fmt-domain,
429
- ## pointing to the source domain element. I'm not updating the grammar for now, because it would be nightmarish to and will not persist .
430
- termdefinition &= empty
430
+ ## The term domain may be inserted into fmt_termdefinition via semx.
431
+ ## Multiple termdefinitions are replaced with a single definition, consiting of an ordered list of definitions
432
+ ## As normal, each Semantic XML definition is referenced via semx .
433
+ fmt_termdefinition = element fmt-termdefinition { TextElement+ }
431
434
432
435
quote-source =
433
436
element source { erefType }
@@ -580,49 +583,26 @@ term = element term {
580
583
BlockAttributes,
581
584
## Clause number of term
582
585
tname,
583
- ## UNWRAP: Consecutive preferred designations are concatenated into a single designation, delimited by semicolon,
586
+ ## Consecutive preferred designations are concatenated into a single designation, delimited by semicolon,
584
587
## if they are both verbal designations, in the same language and locale, and neither has pronunciation or grammar information
585
588
preferred+,
586
- ## In some flavours, admited designations are prefixed with the i18n of "ADMITTED:"
589
+ fmt_preferred?,
587
590
admitted*,
588
- ## Deprecated designations are prefixed with the i18n of "DEPRECATED:"
591
+ fmt_admitted?,
589
592
deprecates*,
593
+ fmt_deprecates?,
590
594
related*,
595
+ fmt_related?,
591
596
termdomain?,
592
597
termsubject?,
593
- ## UNWRAP: multiple termdefinitions are replaced with a single definition, consiting of an ordered list of definitions
594
598
termdefinition,
599
+ fmt_termdefinition?,
595
600
termnote*,
596
601
termexample*,
597
- TermSource
602
+ TermSource,
603
+ fmt_termsource
598
604
}
599
605
600
- ## Indicate that domain display is to be suppressed if it is being rendered inside of a definition
601
- ## TODO will rescind that and put in a pattern that crossreferences rendered Semantic XML elements and their original
602
- termdomain &=
603
- attribute hidden { xsd:boolean }
604
-
605
- ## UNWRAP: The designation is replaced with a string concatenating its data:
606
- ## The designation name, then field-of-application and usage-info comma-delimited and in angle brackets,
607
- ## then expression/grammar information comma-delimited, then language, script and locale comma-delimited,
608
- ## then expression/pronunciation comma-delimited and in slashes.
609
- ## Bookmarks inside the designation are removed. Preferred designations are boldfaced.
610
- ## Any termsources within the designation are moved after it
611
- Designation =
612
- attribute absent { xsd:boolean }?,
613
- attribute geographic-area { text }?,
614
- PureTextElement+
615
-
616
- ## UNWRAP: remove verbaldefinition wrapper
617
- verbaldefinition =
618
- (paragraph | dl | ol | ul | table | figure | formula)+,
619
- TermSource
620
-
621
- ## UNWRAP: remove nonverbalrep wrapper
622
- nonverbalrep =
623
- ( table | figure | formula )+,
624
- TermSource
625
-
626
606
DisplayOrder =
627
607
## The top-level clauses and blocks of the document are numbered in the order in which they should be rendered,
628
608
## taking floating titles into account.
@@ -714,6 +694,9 @@ date_inline |= text
714
694
## * fmt-conn is used to annotate Boolean conjunctions introduced in auto-generated text, such as of multiple cross-references,
715
695
## e.g. "Clauses 2, 3 *and* 5".
716
696
## * fmt-obligation is used to annotate the indication of obligation in annex titles ("normative", "informative").
697
+ ## * fmt-designation-field is used to annotate grammatical and usage annotations of designations, including their
698
+ ## delimiers, in order to enable easy deletion; e.g.
699
+ ## <strong>paddy</strong><span class="fmt-designation-field">, <<semx element="field-of-application" source="_">in agriculture</semx>></span>
717
700
span &= empty
718
701
719
702
## UNWRAP: Number formatting is applied to stem/mathml expressions: inline stem, and if number formatting is specified
@@ -770,14 +753,25 @@ btitle &= empty
770
753
## Adjust title/@depth accordingly
771
754
annex-subsection &= empty
772
755
773
- ## Any termsources within the designation are moved after it
774
- preferred &= TermSource
775
-
776
- ## Any termsources within the designation are moved after it
777
- admitted &= TermSource
778
-
779
- ## Any termsources within the designation are moved after it
780
- deprecates &= TermSource
756
+ ## The designation is replaced with a string concatenating its data:
757
+ ## The designation name, then field-of-application and usage-info comma-delimited and in angle brackets,
758
+ ## then expression/grammar information comma-delimited, then language, script and locale comma-delimited,
759
+ ## then expression/pronunciation comma-delimited and in slashes.
760
+ ## Bookmarks inside the designation are removed. Preferred designations are boldfaced.
761
+ ### The verbaldefinition and nonverbalrep wrappers are removed.
762
+ ## <semx> is used to reference the Semantic XML designations and their components; and the elements expression, name, name, abbreviation-type,
763
+ ## pronunciation, grammar are resolved to text.
764
+ ## Consecutive preferred designations are concatenated into a single designation, delimited by semicolon,
765
+ ## if they are both verbal designations, in the same language and locale, and neither has pronunciation or grammar information.
766
+ ## Separate designations are wrapped in paragraphs; if designations are concatenated, they occur within a single paragraph.
767
+ ## In some flavours, the fmt_preferred element is not used, as the designations appear within fmt_definition instead, as a single paragraph.
768
+ fmt_preferred = element fmt-preferred { TextElement+ }
769
+
770
+ ## As for fmt_preferred. In some flavours, admited designations are prefixed with the i18n of "ADMITTED:"
771
+ fmt_admitted = element fmt-admitted { TextElement+ }
772
+
773
+ ## As for fmt_preferred. Deprecated designations are prefixed with the i18n of "DEPRECATED:"
774
+ fmt_deprecates = element fmt-deprecates { TextElement+ }
781
775
782
776
## In some flavours, the index section is not rendered.
783
777
## In others, e.g. ISO, it is populated with a list of cross-references, each representing an index entry
0 commit comments