Project

General

Profile

Feature #357 » draft-potvin-dwd-pipe-separated-format.html

html form - Charles Langlois, 02/09/2026 01:45 AM

 
1
<!DOCTYPE html>
2
<html lang="en" class="Internet-Draft">
3
<head>
4
<meta charset="utf-8">
5
<meta content="Common,Latin" name="scripts">
6
<meta content="initial-scale=1.0" name="viewport">
7
<title>Data With Direction (DWD) Pipe-Separated Format</title>
8
<meta content="Joseph Potvin" name="author">
9
<meta content="Charles Langlois" name="author">
10
<meta content="
11
       This document specifies the Data With Direction (DWD) pipe-separated
12
file format, a text-based format for encoding rule-based decision
13
logic. The format represents rules as collections of metadata and
14
truth tables that define input conditions and output assertions. 
15
       The format is designed for human readability and editability,
16
machine parsing and processing, version control system compatibility,
17
and exchange between rule management systems. 
18
    " name="description">
19
<meta content="xml2rfc 3.30.2" name="generator">
20
<meta content="DWD" name="keyword">
21
<meta content="Data With Direction" name="keyword">
22
<meta content="rules" name="keyword">
23
<meta content="truth tables" name="keyword">
24
<meta content="pipe-separated" name="keyword">
25
<meta content="draft-potvin-dwd-pipe-separated-format-00" name="ietf.draft">
26
<!-- Generator version information:
27
  xml2rfc 3.30.2
28
    Python 3.13.11
29
    ConfigArgParse 1.7.1
30
    google-i18n-address 3.1.1
31
    intervaltree 3.1.0
32
    Jinja2 3.1.6
33
    lxml 6.0.2
34
    platformdirs 4.5.0
35
    pycountry 24.6.1
36
    pypdf 6.1.0
37
    PyYAML 6.0.3
38
    requests 2.32.5
39
    wcwidth 0.2.13
40
-->
41
<link href="draft-potvin-dwd-pipe-separated-format.xml" rel="alternate" type="application/rfc+xml">
42
<link href="#copyright" rel="license">
43
<style type="text/css">/*
44

    
45
  NOTE: Changes at the bottom of this file overrides some earlier settings.
46

    
47
  Once the style has stabilized and has been adopted as an official RFC style,
48
  this can be consolidated so that style settings occur only in one place, but
49
  for now the contents of this file consists first of the initial CSS work as
50
  provided to the RFC Formatter (xml2rfc) work, followed by itemized and
51
  commented changes found necessary during the development of the v3
52
  formatters.
53

    
54
*/
55

    
56
/* fonts */
57
@import url('https://static.ietf.org/fonts/noto-sans/import.css'); /* Sans-serif */
58
@import url('https://static.ietf.org/fonts/noto-serif/import.css'); /* Serif (print) */
59
@import url('https://static.ietf.org/fonts/roboto-mono/import.css'); /* Monospace */
60

    
61
:root {
62
  --font-sans: 'Noto Sans', Arial, Helvetica, sans-serif;
63
  --font-serif: 'Noto Serif', 'Times', 'Times New Roman', serif;
64
  --font-mono: 'Roboto Mono', Courier, 'Courier New', monospace;
65
}
66

    
67
@viewport {
68
  zoom: 1.0;
69
}
70
@-ms-viewport {
71
  width: extend-to-zoom;
72
  zoom: 1.0;
73
}
74
/* general and mobile first */
75
html {
76
}
77
body {
78
  max-width: 90%;
79
  margin: 1.5em auto;
80
  color: #222;
81
  background-color: #fff;
82
  font-size: 14px;
83
  font-family: var(--font-sans);
84
  line-height: 1.6;
85
  scroll-behavior: smooth;
86
  overflow-wrap: break-word;
87
}
88
.ears {
89
  display: none;
90
}
91

    
92
/* headings */
93
#title, h1, h2, h3, h4, h5, h6 {
94
  margin: 1em 0 0.5em;
95
  font-weight: bold;
96
  line-height: 1.3;
97
}
98
#title {
99
  clear: both;
100
  border-bottom: 1px solid #ddd;
101
  margin: 0 0 0.5em 0;
102
  padding: 1em 0 0.5em;
103
}
104
.author {
105
  padding-bottom: 4px;
106
}
107
h1 {
108
  font-size: 26px;
109
  margin: 1em 0;
110
}
111
h2 {
112
  font-size: 22px;
113
  margin-top: -20px;  /* provide offset for in-page anchors */
114
  padding-top: 33px;
115
}
116
h3 {
117
  font-size: 18px;
118
  margin-top: -36px;  /* provide offset for in-page anchors */
119
  padding-top: 42px;
120
}
121
h4 {
122
  font-size: 16px;
123
  margin-top: -36px;  /* provide offset for in-page anchors */
124
  padding-top: 42px;
125
}
126
h5, h6 {
127
  font-size: 14px;
128
}
129
#n-copyright-notice {
130
  border-bottom: 1px solid #ddd;
131
  padding-bottom: 1em;
132
  margin-bottom: 1em;
133
}
134
/* general structure */
135
p {
136
  padding: 0;
137
  margin: 0 0 1em 0;
138
  text-align: left;
139
}
140
div, span {
141
  position: relative;
142
}
143
div {
144
  margin: 0;
145
}
146
.alignRight.art-text {
147
  background-color: #f9f9f9;
148
  border: 1px solid #eee;
149
  border-radius: 3px;
150
  padding: 1em 1em 0;
151
  margin-bottom: 1.5em;
152
}
153
.alignRight.art-text pre {
154
  padding: 0;
155
}
156
.alignRight {
157
  margin: 1em 0;
158
}
159
.alignRight > *:first-child {
160
  border: none;
161
  margin: 0;
162
  float: right;
163
  clear: both;
164
}
165
.alignRight > *:nth-child(2) {
166
  clear: both;
167
  display: block;
168
  border: none;
169
}
170
svg {
171
  display: block;
172
}
173
@media print {
174
  svg {
175
    max-height: 850px;
176
    max-width: 660px;
177
  }
178
}
179
svg[font-family~="serif" i], svg [font-family~="serif" i] {
180
  font-family: var(--font-serif);
181
}
182
svg[font-family~="sans-serif" i], svg [font-family~="sans-serif" i] {
183
  font-family: var(--font-sans);
184
}
185
svg[font-family~="monospace" i], svg [font-family~="monospace" i] {
186
  font-family: var(--font-mono);
187
}
188
.alignCenter.art-text {
189
  background-color: #f9f9f9;
190
  border: 1px solid #eee;
191
  border-radius: 3px;
192
  padding: 1em 1em 0;
193
  margin-bottom: 1.5em;
194
}
195
.alignCenter.art-text pre {
196
  padding: 0;
197
}
198
.alignCenter {
199
  margin: 1em 0;
200
}
201
.alignCenter > *:first-child {
202
  display: table;
203
  border: none;
204
  margin: 0 auto;
205
}
206

    
207
/* lists */
208
ol, ul {
209
  padding: 0;
210
  margin: 0 0 1em 2em;
211
}
212
ol ol, ul ul, ol ul, ul ol {
213
  margin-left: 1em;
214
}
215
li {
216
  margin: 0 0 0.25em 0;
217
}
218
.ulCompact li {
219
  margin: 0;
220
}
221
ul.empty, .ulEmpty {
222
  list-style-type: none;
223
}
224
ul.empty li, .ulEmpty li {
225
  margin-top: 0.5em;
226
}
227
ul.ulBare, li.ulBare {
228
  margin-left: 0em !important;
229
}
230
ul.compact, .ulCompact,
231
ol.compact, .olCompact {
232
  line-height: 100%;
233
  margin: 0 0 0 2em;
234
}
235

    
236
/* definition lists */
237
dl {
238
}
239
dl > dt {
240
  float: left;
241
  margin-right: 1em;
242
}
243
/* 
244
dl.nohang > dt {
245
  float: none;
246
}
247
*/
248
dl > dd {
249
  margin-bottom: .8em;
250
  min-height: 1.3em;
251
}
252
dl.compact > dd, .dlCompact > dd {
253
  margin-bottom: 0em;
254
}
255
dl > dd > dl {
256
  margin-top: 0.5em;
257
  margin-bottom: 0em;
258
}
259

    
260
/* links */
261
a {
262
  text-decoration: none;
263
}
264
a[href] {
265
  color: #22e; /* Arlen: WCAG 2019 */
266
}
267
a[href]:hover {
268
  background-color: #f2f2f2;
269
}
270
figcaption a[href],
271
a[href].selfRef {
272
  color: #222;
273
}
274
/* XXX probably not this:
275
a.selfRef:hover {
276
  background-color: transparent;
277
  cursor: default;
278
} */
279

    
280
/* Figures */
281
tt, code, pre {
282
  background-color: #f9f9f9;
283
  font-family: var(--font-mono);
284
}
285
pre {
286
  border: 1px solid #eee;
287
  margin: 0;
288
  padding: 1em;
289
}
290
img {
291
  max-width: 100%;
292
}
293
figure {
294
  margin: 0;
295
}
296
figure blockquote {
297
  margin: 0.8em 0.4em 0.4em;
298
}
299
figcaption {
300
  font-style: italic;
301
  margin: 0 0 1em 0;
302
}
303
@media screen {
304
  pre {
305
    overflow-x: auto;
306
    max-width: 100%;
307
    max-width: calc(100% - 22px);
308
  }
309
}
310

    
311
/* aside, blockquote */
312
aside, blockquote {
313
  margin-left: 0;
314
  padding: 1.2em 2em;
315
}
316
blockquote {
317
  background-color: #f9f9f9;
318
  color: #111; /* Arlen: WCAG 2019 */
319
  border: 1px solid #ddd;
320
  border-radius: 3px;
321
  margin: 1em 0;
322
}
323
blockquote > *:last-child {
324
  margin-bottom: 0;
325
}
326
cite {
327
  display: block;
328
  text-align: right;
329
  font-style: italic;
330
}
331
.xref {
332
  overflow-wrap: normal;
333
}
334

    
335
/* tables */
336
table {
337
  width: 100%;
338
  margin: 0 0 1em;
339
  border-collapse: collapse;
340
  border: 1px solid #eee;
341
}
342
th, td {
343
  text-align: left;
344
  vertical-align: top;
345
  padding: 0.5em 0.75em;
346
}
347
th {
348
  text-align: left;
349
  background-color: #e9e9e9;
350
}
351
tr:nth-child(2n+1) > td {
352
  background-color: #f5f5f5;
353
}
354
table caption {
355
  font-style: italic;
356
  margin: 0;
357
  padding: 0;
358
  text-align: left;
359
}
360
table p {
361
  /* XXX to avoid bottom margin on table row signifiers. If paragraphs should
362
     be allowed within tables more generally, it would be far better to select on a class. */
363
  margin: 0;
364
}
365

    
366
/* pilcrow */
367
a.pilcrow {
368
  color: #666; /* Arlen: AHDJ 2019 */
369
  text-decoration: none;
370
  visibility: hidden;
371
  user-select: none;
372
  -ms-user-select: none;
373
  -o-user-select:none;
374
  -moz-user-select: none;
375
  -khtml-user-select: none;
376
  -webkit-user-select: none;
377
  -webkit-touch-callout: none;
378
}
379
@media screen {
380
  aside:hover > a.pilcrow,
381
  p:hover > a.pilcrow,
382
  blockquote:hover > a.pilcrow,
383
  div:hover > a.pilcrow,
384
  li:hover > a.pilcrow,
385
  pre:hover > a.pilcrow {
386
    visibility: visible;
387
  }
388
  a.pilcrow:hover {
389
    background-color: transparent;
390
  }
391
}
392

    
393
/* misc */
394
hr {
395
  border: 0;
396
  border-top: 1px solid #eee;
397
}
398
.bcp14 {
399
  font-variant: small-caps;
400
}
401

    
402
.role {
403
  font-variant: all-small-caps;
404
}
405

    
406
/* info block */
407
#identifiers {
408
  margin: 0;
409
  font-size: 0.9em;
410
}
411
#identifiers dt {
412
  width: 3em;
413
  clear: left;
414
}
415
#identifiers dd {
416
  float: left;
417
  margin-bottom: 0;
418
}
419
/* Fix PDF info block run off issue */
420
@media print {
421
  #identifiers dd {
422
    max-width: 100%;
423
  }
424
}
425
#identifiers .authors .author {
426
  display: inline-block;
427
  margin-right: 1.5em;
428
}
429
#identifiers .authors .org {
430
  font-style: italic;
431
}
432

    
433
/* The prepared/rendered info at the very bottom of the page */
434
.docInfo {
435
  color: #666; /* Arlen: WCAG 2019 */
436
  font-size: 0.9em;
437
  font-style: italic;
438
  margin-top: 2em;
439
}
440
.docInfo .prepared {
441
  float: left;
442
}
443
.docInfo .prepared {
444
  float: right;
445
}
446

    
447
/* table of contents */
448
#toc  {
449
  padding: 0.75em 0 2em 0;
450
  margin-bottom: 1em;
451
}
452
nav.toc ul {
453
  margin: 0 0.5em 0 0;
454
  padding: 0;
455
  list-style: none;
456
}
457
nav.toc li {
458
  line-height: 1.3em;
459
  margin: 0.75em 0;
460
  padding-left: 1.2em;
461
  text-indent: -1.2em;
462
}
463
/* references */
464
.references dt {
465
  text-align: right;
466
  font-weight: bold;
467
  min-width: 7em;
468
}
469
.references dd {
470
  margin-left: 8em;
471
  overflow: auto;
472
}
473

    
474
.refInstance {
475
  margin-bottom: 1.25em;
476
}
477

    
478
.refSubseries {
479
  margin-bottom: 1.25em;
480
}
481

    
482
.references .ascii {
483
  margin-bottom: 0.25em;
484
}
485

    
486
/* index */
487
.index ul {
488
  margin: 0 0 0 1em;
489
  padding: 0;
490
  list-style: none;
491
}
492
.index ul ul {
493
  margin: 0;
494
}
495
.index li {
496
  margin: 0;
497
  text-indent: -2em;
498
  padding-left: 2em;
499
  padding-bottom: 5px;
500
}
501
.indexIndex {
502
  margin: 0.5em 0 1em;
503
}
504
.index a {
505
  font-weight: 700;
506
}
507
/* make the index two-column on all but the smallest screens */
508
@media (min-width: 600px) {
509
  .index ul {
510
    -moz-column-count: 2;
511
    -moz-column-gap: 20px;
512
  }
513
  .index ul ul {
514
    -moz-column-count: 1;
515
    -moz-column-gap: 0;
516
  }
517
}
518

    
519
/* authors */
520
address.vcard {
521
  font-style: normal;
522
  margin: 1em 0;
523
}
524

    
525
address.vcard .nameRole {
526
  font-weight: 700;
527
  margin-left: 0;
528
}
529
address.vcard .label {
530
  font-family: var(--font-sans);
531
  margin: 0.5em 0;
532
}
533
address.vcard .type {
534
  display: none;
535
}
536
.alternative-contact {
537
  margin: 1.5em 0 1em;
538
}
539
hr.addr {
540
  border-top: 1px dashed;
541
  margin: 0;
542
  color: #ddd;
543
  max-width: calc(100% - 16px);
544
}
545

    
546
/* temporary notes */
547
.rfcEditorRemove::before {
548
  position: absolute;
549
  top: 0.2em;
550
  right: 0.2em;
551
  padding: 0.2em;
552
  content: "The RFC Editor will remove this note";
553
  color: #9e2a00; /* Arlen: WCAG 2019 */
554
  background-color: #ffd; /* Arlen: WCAG 2019 */
555
}
556
.rfcEditorRemove {
557
  position: relative;
558
  padding-top: 1.8em;
559
  background-color: #ffd; /* Arlen: WCAG 2019 */
560
  border-radius: 3px;
561
}
562
.cref {
563
  background-color: #ffd; /* Arlen: WCAG 2019 */
564
  padding: 2px 4px;
565
}
566
.crefSource {
567
  font-style: italic;
568
}
569
/* alternative layout for smaller screens */
570
@media screen and (max-width: 1023px) {
571
  body {
572
    padding-top: 2em;
573
  }
574
  #title {
575
    padding: 1em 0;
576
  }
577
  h1 {
578
    font-size: 24px;
579
  }
580
  h2 {
581
    font-size: 20px;
582
    margin-top: -18px;  /* provide offset for in-page anchors */
583
    padding-top: 38px;
584
  }
585
  #identifiers dd {
586
    max-width: 60%;
587
  }
588
  #toc {
589
    position: fixed;
590
    z-index: 2;
591
    top: 0;
592
    right: 0;
593
    padding: 0;
594
    margin: 0;
595
    background-color: inherit;
596
    border-bottom: 1px solid #ccc;
597
  }
598
  #toc h2 {
599
    margin: -1px 0 0 0;
600
    padding: 4px 0 4px 6px;
601
    padding-right: 1em;
602
    min-width: 190px;
603
    font-size: 1.1em;
604
    text-align: right;
605
    background-color: #444;
606
    color: white;
607
    cursor: pointer;
608
  }
609
  #toc h2::before { /* css hamburger */
610
    float: right;
611
    position: relative;
612
    width: 1em;
613
    height: 1px;
614
    left: -164px;
615
    margin: 6px 0 0 0;
616
    background: white none repeat scroll 0 0;
617
    box-shadow: 0 4px 0 0 white, 0 8px 0 0 white;
618
    content: "";
619
  }
620
  #toc nav {
621
    display: none;
622
    padding: 0.5em 1em 1em;
623
    overflow: auto;
624
    height: calc(100vh - 48px);
625
    border-left: 1px solid #ddd;
626
  }
627
}
628

    
629
/* alternative layout for wide screens */
630
@media screen and (min-width: 1024px) {
631
  body {
632
    max-width: 724px;
633
    margin: 42px auto;
634
    padding-left: 1.5em;
635
    padding-right: 29em;
636
  }
637
  #toc {
638
    position: fixed;
639
    top: 42px;
640
    right: 42px;
641
    width: 25%;
642
    margin: 0;
643
    padding: 0 1em;
644
    z-index: 1;
645
  }
646
  #toc h2 {
647
    border-top: none;
648
    border-bottom: 1px solid #ddd;
649
    font-size: 1em;
650
    font-weight: normal;
651
    margin: 0;
652
    padding: 0.25em 1em 1em 0;
653
  }
654
  #toc nav {
655
    display: block;
656
    height: calc(90vh - 84px);
657
    bottom: 0;
658
    padding: 0.5em 0 0;
659
    overflow: auto;
660
  }
661
  img { /* future proofing */
662
    max-width: 100%;
663
    height: auto;
664
  }
665
}
666

    
667
/* pagination */
668
@media print {
669
  body {
670
    width: 100%;
671
  }
672
  p {
673
    orphans: 3;
674
    widows: 3;
675
  }
676
  #n-copyright-notice {
677
    border-bottom: none;
678
  }
679
  #toc, #n-introduction {
680
    page-break-before: always;
681
  }
682
  #toc {
683
    border-top: none;
684
    padding-top: 0;
685
  }
686
  figure, pre {
687
    page-break-inside: avoid;
688
  }
689
  figure {
690
    overflow: scroll;
691
  }
692
  .breakable pre {
693
    break-inside: auto;
694
  }
695
  h1, h2, h3, h4, h5, h6 {
696
    page-break-after: avoid;
697
  }
698
  h2+*, h3+*, h4+*, h5+*, h6+* {
699
    page-break-before: avoid;
700
  }
701
  pre {
702
    white-space: pre-wrap;
703
    word-wrap: break-word;
704
    font-size: 10pt;
705
  }
706
  table {
707
    border: 1px solid #ddd;
708
  }
709
  td {
710
    border-top: 1px solid #ddd;
711
  }
712
}
713

    
714
/* This is commented out here, as the string-set: doesn't
715
   pass W3C validation currently */
716
/*
717
.ears thead .left {
718
  string-set: ears-top-left content();
719
}
720

    
721
.ears thead .center {
722
  string-set: ears-top-center content();
723
}
724

    
725
.ears thead .right {
726
  string-set: ears-top-right content();
727
}
728

    
729
.ears tfoot .left {
730
  string-set: ears-bottom-left content();
731
}
732

    
733
.ears tfoot .center {
734
  string-set: ears-bottom-center content();
735
}
736

    
737
.ears tfoot .right {
738
  string-set: ears-bottom-right content();
739
}
740
*/
741

    
742
@page :first {
743
  padding-top: 0;
744
  @top-left {
745
    content: normal;
746
    border: none;
747
  }
748
  @top-center {
749
    content: normal;
750
    border: none;
751
  }
752
  @top-right {
753
    content: normal;
754
    border: none;
755
  }
756
}
757

    
758
@page {
759
  size: A4;
760
  margin-bottom: 45mm;
761
  padding-top: 20px;
762
  /* The following is commented out here, but set appropriately by in code, as
763
     the content depends on the document */
764
  /*
765
  @top-left {
766
    content: 'Internet-Draft';
767
    vertical-align: bottom;
768
    border-bottom: solid 1px #ccc;
769
  }
770
  @top-left {
771
    content: string(ears-top-left);
772
    vertical-align: bottom;
773
    border-bottom: solid 1px #ccc;
774
  }
775
  @top-center {
776
    content: string(ears-top-center);
777
    vertical-align: bottom;
778
    border-bottom: solid 1px #ccc;
779
  }
780
  @top-right {
781
    content: string(ears-top-right);
782
    vertical-align: bottom;
783
    border-bottom: solid 1px #ccc;
784
  }
785
  @bottom-left {
786
    content: string(ears-bottom-left);
787
    vertical-align: top;
788
    border-top: solid 1px #ccc;
789
  }
790
  @bottom-center {
791
    content: string(ears-bottom-center);
792
    vertical-align: top;
793
    border-top: solid 1px #ccc;
794
  }
795
  @bottom-right {
796
      content: '[Page ' counter(page) ']';
797
      vertical-align: top;
798
      border-top: solid 1px #ccc;
799
  }
800
  */
801

    
802
}
803

    
804
/* Changes introduced to fix issues found during implementation */
805
/* Make sure links are clickable even if overlapped by following H* */
806
a {
807
  z-index: 2;
808
}
809
/* Separate body from document info even without intervening H1 */
810
section {
811
  clear: both;
812
}
813

    
814

    
815
/* Top align author divs, to avoid names without organization dropping level with org names */
816
.author {
817
  vertical-align: top;
818
}
819

    
820
/* Leave room in document info to show Internet-Draft on one line */
821
#identifiers dt {
822
  width: 8em;
823
}
824

    
825
/* Don't waste quite as much whitespace between label and value in doc info */
826
#identifiers dd {
827
  margin-left: 1em;
828
}
829

    
830
/* Give floating toc a background color (needed when it's a div inside section */
831
#toc {
832
  background-color: white;
833
}
834

    
835
/* Make the collapsed ToC header render white on gray also when it's a link */
836
@media screen and (max-width: 1023px) {
837
  #toc h2 a,
838
  #toc h2 a:link,
839
  #toc h2 a:focus,
840
  #toc h2 a:hover,
841
  #toc a.toplink,
842
  #toc a.toplink:hover {
843
    color: white;
844
    background-color: #444;
845
    text-decoration: none;
846
  }
847
}
848

    
849
/* Give the bottom of the ToC some whitespace */
850
@media screen and (min-width: 1024px) {
851
  #toc {
852
    padding: 0 0 1em 1em;
853
  }
854
}
855

    
856
/* Style section numbers with more space between number and title */
857
.section-number {
858
  padding-right: 0.5em;
859
}
860

    
861
/* prevent monospace from becoming overly large */
862
tt, code, pre {
863
  font-size: 95%;
864
}
865

    
866
/* Fix the height/width aspect for ascii art*/
867
.sourcecode pre,
868
.art-text pre {
869
  line-height: 1.12;
870
}
871

    
872

    
873
/* Add styling for a link in the ToC that points to the top of the document */
874
a.toplink {
875
  float: right;
876
  margin-right: 0.5em;
877
}
878

    
879
/* Fix the dl styling to match the RFC 7992 attributes */
880
dl > dt,
881
dl.dlParallel > dt {
882
  float: left;
883
  margin-right: 1em;
884
}
885
dl.dlNewline > dt {
886
  float: none;
887
}
888

    
889
/* Provide styling for table cell text alignment */
890
table td.text-left,
891
table th.text-left {
892
  text-align: left;
893
}
894
table td.text-center,
895
table th.text-center {
896
  text-align: center;
897
}
898
table td.text-right,
899
table th.text-right {
900
  text-align: right;
901
}
902

    
903
/* Make the alternative author contact information look less like just another
904
   author, and group it closer with the primary author contact information */
905
.alternative-contact {
906
  margin: 0.5em 0 0.25em 0;
907
}
908
address .non-ascii {
909
  margin: 0 0 0 2em;
910
}
911

    
912
/* With it being possible to set tables with alignment
913
  left, center, and right, { width: 100%; } does not make sense */
914
table {
915
  width: auto;
916
}
917

    
918
/* Avoid reference text that sits in a block with very wide left margin,
919
   because of a long floating dt label.*/
920
.references dd {
921
  overflow: visible;
922
}
923

    
924
/* Control caption placement */
925
caption {
926
  caption-side: bottom;
927
}
928

    
929
/* Limit the width of the author address vcard, so names in right-to-left
930
   script don't end up on the other side of the page. */
931

    
932
address.vcard {
933
  max-width: 30em;
934
  margin-right: auto;
935
}
936

    
937
/* For address alignment dependent on LTR or RTL scripts */
938
address div.left {
939
  text-align: left;
940
}
941
address div.right {
942
  text-align: right;
943
}
944

    
945
/* Provide table alignment support.  We can't use the alignX classes above
946
   since they do unwanted things with caption and other styling. */
947
table.right {
948
 margin-left: auto;
949
 margin-right: 0;
950
}
951
table.center {
952
 margin-left: auto;
953
 margin-right: auto;
954
}
955
table.left {
956
 margin-left: 0;
957
 margin-right: auto;
958
}
959

    
960
/* Give the table caption label the same styling as the figcaption */
961
caption a[href] {
962
  color: #222;
963
}
964

    
965
@media print {
966
  .toplink {
967
    display: none;
968
  }
969

    
970
  /* avoid overwriting the top border line with the ToC header */
971
  #toc {
972
    padding-top: 1px;
973
  }
974

    
975
  /* Avoid page breaks inside dl and author address entries */
976
  .vcard {
977
    page-break-inside: avoid;
978
  }
979

    
980
}
981
/* Tweak the bcp14 keyword presentation */
982
.bcp14 {
983
  font-variant: small-caps;
984
  font-weight: bold;
985
  font-size: 0.9em;
986
}
987
/* Tweak the invisible space above H* in order not to overlay links in text above */
988
 h2 {
989
  margin-top: -18px;  /* provide offset for in-page anchors */
990
  padding-top: 31px;
991
 }
992
 h3 {
993
  margin-top: -18px;  /* provide offset for in-page anchors */
994
  padding-top: 24px;
995
 }
996
 h4 {
997
  margin-top: -18px;  /* provide offset for in-page anchors */
998
  padding-top: 24px;
999
 }
1000
/* Float artwork pilcrow to the right */
1001
@media screen {
1002
  .artwork a.pilcrow {
1003
    display: block;
1004
    line-height: 0.7;
1005
    margin-top: 0.15em;
1006
  }
1007
}
1008
/* Make pilcrows on dd visible */
1009
@media screen {
1010
  dd:hover > a.pilcrow {
1011
    visibility: visible;
1012
  }
1013
}
1014
/* Make the placement of figcaption match that of a table's caption
1015
   by removing the figure's added bottom margin */
1016
.alignLeft.art-text,
1017
.alignCenter.art-text,
1018
.alignRight.art-text {
1019
   margin-bottom: 0;
1020
}
1021
.alignLeft,
1022
.alignCenter,
1023
.alignRight {
1024
  margin: 1em 0 0 0;
1025
}
1026
/* In print, the pilcrow won't show on hover, so prevent it from taking up space,
1027
   possibly even requiring a new line */
1028
@media print {
1029
  a.pilcrow {
1030
    display: none;
1031
  }
1032
}
1033
/* Styling for the external metadata */
1034
div#external-metadata {
1035
  background-color: #eee;
1036
  padding: 0.5em;
1037
  margin-bottom: 0.5em;
1038
  display: none;
1039
}
1040
div#internal-metadata {
1041
  padding: 0.5em;                       /* to match the external-metadata padding */
1042
}
1043
/* Styling for title RFC Number */
1044
h1#rfcnum {
1045
  clear: both;
1046
  margin: 0 0 -1em;
1047
  padding: 1em 0 0 0;
1048
}
1049
/* Make .olPercent look the same as <ol><li> */
1050
dl.olPercent > dd {
1051
  margin-bottom: 0.25em;
1052
  min-height: initial;
1053
}
1054
/* Give aside some styling to set it apart */
1055
aside {
1056
  border-left: 1px solid #ddd;
1057
  margin: 1em 0 1em 2em;
1058
  padding: 0.2em 2em;
1059
}
1060
aside > dl,
1061
aside > ol,
1062
aside > ul,
1063
aside > table,
1064
aside > p {
1065
  margin-bottom: 0.5em;
1066
}
1067
/* Additional page break settings */
1068
@media print {
1069
  figcaption, table caption {
1070
    page-break-before: avoid;
1071
  }
1072
}
1073
/* Font size adjustments for print */
1074
@media print {
1075
  body  { font-size: 10pt;      line-height: normal; max-width: 96%; }
1076
  h1    { font-size: 1.72em;    padding-top: 1.5em; } /* 1*1.2*1.2*1.2 */
1077
  h2    { font-size: 1.44em;    padding-top: 1.5em; } /* 1*1.2*1.2 */
1078
  h3    { font-size: 1.2em;     padding-top: 1.5em; } /* 1*1.2 */
1079
  h4    { font-size: 1em;       padding-top: 1.5em; }
1080
  h5, h6 { font-size: 1em;      margin: initial; padding: 0.5em 0 0.3em; }
1081
}
1082
/* Sourcecode margin in print, when there's no pilcrow */
1083
@media print {
1084
  .artwork,
1085
  .artwork > pre,
1086
  .sourcecode {
1087
    margin-bottom: 1em;
1088
  }
1089
}
1090
/* Avoid narrow tables forcing too narrow table captions, which may render badly */
1091
table {
1092
  min-width: 20em;
1093
}
1094
/* ol type a */
1095
ol.type-a { list-style-type: lower-alpha; }
1096
ol.type-A { list-style-type: upper-alpha; }
1097
ol.type-i { list-style-type: lower-roman; }
1098
ol.type-I { list-style-type: upper-roman; }
1099
/* Apply the print table and row borders in general, on request from the RPC,
1100
and increase the contrast between border and odd row background slightly */
1101
table {
1102
  border: 1px solid #ddd;
1103
}
1104
td {
1105
  border-top: 1px solid #ddd;
1106
}
1107
tr {
1108
  break-inside: avoid;
1109
}
1110
tr:nth-child(2n+1) > td {
1111
  background-color: #f8f8f8;
1112
}
1113
/* Use style rules to govern display of the TOC. */
1114
@media screen and (max-width: 1023px) {
1115
  #toc nav { display: none; }
1116
  #toc.active nav { display: block; }
1117
}
1118
/* Add support for keepWithNext */
1119
.keepWithNext {
1120
  break-after: avoid-page;
1121
  break-after: avoid-page;
1122
}
1123
/* Add support for keepWithPrevious */
1124
.keepWithPrevious {
1125
  break-before: avoid-page;
1126
}
1127
/* Change the approach to avoiding breaks inside artwork etc. */
1128
figure, pre, table, .artwork, .sourcecode  {
1129
  break-before: auto;
1130
  break-after: auto;
1131
}
1132
/* Avoid breaks between <dt> and <dd> */
1133
dl {
1134
  break-before: auto;
1135
  break-inside: auto;
1136
}
1137
dt {
1138
  break-before: auto;
1139
  break-after: avoid-page;
1140
}
1141
dd {
1142
  break-before: avoid-page;
1143
  break-after: auto;
1144
  orphans: 3;
1145
  widows: 3
1146
}
1147
span.break, dd.break {
1148
  margin-bottom: 0;
1149
  min-height: 0;
1150
  break-before: auto;
1151
  break-inside: auto;
1152
  break-after: auto;
1153
}
1154
/* Undo break-before ToC */
1155
@media print {
1156
  #toc {
1157
    break-before: auto;
1158
  }
1159
}
1160
/* Text in compact lists should not get extra bottom margin space,
1161
   since that would makes the list not compact */
1162
ul.compact p, .ulCompact p,
1163
ol.compact p, .olCompact p {
1164
 margin: 0;
1165
}
1166
/* But the list as a whole needs the extra space at the end */
1167
section ul.compact,
1168
section .ulCompact,
1169
section ol.compact,
1170
section .olCompact {
1171
  margin-bottom: 1em;                    /* same as p not within ul.compact etc. */
1172
}
1173
/* The tt and code background above interferes with for instance table cell
1174
   backgrounds.  Changed to something a bit more selective. */
1175
tt, code {
1176
  background-color: transparent;
1177
}
1178
p tt, p code, li tt, li code, dt tt, dt code {
1179
  background-color: #f8f8f8;
1180
}
1181
/* Tweak the pre margin -- 0px doesn't come out well */
1182
pre {
1183
   margin-top: 0.5px;
1184
}
1185
/* Tweak the compact list text */
1186
ul.compact, .ulCompact,
1187
ol.compact, .olCompact,
1188
dl.compact, .dlCompact {
1189
  line-height: normal;
1190
}
1191
/* Don't add top margin for nested lists */
1192
li > ul, li > ol, li > dl,
1193
dd > ul, dd > ol, dd > dl,
1194
dl > dd > dl {
1195
  margin-top: initial;
1196
}
1197
/* Elements that should not be rendered on the same line as a <dt> */
1198
/* This should match the element list in writer.text.TextWriter.render_dl() */
1199
dd > div.artwork:first-child,
1200
dd > aside:first-child,
1201
dd > blockquote:first-child,
1202
dd > figure:first-child,
1203
dd > ol:first-child,
1204
dd > div.sourcecode:first-child,
1205
dd > table:first-child,
1206
dd > ul:first-child {
1207
  clear: left;
1208
}
1209
/* fix for weird browser behaviour when <dd/> is empty */
1210
dt+dd:empty::before{
1211
  content: "\00a0";
1212
}
1213
/* Make paragraph spacing inside <li> smaller than in body text, to fit better within the list */
1214
li > p {
1215
  margin-bottom: 0.5em
1216
}
1217
/* Don't let p margin spill out from inside list items */
1218
li > p:last-of-type:only-child {
1219
  margin-bottom: 0;
1220
}
1221
</style>
1222
<link href="rfc-local.css" rel="stylesheet" type="text/css">
1223
<script type="application/javascript">async function addMetadata(){try{const e=document.styleSheets[0].cssRules;for(let t=0;t<e.length;t++)if(/#identifiers/.exec(e[t].selectorText)){const a=e[t].cssText.replace("#identifiers","#external-updates");document.styleSheets[0].insertRule(a,document.styleSheets[0].cssRules.length)}}catch(e){console.log(e)}const e=document.getElementById("external-metadata");if(e)try{var t,a="",o=function(e){const t=document.getElementsByTagName("meta");for(let a=0;a<t.length;a++)if(t[a].getAttribute("name")===e)return t[a].getAttribute("content");return""}("rfc.number");if(o){t="https://www.rfc-editor.org/rfc/rfc"+o+".json";try{const e=await fetch(t);a=await e.json()}catch(e){t=document.URL.indexOf("html")>=0?document.URL.replace(/html$/,"json"):document.URL+".json";const o=await fetch(t);a=await o.json()}}if(!a)return;e.style.display="block";const s="",d="https://datatracker.ietf.org/doc",n="https://datatracker.ietf.org/ipr/search",c="https://www.rfc-editor.org/info",l=a.doc_id.toLowerCase(),i=a.doc_id.slice(0,3).toLowerCase(),f=a.doc_id.slice(3).replace(/^0+/,""),u={status:"Status",obsoletes:"Obsoletes",obsoleted_by:"Obsoleted By",updates:"Updates",updated_by:"Updated By",see_also:"See Also",errata_url:"Errata"};let h="<dl style='overflow:hidden' id='external-updates'>";["status","obsoletes","obsoleted_by","updates","updated_by","see_also","errata_url"].forEach(e=>{if("status"==e){a[e]=a[e].toLowerCase();var t=a[e].split(" "),o=t.length,w="",p=1;for(let e=0;e<o;e++)p<o?w=w+r(t[e])+" ":w+=r(t[e]),p++;a[e]=w}else if("obsoletes"==e||"obsoleted_by"==e||"updates"==e||"updated_by"==e){var g,m="",b=1;g=a[e].length;for(let t=0;t<g;t++)a[e][t]&&(a[e][t]=String(a[e][t]).toLowerCase(),m=b<g?m+"<a href='"+s+"/rfc/".concat(a[e][t])+"'>"+a[e][t].slice(3)+"</a>, ":m+"<a href='"+s+"/rfc/".concat(a[e][t])+"'>"+a[e][t].slice(3)+"</a>",b++);a[e]=m}else if("see_also"==e){var y,L="",C=1;y=a[e].length;for(let t=0;t<y;t++)if(a[e][t]){a[e][t]=String(a[e][t]);var _=a[e][t].slice(0,3),v=a[e][t].slice(3).replace(/^0+/,"");L=C<y?"RFC"!=_?L+"<a href='"+s+"/info/"+_.toLowerCase().concat(v.toLowerCase())+"'>"+_+" "+v+"</a>, ":L+"<a href='"+s+"/info/"+_.toLowerCase().concat(v.toLowerCase())+"'>"+v+"</a>, ":"RFC"!=_?L+"<a href='"+s+"/info/"+_.toLowerCase().concat(v.toLowerCase())+"'>"+_+" "+v+"</a>":L+"<a href='"+s+"/info/"+_.toLowerCase().concat(v.toLowerCase())+"'>"+v+"</a>",C++}a[e]=L}else if("errata_url"==e){var R="";R=a[e]?R+"<a href='"+a[e]+"'>Errata exist</a> | <a href='"+d+"/"+l+"'>Datatracker</a>| <a href='"+n+"/?"+i+"="+f+"&submit="+i+"'>IPR</a> | <a href='"+c+"/"+l+"'>Info page</a>":"<a href='"+d+"/"+l+"'>Datatracker</a> | <a href='"+n+"/?"+i+"="+f+"&submit="+i+"'>IPR</a> | <a href='"+c+"/"+l+"'>Info page</a>",a[e]=R}""!=a[e]?"Errata"==u[e]?h+=`<dt>More info:</dt><dd>${a[e]}</dd>`:h+=`<dt>${u[e]}:</dt><dd>${a[e]}</dd>`:"Errata"==u[e]&&(h+=`<dt>More info:</dt><dd>${a[e]}</dd>`)}),h+="</dl>",e.innerHTML=h}catch(e){console.log(e)}else console.log("Could not locate metadata <div> element");function r(e){return e.charAt(0).toUpperCase()+e.slice(1)}}window.removeEventListener("load",addMetadata),window.addEventListener("load",addMetadata);</script>
1224
</head>
1225
<body class="xml2rfc">
1226
<table class="ears">
1227
<thead><tr>
1228
<td class="left">Internet-Draft</td>
1229
<td class="center">DWD-PSF</td>
1230
<td class="right">February 2026</td>
1231
</tr></thead>
1232
<tfoot><tr>
1233
<td class="left">Potvin &amp; Langlois</td>
1234
<td class="center">Expires 12 August 2026</td>
1235
<td class="right">[Page]</td>
1236
</tr></tfoot>
1237
</table>
1238
<div id="external-metadata" class="document-information"></div>
1239
<div id="internal-metadata" class="document-information">
1240
<dl id="identifiers">
1241
<dt class="label-workgroup">Workgroup:</dt>
1242
<dd class="workgroup">Independent Submission</dd>
1243
<dt class="label-internet-draft">Internet-Draft:</dt>
1244
<dd class="internet-draft">draft-potvin-dwd-pipe-separated-format-00</dd>
1245
<dt class="label-published">Published:</dt>
1246
<dd class="published">
1247
<time datetime="2026-02-08" class="published">8 February 2026</time>
1248
    </dd>
1249
<dt class="label-intended-status">Intended Status:</dt>
1250
<dd class="intended-status">Informational</dd>
1251
<dt class="label-expires">Expires:</dt>
1252
<dd class="expires"><time datetime="2026-08-12">12 August 2026</time></dd>
1253
<dt class="label-authors">Authors:</dt>
1254
<dd class="authors">
1255
<div class="author">
1256
      <div class="author-name">J. Potvin</div>
1257
<div class="org">Xalgorithms Foundation</div>
1258
</div>
1259
<div class="author">
1260
      <div class="author-name">C. Langlois</div>
1261
<div class="org">Xalgorithms Foundation</div>
1262
</div>
1263
</dd>
1264
</dl>
1265
</div>
1266
<h1 id="title">Data With Direction (DWD) Pipe-Separated Format</h1>
1267
<section id="section-abstract">
1268
      <h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
1269
<p id="section-abstract-1">This document specifies the Data With Direction (DWD) pipe-separated
1270
file format, a text-based format for encoding rule-based decision
1271
logic. The format represents rules as collections of metadata and
1272
truth tables that define input conditions and output assertions.<a href="#section-abstract-1" class="pilcrow"></a></p>
1273
<p id="section-abstract-2">The format is designed for human readability and editability,
1274
machine parsing and processing, version control system compatibility,
1275
and exchange between rule management systems.<a href="#section-abstract-2" class="pilcrow"></a></p>
1276
</section>
1277
<div id="status-of-memo">
1278
<section id="section-boilerplate.1">
1279
        <h2 id="name-status-of-this-memo">
1280
<a href="#name-status-of-this-memo" class="section-name selfRef">Status of This Memo</a>
1281
        </h2>
1282
<p id="section-boilerplate.1-1">
1283
        This Internet-Draft is submitted in full conformance with the
1284
        provisions of BCP 78 and BCP 79.<a href="#section-boilerplate.1-1" class="pilcrow"></a></p>
1285
<p id="section-boilerplate.1-2">
1286
        Internet-Drafts are working documents of the Internet Engineering Task
1287
        Force (IETF). Note that other groups may also distribute working
1288
        documents as Internet-Drafts. The list of current Internet-Drafts is
1289
        at <span><a href="https://datatracker.ietf.org/drafts/current/">https://datatracker.ietf.org/drafts/current/</a></span>.<a href="#section-boilerplate.1-2" class="pilcrow"></a></p>
1290
<p id="section-boilerplate.1-3">
1291
        Internet-Drafts are draft documents valid for a maximum of six months
1292
        and may be updated, replaced, or obsoleted by other documents at any
1293
        time. It is inappropriate to use Internet-Drafts as reference
1294
        material or to cite them other than as "work in progress."<a href="#section-boilerplate.1-3" class="pilcrow"></a></p>
1295
<p id="section-boilerplate.1-4">
1296
        This Internet-Draft will expire on 12 August 2026.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
1297
</section>
1298
</div>
1299
<div id="copyright">
1300
<section id="section-boilerplate.2">
1301
        <h2 id="name-copyright-notice">
1302
<a href="#name-copyright-notice" class="section-name selfRef">Copyright Notice</a>
1303
        </h2>
1304
<p id="section-boilerplate.2-1">
1305
            Copyright (c) 2026 IETF Trust and the persons identified as the
1306
            document authors. All rights reserved.<a href="#section-boilerplate.2-1" class="pilcrow"></a></p>
1307
<p id="section-boilerplate.2-2">
1308
            This document is subject to BCP 78 and the IETF Trust's Legal
1309
            Provisions Relating to IETF Documents
1310
            (<span><a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a></span>) in effect on the date of
1311
            publication of this document. Please review these documents
1312
            carefully, as they describe your rights and restrictions with
1313
            respect to this document. Code Components extracted from this
1314
            document must include Revised BSD License text as described in
1315
            Section 4.e of the Trust Legal Provisions and are provided without
1316
            warranty as described in the Revised BSD License.<a href="#section-boilerplate.2-2" class="pilcrow"></a></p>
1317
</section>
1318
</div>
1319
<div id="toc">
1320
<section id="section-toc.1">
1321
        <a href="#" onclick="scroll(0,0)" class="toplink"></a><h2 id="name-table-of-contents">
1322
<a href="#name-table-of-contents" class="section-name selfRef">Table of Contents</a>
1323
        </h2>
1324
<nav class="toc"><ul class="compact toc ulBare ulEmpty">
1325
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1">
1326
            <p id="section-toc.1-1.1.1"><a href="#section-1" class="auto internal xref">1</a>.  <a href="#name-introduction" class="internal xref">Introduction</a></p>
1327
<ul class="compact toc ulBare ulEmpty">
1328
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1.2.1">
1329
                <p id="section-toc.1-1.1.2.1.1" class="keepWithNext"><a href="#section-1.1" class="auto internal xref">1.1</a>.  <a href="#name-purpose" class="internal xref">Purpose</a></p>
1330
</li>
1331
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1.2.2">
1332
                <p id="section-toc.1-1.1.2.2.1" class="keepWithNext"><a href="#section-1.2" class="auto internal xref">1.2</a>.  <a href="#name-scope" class="internal xref">Scope</a></p>
1333
</li>
1334
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1.2.3">
1335
                <p id="section-toc.1-1.1.2.3.1" class="keepWithNext"><a href="#section-1.3" class="auto internal xref">1.3</a>.  <a href="#name-terminology" class="internal xref">Terminology</a></p>
1336
</li>
1337
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1.2.4">
1338
                <p id="section-toc.1-1.1.2.4.1"><a href="#section-1.4" class="auto internal xref">1.4</a>.  <a href="#name-notational-conventions" class="internal xref">Notational Conventions</a></p>
1339
</li>
1340
            </ul>
1341
</li>
1342
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2">
1343
            <p id="section-toc.1-1.2.1"><a href="#section-2" class="auto internal xref">2</a>.  <a href="#name-document-structure" class="internal xref">Document Structure</a></p>
1344
<ul class="compact toc ulBare ulEmpty">
1345
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1">
1346
                <p id="section-toc.1-1.2.2.1.1"><a href="#section-2.1" class="auto internal xref">2.1</a>.  <a href="#name-file-encoding" class="internal xref">File Encoding</a></p>
1347
</li>
1348
            </ul>
1349
</li>
1350
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3">
1351
            <p id="section-toc.1-1.3.1"><a href="#section-3" class="auto internal xref">3</a>.  <a href="#name-line-structure" class="internal xref">Line Structure</a></p>
1352
</li>
1353
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4">
1354
            <p id="section-toc.1-1.4.1"><a href="#section-4" class="auto internal xref">4</a>.  <a href="#name-field-structure" class="internal xref">Field Structure</a></p>
1355
</li>
1356
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5">
1357
            <p id="section-toc.1-1.5.1"><a href="#section-5" class="auto internal xref">5</a>.  <a href="#name-record-types" class="internal xref">Record Types</a></p>
1358
</li>
1359
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6">
1360
            <p id="section-toc.1-1.6.1"><a href="#section-6" class="auto internal xref">6</a>.  <a href="#name-metadata-section" class="internal xref">Metadata Section</a></p>
1361
<ul class="compact toc ulBare ulEmpty">
1362
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6.2.1">
1363
                <p id="section-toc.1-1.6.2.1.1"><a href="#section-6.1" class="auto internal xref">6.1</a>.  <a href="#name-metadata-fields" class="internal xref">Metadata Fields</a></p>
1364
</li>
1365
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6.2.2">
1366
                <p id="section-toc.1-1.6.2.2.1"><a href="#section-6.2" class="auto internal xref">6.2</a>.  <a href="#name-nested-metadata" class="internal xref">Nested Metadata</a></p>
1367
</li>
1368
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6.2.3">
1369
                <p id="section-toc.1-1.6.2.3.1"><a href="#section-6.3" class="auto internal xref">6.3</a>.  <a href="#name-reserved-fields" class="internal xref">Reserved Fields</a></p>
1370
</li>
1371
            </ul>
1372
</li>
1373
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7">
1374
            <p id="section-toc.1-1.7.1"><a href="#section-7" class="auto internal xref">7</a>.  <a href="#name-truth-table-section" class="internal xref">Truth Table Section</a></p>
1375
<ul class="compact toc ulBare ulEmpty">
1376
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.1">
1377
                <p id="section-toc.1-1.7.2.1.1"><a href="#section-7.1" class="auto internal xref">7.1</a>.  <a href="#name-truth-table-structure-overv" class="internal xref">Truth Table Structure Overview</a></p>
1378
</li>
1379
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.2">
1380
                <p id="section-toc.1-1.7.2.2.1"><a href="#section-7.2" class="auto internal xref">7.2</a>.  <a href="#name-row-identifiers" class="internal xref">Row Identifiers</a></p>
1381
</li>
1382
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.3">
1383
                <p id="section-toc.1-1.7.2.3.1"><a href="#section-7.3" class="auto internal xref">7.3</a>.  <a href="#name-column-headers" class="internal xref">Column Headers</a></p>
1384
</li>
1385
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.4">
1386
                <p id="section-toc.1-1.7.2.4.1"><a href="#section-7.4" class="auto internal xref">7.4</a>.  <a href="#name-data-rows" class="internal xref">Data Rows</a></p>
1387
</li>
1388
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.5">
1389
                <p id="section-toc.1-1.7.2.5.1"><a href="#section-7.5" class="auto internal xref">7.5</a>.  <a href="#name-expression-field-content" class="internal xref">Expression Field Content</a></p>
1390
</li>
1391
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.6">
1392
                <p id="section-toc.1-1.7.2.6.1"><a href="#section-7.6" class="auto internal xref">7.6</a>.  <a href="#name-truth-value-encoding" class="internal xref">Truth Value Encoding</a></p>
1393
</li>
1394
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.7">
1395
                <p id="section-toc.1-1.7.2.7.1"><a href="#section-7.7" class="auto internal xref">7.7</a>.  <a href="#name-dwd-storage-formats" class="internal xref">DWD Storage Formats</a></p>
1396
</li>
1397
            </ul>
1398
</li>
1399
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8">
1400
            <p id="section-toc.1-1.8.1"><a href="#section-8" class="auto internal xref">8</a>.  <a href="#name-syntax-specification" class="internal xref">Syntax Specification</a></p>
1401
<ul class="compact toc ulBare ulEmpty">
1402
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.1">
1403
                <p id="section-toc.1-1.8.2.1.1"><a href="#section-8.1" class="auto internal xref">8.1</a>.  <a href="#name-abnf-grammar" class="internal xref">ABNF Grammar</a></p>
1404
</li>
1405
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8.2.2">
1406
                <p id="section-toc.1-1.8.2.2.1"><a href="#section-8.2" class="auto internal xref">8.2</a>.  <a href="#name-field-value-constraints" class="internal xref">Field Value Constraints</a></p>
1407
</li>
1408
            </ul>
1409
</li>
1410
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9">
1411
            <p id="section-toc.1-1.9.1"><a href="#section-9" class="auto internal xref">9</a>.  <a href="#name-examples" class="internal xref">Examples</a></p>
1412
<ul class="compact toc ulBare ulEmpty">
1413
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9.2.1">
1414
                <p id="section-toc.1-1.9.2.1.1"><a href="#section-9.1" class="auto internal xref">9.1</a>.  <a href="#name-complete-example" class="internal xref">Complete Example</a></p>
1415
</li>
1416
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9.2.2">
1417
                <p id="section-toc.1-1.9.2.2.1"><a href="#section-9.2" class="auto internal xref">9.2</a>.  <a href="#name-metadata-only-example" class="internal xref">Metadata Only Example</a></p>
1418
</li>
1419
            </ul>
1420
</li>
1421
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.10">
1422
            <p id="section-toc.1-1.10.1"><a href="#section-10" class="auto internal xref">10</a><a href="#name-security-considerations" class="internal xref">Security Considerations</a></p>
1423
<ul class="compact toc ulBare ulEmpty">
1424
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.10.2.1">
1425
                <p id="section-toc.1-1.10.2.1.1"><a href="#section-10.1" class="auto internal xref">10.1</a>.  <a href="#name-input-validation" class="internal xref">Input Validation</a></p>
1426
</li>
1427
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.10.2.2">
1428
                <p id="section-toc.1-1.10.2.2.1"><a href="#section-10.2" class="auto internal xref">10.2</a>.  <a href="#name-field-value-sanitization" class="internal xref">Field Value Sanitization</a></p>
1429
</li>
1430
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.10.2.3">
1431
                <p id="section-toc.1-1.10.2.3.1"><a href="#section-10.3" class="auto internal xref">10.3</a>.  <a href="#name-external-references" class="internal xref">External References</a></p>
1432
</li>
1433
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.10.2.4">
1434
                <p id="section-toc.1-1.10.2.4.1"><a href="#section-10.4" class="auto internal xref">10.4</a>.  <a href="#name-privacy-considerations" class="internal xref">Privacy Considerations</a></p>
1435
</li>
1436
            </ul>
1437
</li>
1438
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.11">
1439
            <p id="section-toc.1-1.11.1"><a href="#section-11" class="auto internal xref">11</a><a href="#name-iana-considerations" class="internal xref">IANA Considerations</a></p>
1440
</li>
1441
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12">
1442
            <p id="section-toc.1-1.12.1"><a href="#section-12" class="auto internal xref">12</a><a href="#name-references" class="internal xref">References</a></p>
1443
<ul class="compact toc ulBare ulEmpty">
1444
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.1">
1445
                <p id="section-toc.1-1.12.2.1.1"><a href="#section-12.1" class="auto internal xref">12.1</a>.  <a href="#name-normative-references" class="internal xref">Normative References</a></p>
1446
</li>
1447
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.12.2.2">
1448
                <p id="section-toc.1-1.12.2.2.1"><a href="#section-12.2" class="auto internal xref">12.2</a>.  <a href="#name-informative-references" class="internal xref">Informative References</a></p>
1449
</li>
1450
            </ul>
1451
</li>
1452
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.13">
1453
            <p id="section-toc.1-1.13.1"><a href="#appendix-A" class="auto internal xref">Appendix A</a>.  <a href="#name-acknowledgments" class="internal xref">Acknowledgments</a></p>
1454
</li>
1455
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.14">
1456
            <p id="section-toc.1-1.14.1"><a href="#appendix-B" class="auto internal xref">Appendix B</a>.  <a href="#name-appendix-a-comparison-with-" class="internal xref">Appendix A. Comparison with Related Formats</a></p>
1457
<ul class="compact toc ulBare ulEmpty">
1458
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.14.2.1">
1459
                <p id="section-toc.1-1.14.2.1.1"><a href="#appendix-B.1" class="auto internal xref">B.1</a>.  <a href="#name-csv-comma-separated-values" class="internal xref">CSV (Comma-Separated Values)</a></p>
1460
</li>
1461
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.14.2.2">
1462
                <p id="section-toc.1-1.14.2.2.1"><a href="#appendix-B.2" class="auto internal xref">B.2</a>.  <a href="#name-tsv-tab-separated-values" class="internal xref">TSV (Tab-Separated Values)</a></p>
1463
</li>
1464
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.14.2.3">
1465
                <p id="section-toc.1-1.14.2.3.1"><a href="#appendix-B.3" class="auto internal xref">B.3</a>.  <a href="#name-json" class="internal xref">JSON</a></p>
1466
</li>
1467
            </ul>
1468
</li>
1469
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.15">
1470
            <p id="section-toc.1-1.15.1"><a href="#appendix-C" class="auto internal xref">Appendix C</a>.  <a href="#name-appendix-b-implementation-g" class="internal xref">Appendix B. Implementation Guidelines</a></p>
1471
<ul class="compact toc ulBare ulEmpty">
1472
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.15.2.1">
1473
                <p id="section-toc.1-1.15.2.1.1"><a href="#appendix-C.1" class="auto internal xref">C.1</a>.  <a href="#name-parsing-strategy" class="internal xref">Parsing Strategy</a></p>
1474
</li>
1475
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.15.2.2">
1476
                <p id="section-toc.1-1.15.2.2.1"><a href="#appendix-C.2" class="auto internal xref">C.2</a>.  <a href="#name-error-handling" class="internal xref">Error Handling</a></p>
1477
</li>
1478
              <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.15.2.3">
1479
                <p id="section-toc.1-1.15.2.3.1"><a href="#appendix-C.3" class="auto internal xref">C.3</a>.  <a href="#name-round-trip-preservation" class="internal xref">Round-Trip Preservation</a></p>
1480
</li>
1481
            </ul>
1482
</li>
1483
          <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.16">
1484
            <p id="section-toc.1-1.16.1"><a href="#appendix-D" class="auto internal xref"></a><a href="#name-authors-addresses" class="internal xref">Authors' Addresses</a></p>
1485
</li>
1486
        </ul>
1487
</nav>
1488
</section>
1489
</div>
1490
<div id="introduction">
1491
<section id="section-1">
1492
      <h2 id="name-introduction">
1493
<a href="#section-1" class="section-number selfRef">1. </a><a href="#name-introduction" class="section-name selfRef">Introduction</a>
1494
      </h2>
1495
<div id="purpose">
1496
<section id="section-1.1">
1497
        <h3 id="name-purpose">
1498
<a href="#section-1.1" class="section-number selfRef">1.1. </a><a href="#name-purpose" class="section-name selfRef">Purpose</a>
1499
        </h3>
1500
<p id="section-1.1-1">This document specifies the Data With Direction (DWD) pipe-separated
1501
file format. The format represents rules as collections of metadata and
1502
truth tables that define input conditions and output assertions.<a href="#section-1.1-1" class="pilcrow"></a></p>
1503
<p id="section-1.1-2">The format is designed for:<a href="#section-1.1-2" class="pilcrow"></a></p>
1504
<ul class="normal">
1505
<li class="normal" id="section-1.1-3.1">
1506
            <p id="section-1.1-3.1.1">Human readability and editability<a href="#section-1.1-3.1.1" class="pilcrow"></a></p>
1507
</li>
1508
          <li class="normal" id="section-1.1-3.2">
1509
            <p id="section-1.1-3.2.1">Machine parsing and processing<a href="#section-1.1-3.2.1" class="pilcrow"></a></p>
1510
</li>
1511
          <li class="normal" id="section-1.1-3.3">
1512
            <p id="section-1.1-3.3.1">Version control system compatibility<a href="#section-1.1-3.3.1" class="pilcrow"></a></p>
1513
</li>
1514
          <li class="normal" id="section-1.1-3.4">
1515
            <p id="section-1.1-3.4.1">Exchange between rule management systems<a href="#section-1.1-3.4.1" class="pilcrow"></a></p>
1516
</li>
1517
        </ul>
1518
</section>
1519
</div>
1520
<div id="scope">
1521
<section id="section-1.2">
1522
        <h3 id="name-scope">
1523
<a href="#section-1.2" class="section-number selfRef">1.2. </a><a href="#name-scope" class="section-name selfRef">Scope</a>
1524
        </h3>
1525
<p id="section-1.2-1">This specification defines:<a href="#section-1.2-1" class="pilcrow"></a></p>
1526
<ul class="normal">
1527
<li class="normal" id="section-1.2-2.1">
1528
            <p id="section-1.2-2.1.1">The syntax and structure of DWD pipe-separated files<a href="#section-1.2-2.1.1" class="pilcrow"></a></p>
1529
</li>
1530
          <li class="normal" id="section-1.2-2.2">
1531
            <p id="section-1.2-2.2.1">The interpretation of metadata fields<a href="#section-1.2-2.2.1" class="pilcrow"></a></p>
1532
</li>
1533
          <li class="normal" id="section-1.2-2.3">
1534
            <p id="section-1.2-2.3.1">The encoding of truth tables<a href="#section-1.2-2.3.1" class="pilcrow"></a></p>
1535
</li>
1536
          <li class="normal" id="section-1.2-2.4">
1537
            <p id="section-1.2-2.4.1">Constraints on field values<a href="#section-1.2-2.4.1" class="pilcrow"></a></p>
1538
</li>
1539
        </ul>
1540
<p id="section-1.2-3">This specification does NOT define:<a href="#section-1.2-3" class="pilcrow"></a></p>
1541
<ul class="normal">
1542
<li class="normal" id="section-1.2-4.1">
1543
            <p id="section-1.2-4.1.1">The semantics of specific rule domains<a href="#section-1.2-4.1.1" class="pilcrow"></a></p>
1544
</li>
1545
          <li class="normal" id="section-1.2-4.2">
1546
            <p id="section-1.2-4.2.1">Processing algorithms for truth tables<a href="#section-1.2-4.2.1" class="pilcrow"></a></p>
1547
</li>
1548
          <li class="normal" id="section-1.2-4.3">
1549
            <p id="section-1.2-4.3.1">Storage or transmission mechanisms<a href="#section-1.2-4.3.1" class="pilcrow"></a></p>
1550
</li>
1551
          <li class="normal" id="section-1.2-4.4">
1552
            <p id="section-1.2-4.4.1">User interface representations<a href="#section-1.2-4.4.1" class="pilcrow"></a></p>
1553
</li>
1554
        </ul>
1555
</section>
1556
</div>
1557
<div id="terminology">
1558
<section id="section-1.3">
1559
        <h3 id="name-terminology">
1560
<a href="#section-1.3" class="section-number selfRef">1.3. </a><a href="#name-terminology" class="section-name selfRef">Terminology</a>
1561
        </h3>
1562
<p id="section-1.3-1">The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
1563
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
1564
"MAY", and "OPTIONAL" in this document are to be interpreted as
1565
described in BCP 14 <span>[<a href="#RFC2119" class="cite xref">RFC2119</a>]</span> <span>[<a href="#RFC8174" class="cite xref">RFC8174</a>]</span> when, and only when, they
1566
appear in all capitals, as shown here.<a href="#section-1.3-1" class="pilcrow"></a></p>
1567
<p id="section-1.3-2">Additional terms used in this specification:<a href="#section-1.3-2" class="pilcrow"></a></p>
1568
<span class="break"></span><dl class="dlParallel" id="section-1.3-3">
1569
          <dt id="section-1.3-3.1">DWD Document:</dt>
1570
          <dd style="margin-left: 1.5em" id="section-1.3-3.2">
1571
            <p id="section-1.3-3.2.1">A file conforming to this specification containing rule metadata
1572
and truth table data.<a href="#section-1.3-3.2.1" class="pilcrow"></a></p>
1573
</dd>
1574
          <dd class="break"></dd>
1575
<dt id="section-1.3-3.3">Record:</dt>
1576
          <dd style="margin-left: 1.5em" id="section-1.3-3.4">
1577
            <p id="section-1.3-3.4.1">A single line in a DWD document representing either metadata or
1578
truth table data.<a href="#section-1.3-3.4.1" class="pilcrow"></a></p>
1579
</dd>
1580
          <dd class="break"></dd>
1581
<dt id="section-1.3-3.5">Field:</dt>
1582
          <dd style="margin-left: 1.5em" id="section-1.3-3.6">
1583
            <p id="section-1.3-3.6.1">A data element within a record, separated by pipe characters.<a href="#section-1.3-3.6.1" class="pilcrow"></a></p>
1584
</dd>
1585
          <dd class="break"></dd>
1586
<dt id="section-1.3-3.7">Truth Table:</dt>
1587
          <dd style="margin-left: 1.5em" id="section-1.3-3.8">
1588
            <p id="section-1.3-3.8.1">A tabular representation of input conditions mapped to output
1589
assertions.<a href="#section-1.3-3.8.1" class="pilcrow"></a></p>
1590
</dd>
1591
          <dd class="break"></dd>
1592
<dt id="section-1.3-3.9">Scenario:</dt>
1593
          <dd style="margin-left: 1.5em" id="section-1.3-3.10">
1594
            <p id="section-1.3-3.10.1">A specific combination of input conditions identified by a
1595
column in the truth table.<a href="#section-1.3-3.10.1" class="pilcrow"></a></p>
1596
</dd>
1597
        <dd class="break"></dd>
1598
</dl>
1599
</section>
1600
</div>
1601
<div id="notational-conventions">
1602
<section id="section-1.4">
1603
        <h3 id="name-notational-conventions">
1604
<a href="#section-1.4" class="section-number selfRef">1.4. </a><a href="#name-notational-conventions" class="section-name selfRef">Notational Conventions</a>
1605
        </h3>
1606
<p id="section-1.4-1">This specification uses ABNF <span>[<a href="#RFC5234" class="cite xref">RFC5234</a>]</span> for formal syntax definitions.<a href="#section-1.4-1" class="pilcrow"></a></p>
1607
<p id="section-1.4-2">The pipe character '|' is used as both a delimiter in the format
1608
and in ABNF grammar. In ABNF examples, the pipe character as a
1609
delimiter is represented as %d124 (ASCII decimal value).<a href="#section-1.4-2" class="pilcrow"></a></p>
1610
</section>
1611
</div>
1612
</section>
1613
</div>
1614
<div id="document-structure">
1615
<section id="section-2">
1616
      <h2 id="name-document-structure">
1617
<a href="#section-2" class="section-number selfRef">2. </a><a href="#name-document-structure" class="section-name selfRef">Document Structure</a>
1618
      </h2>
1619
<div id="file-encoding">
1620
<section id="section-2.1">
1621
        <h3 id="name-file-encoding">
1622
<a href="#section-2.1" class="section-number selfRef">2.1. </a><a href="#name-file-encoding" class="section-name selfRef">File Encoding</a>
1623
        </h3>
1624
<p id="section-2.1-1">DWD documents MUST be encoded using UTF-8 <span>[<a href="#RFC3629" class="cite xref">RFC3629</a>]</span>.<a href="#section-2.1-1" class="pilcrow"></a></p>
1625
<p id="section-2.1-2">DWD documents SHOULD use Unix-style line endings (LF, %d10).
1626
Implementations MAY also accept Windows-style line endings (CRLF,
1627
%d13 %d10) for interoperability.<a href="#section-2.1-2" class="pilcrow"></a></p>
1628
<p id="section-2.1-3">The byte order mark (BOM) MUST NOT be present in DWD documents.<a href="#section-2.1-3" class="pilcrow"></a></p>
1629
</section>
1630
</div>
1631
</section>
1632
</div>
1633
<div id="line-structure">
1634
<section id="section-3">
1635
      <h2 id="name-line-structure">
1636
<a href="#section-3" class="section-number selfRef">3. </a><a href="#name-line-structure" class="section-name selfRef">Line Structure</a>
1637
      </h2>
1638
<p id="section-3-1">A DWD document consists of a sequence of lines. Each line represents
1639
either a metadata record or a truth table record.<a href="#section-3-1" class="pilcrow"></a></p>
1640
<p id="section-3-2">Lines are delimited by line ending characters. The final line of a
1641
document SHOULD be terminated with a line ending.
1642
Parser implementations MAY handle a final line without a line ending for robustness against unconforming implementations or legacy or corrupted data files.<a href="#section-3-2" class="pilcrow"></a></p>
1643
<p id="section-3-3">Blank lines (lines containing only whitespace or empty) SHOULD be
1644
ignored by parsers and SHOULD NOT be generated.<a href="#section-3-3" class="pilcrow"></a></p>
1645
<p id="section-3-4">Lines SHOULD NOT exceed 1000 characters in length. Implementations
1646
MUST support lines of at least 2000 characters for robustness.<a href="#section-3-4" class="pilcrow"></a></p>
1647
</section>
1648
</div>
1649
<div id="field-structure">
1650
<section id="section-4">
1651
      <h2 id="name-field-structure">
1652
<a href="#section-4" class="section-number selfRef">4. </a><a href="#name-field-structure" class="section-name selfRef">Field Structure</a>
1653
      </h2>
1654
<p id="section-4-1">Each line is composed of fields separated by the pipe character
1655
(|, ASCII 124). The pipe character serves as the field delimiter.<a href="#section-4-1" class="pilcrow"></a></p>
1656
<p id="section-4-2">Field Structure Rules:<a href="#section-4-2" class="pilcrow"></a></p>
1657
<ol start="1" type="1" class="normal type-1" id="section-4-3">
1658
<li id="section-4-3.1">
1659
          <p id="section-4-3.1.1">Every line MUST begin with a pipe character. For retrocompatibility and robustness, implementations SHOULD handle a missing leading pipe character with no functional degradation.<a href="#section-4-3.1.1" class="pilcrow"></a></p>
1660
</li>
1661
        <li id="section-4-3.2">
1662
          <p id="section-4-3.2.1">Every line MUST end with a pipe character and line ending. For retrocompatibility and robustness, Implementations SHOULD handle a missing trailing pipe character with no functional degradation.<a href="#section-4-3.2.1" class="pilcrow"></a></p>
1663
</li>
1664
        <li id="section-4-3.3">
1665
          <p id="section-4-3.3.1">Fields are the text between pipe delimiters.<a href="#section-4-3.3.1" class="pilcrow"></a></p>
1666
</li>
1667
        <li id="section-4-3.4">
1668
          <p id="section-4-3.4.1">Empty fields (consecutive pipes) are valid and represent empty
1669
string values.<a href="#section-4-3.4.1" class="pilcrow"></a></p>
1670
</li>
1671
        <li id="section-4-3.5">
1672
          <p id="section-4-3.5.1">Leading and trailing whitespace within fields SHOULD be preserved
1673
but MAY be trimmed by implementations.<a href="#section-4-3.5.1" class="pilcrow"></a></p>
1674
</li>
1675
      </ol>
1676
<p id="section-4-4">Example field structure:<a href="#section-4-4" class="pilcrow"></a></p>
1677
<div class="alignLeft art-text artwork" id="section-4-5">
1678
<pre>
1679
|field1|field2|field3|
1680
</pre><a href="#section-4-5" class="pilcrow"></a>
1681
</div>
1682
<p id="section-4-6">This line contains three fields: "field1", "field2", and "field3".<a href="#section-4-6" class="pilcrow"></a></p>
1683
<div class="alignLeft art-text artwork" id="section-4-7">
1684
<pre>
1685
|field1||field3|
1686
</pre><a href="#section-4-7" class="pilcrow"></a>
1687
</div>
1688
<p id="section-4-8">This line contains three fields: "field1", "" (empty), and "field3".<a href="#section-4-8" class="pilcrow"></a></p>
1689
</section>
1690
</div>
1691
<div id="record-types">
1692
<section id="section-5">
1693
      <h2 id="name-record-types">
1694
<a href="#section-5" class="section-number selfRef">5. </a><a href="#name-record-types" class="section-name selfRef">Record Types</a>
1695
      </h2>
1696
<p id="section-5-1">DWD documents contain two main sections:<a href="#section-5-1" class="pilcrow"></a></p>
1697
<ol start="1" type="1" class="normal type-1" id="section-5-2">
1698
<li id="section-5-2.1">
1699
          <p id="section-5-2.1.1">Metadata Section - Contains descriptive information <em>about</em> the rule<a href="#section-5-2.1.1" class="pilcrow"></a></p>
1700
</li>
1701
        <li id="section-5-2.2">
1702
          <p id="section-5-2.2.1">Truth Table Section - Contains the decision logic concerned by the rule as a truth table<a href="#section-5-2.2.1" class="pilcrow"></a></p>
1703
</li>
1704
      </ol>
1705
<p id="section-5-3">Record type is determined by the content of the first field:<a href="#section-5-3" class="pilcrow"></a></p>
1706
<ul class="normal">
1707
<li class="normal" id="section-5-4.1">
1708
          <p id="section-5-4.1.1">Records with a first field containing a dot-separated identifier
1709
(e.g., "metadata.rule.120_title") are metadata records. (See <a href="#metadata-section" class="auto internal xref">Section 6</a>).<a href="#section-5-4.1.1" class="pilcrow"></a></p>
1710
</li>
1711
        <li class="normal" id="section-5-4.2">
1712
          <p id="section-5-4.2.1">Records with a first field starting with "INDEX" are truth table
1713
column header records. (See <a href="#truth-table-section" class="auto internal xref">Section 7</a>).<a href="#section-5-4.2.1" class="pilcrow"></a></p>
1714
</li>
1715
        <li class="normal" id="section-5-4.3">
1716
          <p id="section-5-4.3.1">Records with a first field starting with a letter followed by
1717
digits and dots (e.g., "W1.1", "T_W1.1_W2.1_W3.1") are truth
1718
table data records. (See <a href="#truth-table-section" class="auto internal xref">Section 7</a>).<a href="#section-5-4.3.1" class="pilcrow"></a></p>
1719
</li>
1720
      </ul>
1721
</section>
1722
</div>
1723
<div id="metadata-section">
1724
<section id="section-6">
1725
      <h2 id="name-metadata-section">
1726
<a href="#section-6" class="section-number selfRef">6. </a><a href="#name-metadata-section" class="section-name selfRef">Metadata Section</a>
1727
      </h2>
1728
<div id="metadata-fields">
1729
<section id="section-6.1">
1730
        <h3 id="name-metadata-fields">
1731
<a href="#section-6.1" class="section-number selfRef">6.1. </a><a href="#name-metadata-fields" class="section-name selfRef">Metadata Fields</a>
1732
        </h3>
1733
<p id="section-6.1-1">Metadata records use a key-value pair structure. The first field
1734
contains the metadata key (a hierarchical identifier), and the
1735
second field contains the value.<a href="#section-6.1-1" class="pilcrow"></a></p>
1736
<p id="section-6.1-2">Metadata Record Format:<a href="#section-6.1-2" class="pilcrow"></a></p>
1737
<div class="alignLeft art-text artwork" id="section-6.1-3">
1738
<pre>
1739
|key|value|
1740
</pre><a href="#section-6.1-3" class="pilcrow"></a>
1741
</div>
1742
<p id="section-6.1-4">The key uses dot notation to represent hierarchy:<a href="#section-6.1-4" class="pilcrow"></a></p>
1743
<ul class="normal">
1744
<li class="normal" id="section-6.1-5.1">
1745
            <p id="section-6.1-5.1.1">Top-level categories (e.g., "rule_id", "version_standard_url")<a href="#section-6.1-5.1.1" class="pilcrow"></a></p>
1746
</li>
1747
          <li class="normal" id="section-6.1-5.2">
1748
            <p id="section-6.1-5.2.1">Nested properties (e.g., "metadata.rule.120_title")<a href="#section-6.1-5.2.1" class="pilcrow"></a></p>
1749
</li>
1750
          <li class="normal" id="section-6.1-5.3">
1751
            <p id="section-6.1-5.3.1">Array indices (e.g., "metadata.rule.rulemaker_manager.1.name")<a href="#section-6.1-5.3.1" class="pilcrow"></a></p>
1752
</li>
1753
        </ul>
1754
<p id="section-6.1-6">Required Metadata Fields:<a href="#section-6.1-6" class="pilcrow"></a></p>
1755
<table class="center" id="table-1">
1756
          <caption><a href="#table-1" class="selfRef">Table 1</a></caption>
1757
<thead>
1758
            <tr>
1759
              <th class="text-left" rowspan="1" colspan="1">Field</th>
1760
              <th class="text-left" rowspan="1" colspan="1">Description</th>
1761
              <th class="text-left" rowspan="1" colspan="1">Value type</th>
1762
            </tr>
1763
          </thead>
1764
          <tbody>
1765
            <tr>
1766
              <td class="text-left" rowspan="1" colspan="1">rule_id</td>
1767
              <td class="text-left" rowspan="1" colspan="1">Unique rule identifier</td>
1768
              <td class="text-left" rowspan="1" colspan="1">UUID</td>
1769
            </tr>
1770
            <tr>
1771
              <td class="text-left" rowspan="1" colspan="1">ruledata_version</td>
1772
              <td class="text-left" rowspan="1" colspan="1">Format version (SemVer)</td>
1773
              <td class="text-left" rowspan="1" colspan="1">Dotted digit string</td>
1774
            </tr>
1775
          </tbody>
1776
        </table>
1777
<p id="section-6.1-8">(See <a href="#field-value-constraints" class="auto internal xref">Section 8.2</a>).<a href="#section-6.1-8" class="pilcrow"></a></p>
1778
<p id="section-6.1-9">Other metadata fields to expect are outside the scope of this specification, and may evolve independently.
1779
Those two required fields are considered critical for the technical considerations of this file format (a unique identifier to distinguish rules efficiently, and a format version specifier to establish which specification version was used to produce the file, and allow parser implementations to efficiently handle different versions).<a href="#section-6.1-9" class="pilcrow"></a></p>
1780
<p id="section-6.1-10">A separate specification should be expected to distinguish other mandatory and optional fields for semantic purpose, detail the validation rules for the values of those fields, any semantics attached to them, and constraints on user-specific metadata.<a href="#section-6.1-10" class="pilcrow"></a></p>
1781
</section>
1782
</div>
1783
<div id="nested-metadata">
1784
<section id="section-6.2">
1785
        <h3 id="name-nested-metadata">
1786
<a href="#section-6.2" class="section-number selfRef">6.2. </a><a href="#name-nested-metadata" class="section-name selfRef">Nested Metadata</a>
1787
        </h3>
1788
<p id="section-6.2-1">Metadata supports nested structures using dot notation and numeric
1789
indices for arrays.<a href="#section-6.2-1" class="pilcrow"></a></p>
1790
<p id="section-6.2-2">Object Properties:<a href="#section-6.2-2" class="pilcrow"></a></p>
1791
<div class="alignLeft art-text artwork" id="section-6.2-3">
1792
<pre>
1793
|metadata.rule.rulemaker_manager.1.name|John Doe|
1794
|metadata.rule.rulemaker_manager.1.email|[email protected]|
1795
</pre><a href="#section-6.2-3" class="pilcrow"></a>
1796
</div>
1797
<p id="section-6.2-4">Array Representation:<a href="#section-6.2-4" class="pilcrow"></a></p>
1798
<p id="section-6.2-5">Arrays are represented using 1-based numeric indices. The index
1799
appears as the final component of the key path.<a href="#section-6.2-5" class="pilcrow"></a></p>
1800
<div class="alignLeft art-text artwork" id="section-6.2-6">
1801
<pre>
1802
|metadata.rule.rulemaker_manager.1.name|Manager One|
1803
|metadata.rule.rulemaker_manager.2.name|Manager Two|
1804
</pre><a href="#section-6.2-6" class="pilcrow"></a>
1805
</div>
1806
</section>
1807
</div>
1808
<div id="reserved-fields">
1809
<section id="section-6.3">
1810
        <h3 id="name-reserved-fields">
1811
<a href="#section-6.3" class="section-number selfRef">6.3. </a><a href="#name-reserved-fields" class="section-name selfRef">Reserved Fields</a>
1812
        </h3>
1813
<p id="section-6.3-1">The following field names are reserved and have special meaning:<a href="#section-6.3-1" class="pilcrow"></a></p>
1814
<ul class="normal">
1815
<li class="normal" id="section-6.3-2.1">
1816
            <p id="section-6.3-2.1.1">INDEX - Marks the beginning of the truth table column header row<a href="#section-6.3-2.1.1" class="pilcrow"></a></p>
1817
</li>
1818
          <li class="normal" id="section-6.3-2.2">
1819
            <p id="section-6.3-2.2.1">W1, W2... - Truth table row identifiers (World/Condition identifiers)<a href="#section-6.3-2.2.1" class="pilcrow"></a></p>
1820
</li>
1821
          <li class="normal" id="section-6.3-2.3">
1822
            <p id="section-6.3-2.3.1">T_... - Truth table cell entries (Transaction/Truth entries)<a href="#section-6.3-2.3.1" class="pilcrow"></a></p>
1823
</li>
1824
        </ul>
1825
<p id="section-6.3-3">Reserved field patterns:<a href="#section-6.3-3" class="pilcrow"></a></p>
1826
<ul class="normal">
1827
<li class="normal" id="section-6.3-4.1">
1828
            <p id="section-6.3-4.1.1">/^W\d+(.\d+)*$/ - World/scenario identifiers<a href="#section-6.3-4.1.1" class="pilcrow"></a></p>
1829
</li>
1830
          <li class="normal" id="section-6.3-4.2">
1831
            <p id="section-6.3-4.2.1">/^T_W\d+_W\d+_W\d+/ - Truth table cell identifiers<a href="#section-6.3-4.2.1" class="pilcrow"></a></p>
1832
</li>
1833
          <li class="normal" id="section-6.3-4.3">
1834
            <p id="section-6.3-4.3.1">/^INDEX/ - Column header marker<a href="#section-6.3-4.3.1" class="pilcrow"></a></p>
1835
</li>
1836
        </ul>
1837
</section>
1838
</div>
1839
</section>
1840
</div>
1841
<div id="truth-table-section">
1842
<section id="section-7">
1843
      <h2 id="name-truth-table-section">
1844
<a href="#section-7" class="section-number selfRef">7. </a><a href="#name-truth-table-section" class="section-name selfRef">Truth Table Section</a>
1845
      </h2>
1846
<div id="truth-table-structure-overview">
1847
<section id="section-7.1">
1848
        <h3 id="name-truth-table-structure-overv">
1849
<a href="#section-7.1" class="section-number selfRef">7.1. </a><a href="#name-truth-table-structure-overv" class="section-name selfRef">Truth Table Structure Overview</a>
1850
        </h3>
1851
<p id="section-7.1-1">DWD truth tables use a hierarchical organization with three main
1852
categories of rows:<a href="#section-7.1-1" class="pilcrow"></a></p>
1853
<span class="break"></span><dl class="dlParallel" id="section-7.1-2">
1854
          <dt id="section-7.1-2.1">W1 (World/Scenario):</dt>
1855
          <dd style="margin-left: 1.5em" id="section-7.1-2.2">
1856
            <p id="section-7.1-2.2.1">Defines the possible scenarios or cases being considered. Each W1.x
1857
row represents a distinct scenario identifier (e.g., A, B, C, D).<a href="#section-7.1-2.2.1" class="pilcrow"></a></p>
1858
</dd>
1859
          <dd class="break"></dd>
1860
<dt id="section-7.1-2.3">W2 (Function):</dt>
1861
          <dd style="margin-left: 1.5em" id="section-7.1-2.4">
1862
            <p id="section-7.1-2.4.1">Specifies whether a row represents an input condition or an output
1863
assertion:
1864
* W2.1: Input Condition - Conditions that must be evaluated
1865
* W2.2: Output Assertion - Results or actions to be taken<a href="#section-7.1-2.4.1" class="pilcrow"></a></p>
1866
</dd>
1867
          <dd class="break"></dd>
1868
<dt id="section-7.1-2.5">W3 (Expression):</dt>
1869
          <dd style="margin-left: 1.5em" id="section-7.1-2.6">
1870
            <p id="section-7.1-2.6.1">Contains the actual logical expressions or values associated with
1871
the conditions. These may be:
1872
* Human-readable descriptions
1873
* Machine-readable JSON structures
1874
* References to external data<a href="#section-7.1-2.6.1" class="pilcrow"></a></p>
1875
</dd>
1876
        <dd class="break"></dd>
1877
</dl>
1878
<p id="section-7.1-3">For Lookup Tables, a similar structure uses K-rows:<a href="#section-7.1-3" class="pilcrow"></a></p>
1879
<span class="break"></span><dl class="dlParallel" id="section-7.1-4">
1880
          <dt id="section-7.1-4.1">K1, K2, K3... (Key Categories):</dt>
1881
          <dd style="margin-left: 1.5em" id="section-7.1-4.2">
1882
            <p id="section-7.1-4.2.1">Hierarchical key dimensions for multi-dimensional lookup tables.
1883
Each Kx.y represents a specific key value within a category.<a href="#section-7.1-4.2.1" class="pilcrow"></a></p>
1884
</dd>
1885
        <dd class="break"></dd>
1886
</dl>
1887
<p id="section-7.1-5">The relationship between these components creates a three-dimensional
1888
logical space where:
1889
* W1 defines the scenario/case dimension
1890
* W2 defines the functional dimension (input/output)
1891
* W3 provides the semantic content<a href="#section-7.1-5" class="pilcrow"></a></p>
1892
<p id="section-7.1-6">Truth table entries (T-rows) connect these dimensions:
1893
T_W{x}_W{y}_W{z} indicates the truth value at the intersection of
1894
scenario W1.x, function W2.y, and expression W3.z.<a href="#section-7.1-6" class="pilcrow"></a></p>
1895
</section>
1896
</div>
1897
<div id="row-identifiers">
1898
<section id="section-7.2">
1899
        <h3 id="name-row-identifiers">
1900
<a href="#section-7.2" class="section-number selfRef">7.2. </a><a href="#name-row-identifiers" class="section-name selfRef">Row Identifiers</a>
1901
        </h3>
1902
<p id="section-7.2-1">W-Row Identifier Format:<a href="#section-7.2-1" class="pilcrow"></a></p>
1903
<ul class="normal">
1904
<li class="normal" id="section-7.2-2.1">
1905
            <p id="section-7.2-2.1.1">W{n} - Category header (e.g., W1, W2, W3)<a href="#section-7.2-2.1.1" class="pilcrow"></a></p>
1906
</li>
1907
          <li class="normal" id="section-7.2-2.2">
1908
            <p id="section-7.2-2.2.1">W{n}.{m} - Specific condition within category (e.g., W1.1, W1.2)<a href="#section-7.2-2.2.1" class="pilcrow"></a></p>
1909
</li>
1910
          <li class="normal" id="section-7.2-2.3">
1911
            <p id="section-7.2-2.3.1">W{n}.{m}.{o} - Further subdivision (e.g., W1.1.1, W1.1.2)<a href="#section-7.2-2.3.1" class="pilcrow"></a></p>
1912
</li>
1913
        </ul>
1914
<p id="section-7.2-3">W-Row Types:<a href="#section-7.2-3" class="pilcrow"></a></p>
1915
<table class="center" id="table-2">
1916
          <caption><a href="#table-2" class="selfRef">Table 2</a></caption>
1917
<thead>
1918
            <tr>
1919
              <th class="text-left" rowspan="1" colspan="1">Type</th>
1920
              <th class="text-left" rowspan="1" colspan="1">Pattern</th>
1921
              <th class="text-left" rowspan="1" colspan="1">Purpose</th>
1922
            </tr>
1923
          </thead>
1924
          <tbody>
1925
            <tr>
1926
              <td class="text-left" rowspan="1" colspan="1">W1</td>
1927
              <td class="text-left" rowspan="1" colspan="1">W1, W1.x</td>
1928
              <td class="text-left" rowspan="1" colspan="1">Scenario/World identifiers</td>
1929
            </tr>
1930
            <tr>
1931
              <td class="text-left" rowspan="1" colspan="1">W2</td>
1932
              <td class="text-left" rowspan="1" colspan="1">W2, W2.x</td>
1933
              <td class="text-left" rowspan="1" colspan="1">Function type (Input/Output)</td>
1934
            </tr>
1935
            <tr>
1936
              <td class="text-left" rowspan="1" colspan="1">W3</td>
1937
              <td class="text-left" rowspan="1" colspan="1">W3, W3.x</td>
1938
              <td class="text-left" rowspan="1" colspan="1">Expression/Value definitions</td>
1939
            </tr>
1940
          </tbody>
1941
        </table>
1942
<p id="section-7.2-5">K-Row Identifier Format (for Lookup Tables):<a href="#section-7.2-5" class="pilcrow"></a></p>
1943
<ul class="normal">
1944
<li class="normal" id="section-7.2-6.1">
1945
            <p id="section-7.2-6.1.1">K{n} - Key category header (e.g., K1, K2, K3)<a href="#section-7.2-6.1.1" class="pilcrow"></a></p>
1946
</li>
1947
          <li class="normal" id="section-7.2-6.2">
1948
            <p id="section-7.2-6.2.1">K{n}.{m} - Specific key value (e.g., K1.1, K1.2)<a href="#section-7.2-6.2.1" class="pilcrow"></a></p>
1949
</li>
1950
        </ul>
1951
<p id="section-7.2-7">K-Row Types:<a href="#section-7.2-7" class="pilcrow"></a></p>
1952
<table class="center" id="table-3">
1953
          <caption><a href="#table-3" class="selfRef">Table 3</a></caption>
1954
<thead>
1955
            <tr>
1956
              <th class="text-left" rowspan="1" colspan="1">Type</th>
1957
              <th class="text-left" rowspan="1" colspan="1">Pattern</th>
1958
              <th class="text-left" rowspan="1" colspan="1">Purpose</th>
1959
            </tr>
1960
          </thead>
1961
          <tbody>
1962
            <tr>
1963
              <td class="text-left" rowspan="1" colspan="1">K1, K2...</td>
1964
              <td class="text-left" rowspan="1" colspan="1">K1, K1.x, etc.</td>
1965
              <td class="text-left" rowspan="1" colspan="1">Key dimension categories</td>
1966
            </tr>
1967
            <tr>
1968
              <td class="text-left" rowspan="1" colspan="1">V_...</td>
1969
              <td class="text-left" rowspan="1" colspan="1">V_Kx.y_Kz.w...</td>
1970
              <td class="text-left" rowspan="1" colspan="1">Value assertions at key coordinates</td>
1971
            </tr>
1972
          </tbody>
1973
        </table>
1974
<p id="section-7.2-9">Identifier Constraints:<a href="#section-7.2-9" class="pilcrow"></a></p>
1975
<ul class="normal">
1976
<li class="normal" id="section-7.2-10.1">
1977
            <p id="section-7.2-10.1.1">Numbers are 1-indexed (start at 1, not 0)<a href="#section-7.2-10.1.1" class="pilcrow"></a></p>
1978
</li>
1979
          <li class="normal" id="section-7.2-10.2">
1980
            <p id="section-7.2-10.2.1">Hierarchical depth is theoretically unlimited<a href="#section-7.2-10.2.1" class="pilcrow"></a></p>
1981
</li>
1982
          <li class="normal" id="section-7.2-10.3">
1983
            <p id="section-7.2-10.3.1">Each identifier within a category MUST be unique<a href="#section-7.2-10.3.1" class="pilcrow"></a></p>
1984
</li>
1985
          <li class="normal" id="section-7.2-10.4">
1986
            <p id="section-7.2-10.4.1">Labels (second field) provide human-readable descriptions<a href="#section-7.2-10.4.1" class="pilcrow"></a></p>
1987
</li>
1988
        </ul>
1989
</section>
1990
</div>
1991
<div id="column-headers">
1992
<section id="section-7.3">
1993
        <h3 id="name-column-headers">
1994
<a href="#section-7.3" class="section-number selfRef">7.3. </a><a href="#name-column-headers" class="section-name selfRef">Column Headers</a>
1995
        </h3>
1996
<p id="section-7.3-1">The truth table section begins with a column header row. This row
1997
defines the columns of the truth table and their indices.<a href="#section-7.3-1" class="pilcrow"></a></p>
1998
<p id="section-7.3-2">Column Header Format:<a href="#section-7.3-2" class="pilcrow"></a></p>
1999
<div class="alignLeft art-text artwork" id="section-7.3-3">
2000
<pre>
2001
|INDEX|DATA|1|2|3|4|5|...|n|
2002
</pre><a href="#section-7.3-3" class="pilcrow"></a>
2003
</div>
2004
<p id="section-7.3-4">Where:
2005
* "INDEX" - Identifies this as the column header row
2006
* "DATA" - Indicates data columns follow
2007
* "1" through "n" - Column numbers (positive integers)<a href="#section-7.3-4" class="pilcrow"></a></p>
2008
<p id="section-7.3-5">The column header row establishes the numbering for all subsequent
2009
truth table data rows.<a href="#section-7.3-5" class="pilcrow"></a></p>
2010
</section>
2011
</div>
2012
<div id="data-rows">
2013
<section id="section-7.4">
2014
        <h3 id="name-data-rows">
2015
<a href="#section-7.4" class="section-number selfRef">7.4. </a><a href="#name-data-rows" class="section-name selfRef">Data Rows</a>
2016
        </h3>
2017
<p id="section-7.4-1">Truth table data rows represent either:<a href="#section-7.4-1" class="pilcrow"></a></p>
2018
<p id="section-7.4-2">a) Row headers (labels for conditions or assertions)
2019
b) Truth values (the actual decision logic)<a href="#section-7.4-2" class="pilcrow"></a></p>
2020
<p id="section-7.4-3">Row Header Format:<a href="#section-7.4-3" class="pilcrow"></a></p>
2021
<div class="alignLeft art-text artwork" id="section-7.4-4">
2022
<pre>
2023
|identifier|label|index1|index2|...|indexN|
2024
</pre><a href="#section-7.4-4" class="pilcrow"></a>
2025
</div>
2026
<p id="section-7.4-5">Examples:<a href="#section-7.4-5" class="pilcrow"></a></p>
2027
<div class="alignLeft art-text artwork" id="section-7.4-6">
2028
<pre>
2029
|W1|COLUMNHEADER|1|2|3|4|5|...|
2030
|W1.1|A|1|10|19|28|...|
2031
|W2|Function|1|2|3|4|5|...|
2032
</pre><a href="#section-7.4-6" class="pilcrow"></a>
2033
</div>
2034
<p id="section-7.4-7">Truth Value Format:<a href="#section-7.4-7" class="pilcrow"></a></p>
2035
<div class="alignLeft art-text artwork" id="section-7.4-8">
2036
<pre>
2037
|T_W{row}_W{col}_W{expr}|value|column|
2038
</pre><a href="#section-7.4-8" class="pilcrow"></a>
2039
</div>
2040
<p id="section-7.4-9">Examples:<a href="#section-7.4-9" class="pilcrow"></a></p>
2041
<div class="alignLeft art-text artwork" id="section-7.4-10">
2042
<pre>
2043
|T_W1.1_W2.1_W3.1|01|1|
2044
|T_W1.2_W2.1_W3.1|00|2|
2045
</pre><a href="#section-7.4-10" class="pilcrow"></a>
2046
</div>
2047
</section>
2048
</div>
2049
<div id="expression-field-content">
2050
<section id="section-7.5">
2051
        <h3 id="name-expression-field-content">
2052
<a href="#section-7.5" class="section-number selfRef">7.5. </a><a href="#name-expression-field-content" class="section-name selfRef">Expression Field Content</a>
2053
        </h3>
2054
<p id="section-7.5-1">W3 (Expression) rows contain the semantic definitions of conditions
2055
and assertions. These fields MAY contain:<a href="#section-7.5-1" class="pilcrow"></a></p>
2056
<p id="section-7.5-2">Plain Text:
2057
* Human-readable descriptions of conditions
2058
* Natural language statements<a href="#section-7.5-2" class="pilcrow"></a></p>
2059
<p id="section-7.5-3">JSON Structures:
2060
* Machine-parseable structured data
2061
* Semantic triples or property-value pairs
2062
* References to external vocabularies<a href="#section-7.5-3" class="pilcrow"></a></p>
2063
<p id="section-7.5-4">Example JSON in expression field:<a href="#section-7.5-4" class="pilcrow"></a></p>
2064
<div class="alignLeft art-text artwork" id="section-7.5-5">
2065
<pre>
2066
|W3.1|{"determiner":"The","noun":"box","past_participle_verb":"measured","attribute":"type","predicate_verb":"is","description":"standard"}|
2067
</pre><a href="#section-7.5-5" class="pilcrow"></a>
2068
</div>
2069
<p id="section-7.5-6">JSON Escaping Rules:<a href="#section-7.5-6" class="pilcrow"></a></p>
2070
<ul class="normal">
2071
<li class="normal" id="section-7.5-7.1">
2072
            <p id="section-7.5-7.1.1">Double quotes within JSON MUST be escaped as "<a href="#section-7.5-7.1.1" class="pilcrow"></a></p>
2073
</li>
2074
          <li class="normal" id="section-7.5-7.2">
2075
            <p id="section-7.5-7.2.1">Backslashes MUST be escaped as \<a href="#section-7.5-7.2.1" class="pilcrow"></a></p>
2076
</li>
2077
          <li class="normal" id="section-7.5-7.3">
2078
            <p id="section-7.5-7.3.1">Newlines within JSON SHOULD be avoided; use \n if necessary<a href="#section-7.5-7.3.1" class="pilcrow"></a></p>
2079
</li>
2080
          <li class="normal" id="section-7.5-7.4">
2081
            <p id="section-7.5-7.4.1">The entire JSON object MUST be valid JSON when unescaped<a href="#section-7.5-7.4.1" class="pilcrow"></a></p>
2082
</li>
2083
        </ul>
2084
<p id="section-7.5-8">Parsers SHOULD:
2085
* Detect JSON content by attempting to parse the field value
2086
* Fall back to treating content as plain text if JSON parsing fails
2087
* Validate JSON structure according to application-specific schemas<a href="#section-7.5-8" class="pilcrow"></a></p>
2088
<p id="section-7.5-9">Note: The JSON structure shown in examples uses a specific vocabulary
2089
for rule expressions. The exact schema is application-dependent and
2090
outside the scope of this specification.<a href="#section-7.5-9" class="pilcrow"></a></p>
2091
</section>
2092
</div>
2093
<div id="truth-value-encoding">
2094
<section id="section-7.6">
2095
        <h3 id="name-truth-value-encoding">
2096
<a href="#section-7.6" class="section-number selfRef">7.6. </a><a href="#name-truth-value-encoding" class="section-name selfRef">Truth Value Encoding</a>
2097
        </h3>
2098
<p id="section-7.6-1">DWD uses a four-valued logic system encoded as two-character strings.
2099
This supports classical binary logic as well as reasoning under
2100
uncertainty and paraconsistent scenarios.<a href="#section-7.6-1" class="pilcrow"></a></p>
2101
<table class="center" id="table-4">
2102
          <caption><a href="#table-4" class="selfRef">Table 4</a></caption>
2103
<thead>
2104
            <tr>
2105
              <th class="text-left" rowspan="1" colspan="1">Value</th>
2106
              <th class="text-left" rowspan="1" colspan="1">Meaning</th>
2107
            </tr>
2108
          </thead>
2109
          <tbody>
2110
            <tr>
2111
              <td class="text-left" rowspan="1" colspan="1">"00"</td>
2112
              <td class="text-left" rowspan="1" colspan="1">FALSE / Absent - Condition not met, assertion invalid</td>
2113
            </tr>
2114
            <tr>
2115
              <td class="text-left" rowspan="1" colspan="1">"01"</td>
2116
              <td class="text-left" rowspan="1" colspan="1">TRUE / Present - Condition met, assertion valid</td>
2117
            </tr>
2118
            <tr>
2119
              <td class="text-left" rowspan="1" colspan="1">"10"</td>
2120
              <td class="text-left" rowspan="1" colspan="1">MAYBE / UNKNOWN - Undetermined, uncertain, or requires further evaluation</td>
2121
            </tr>
2122
            <tr>
2123
              <td class="text-left" rowspan="1" colspan="1">"11"</td>
2124
              <td class="text-left" rowspan="1" colspan="1">BOTH / CONTRADICTION - Inconsistent state, both true and false simultaneously</td>
2125
            </tr>
2126
          </tbody>
2127
        </table>
2128
<p id="section-7.6-3">The four-valued logic allows DWD to represent:
2129
* Classical binary decisions (00, 01)
2130
* Uncertainty or incomplete information (10)
2131
* Inconsistent or contradictory states (11)<a href="#section-7.6-3" class="pilcrow"></a></p>
2132
<p id="section-7.6-4">Processing Behavior:<a href="#section-7.6-4" class="pilcrow"></a></p>
2133
<ul class="normal">
2134
<li class="normal" id="section-7.6-5.1">
2135
            <p id="section-7.6-5.1.1">When evaluating truth tables, implementations SHOULD handle all
2136
four values according to the logic semantics appropriate for the
2137
application domain.<a href="#section-7.6-5.1.1" class="pilcrow"></a></p>
2138
</li>
2139
          <li class="normal" id="section-7.6-5.2">
2140
            <p id="section-7.6-5.2.1">The "10" (unknown) value indicates that the truth of the condition
2141
cannot be determined from available data, and MAY trigger
2142
additional data collection or default handling.<a href="#section-7.6-5.2.1" class="pilcrow"></a></p>
2143
</li>
2144
          <li class="normal" id="section-7.6-5.3">
2145
            <p id="section-7.6-5.3.1">The "11" (contradiction) value indicates a logical inconsistency
2146
that SHOULD be flagged for review or resolution.<a href="#section-7.6-5.3.1" class="pilcrow"></a></p>
2147
</li>
2148
        </ul>
2149
<p id="section-7.6-6">Note: Earlier versions of DWD used "--" to indicate "don't care"
2150
conditions. This is now deprecated in favor of explicit four-valued
2151
encoding.<a href="#section-7.6-6" class="pilcrow"></a></p>
2152
</section>
2153
</div>
2154
<div id="dwd-storage-formats">
2155
<section id="section-7.7">
2156
        <h3 id="name-dwd-storage-formats">
2157
<a href="#section-7.7" class="section-number selfRef">7.7. </a><a href="#name-dwd-storage-formats" class="section-name selfRef">DWD Storage Formats</a>
2158
        </h3>
2159
<p id="section-7.7-1">DWD supports two complementary storage formats for truth table data:<a href="#section-7.7-1" class="pilcrow"></a></p>
2160
<p id="section-7.7-2">DWD Array Format (KVa)
2161
~~~~~~~~~~~~~~~~~~~~~<a href="#section-7.7-2" class="pilcrow"></a></p>
2162
<p id="section-7.7-3">The full matrix representation with explicit 00/01/10/11 values in
2163
every cell. This format is human-readable and suitable for direct
2164
inspection and auditing.<a href="#section-7.7-3" class="pilcrow"></a></p>
2165
<p id="section-7.7-4">Characteristics:
2166
* Complete truth table matrix with all cells populated
2167
* Binary patterns clearly visible for validation
2168
* Identity matrix structure for value assertions
2169
* Suitable for visualization and debugging<a href="#section-7.7-4" class="pilcrow"></a></p>
2170
<p id="section-7.7-5">Example (truncated):<a href="#section-7.7-5" class="pilcrow"></a></p>
2171
<div class="alignLeft art-text artwork" id="section-7.7-6">
2172
<pre>
2173
|K1.1|Label|01|00|00|01|00|00|
2174
|K1.2|Label|00|01|00|00|01|00|
2175
|T_K1.1_K2.1_K3.1|Value|01|00|00|00|00|00|
2176
</pre><a href="#section-7.7-6" class="pilcrow"></a>
2177
</div>
2178
<p id="section-7.7-7">DWD Coordinates Format (KVc)
2179
~~~~~~~~~~~~~~~~~~~~~~~~~~~~<a href="#section-7.7-7" class="pilcrow"></a></p>
2180
<p id="section-7.7-8">A compressed representation listing only the column indices where
2181
values are present (01). This format is optimized for storage and
2182
transmission.<a href="#section-7.7-8" class="pilcrow"></a></p>
2183
<p id="section-7.7-9">Characteristics:
2184
* Lists only column numbers where value is "01"
2185
* Compact representation suitable for large tables
2186
* Easily auditable via text search on index numbers
2187
* Can be expanded to full array format when needed<a href="#section-7.7-9" class="pilcrow"></a></p>
2188
<p id="section-7.7-10">Format:<a href="#section-7.7-10" class="pilcrow"></a></p>
2189
<div class="alignLeft art-text artwork" id="section-7.7-11">
2190
<pre>
2191
|identifier|label|column1|column2|...|columnN|
2192
</pre><a href="#section-7.7-11" class="pilcrow"></a>
2193
</div>
2194
<p id="section-7.7-12">Where column numbers are 1-indexed positions where the value is "01".<a href="#section-7.7-12" class="pilcrow"></a></p>
2195
<p id="section-7.7-13">Example:<a href="#section-7.7-13" class="pilcrow"></a></p>
2196
<div class="alignLeft art-text artwork" id="section-7.7-14">
2197
<pre>
2198
|K1.1|Label|1|4|7|10|
2199
|K1.2|Label|2|5|8|11|
2200
|V_K1.1_K2.1_K3.1|Value|1|
2201
</pre><a href="#section-7.7-14" class="pilcrow"></a>
2202
</div>
2203
<p id="section-7.7-15">Conversion:<a href="#section-7.7-15" class="pilcrow"></a></p>
2204
<ul class="normal">
2205
<li class="normal" id="section-7.7-16.1">
2206
            <p id="section-7.7-16.1.1">Array to Coordinates: For each row, record column indices where
2207
value equals "01"<a href="#section-7.7-16.1.1" class="pilcrow"></a></p>
2208
</li>
2209
          <li class="normal" id="section-7.7-16.2">
2210
            <p id="section-7.7-16.2.1">Coordinates to Array: Create matrix with "00" in all cells, then
2211
set "01" at specified coordinates<a href="#section-7.7-16.2.1" class="pilcrow"></a></p>
2212
</li>
2213
        </ul>
2214
<p id="section-7.7-17">Implementation Note:<a href="#section-7.7-17" class="pilcrow"></a></p>
2215
<p id="section-7.7-18">RuleMaker generates the Coordinates format for storage efficiency.
2216
The Array format is useful for visualization, debugging, and direct
2217
human audit. Both formats contain identical semantic information.<a href="#section-7.7-18" class="pilcrow"></a></p>
2218
</section>
2219
</div>
2220
</section>
2221
</div>
2222
<div id="syntax-specification">
2223
<section id="section-8">
2224
      <h2 id="name-syntax-specification">
2225
<a href="#section-8" class="section-number selfRef">8. </a><a href="#name-syntax-specification" class="section-name selfRef">Syntax Specification</a>
2226
      </h2>
2227
<div id="abnf-grammar">
2228
<section id="section-8.1">
2229
        <h3 id="name-abnf-grammar">
2230
<a href="#section-8.1" class="section-number selfRef">8.1. </a><a href="#name-abnf-grammar" class="section-name selfRef">ABNF Grammar</a>
2231
        </h3>
2232
<p id="section-8.1-1">The following grammar defines the formal syntax of DWD documents
2233
using ABNF <span>[<a href="#RFC5234" class="cite xref">RFC5234</a>]</span>.<a href="#section-8.1-1" class="pilcrow"></a></p>
2234
<div class="breakable lang-abnf sourcecode" id="section-8.1-2">
2235
<pre>
2236
; Basic Definitions
2237
PIPE           = %d124           ; "|" character
2238
CR             = %d13            ; Carriage return
2239
LF             = %d10            ; Line feed
2240
CRLF           = CR LF           ; Internet standard newline
2241
VCHAR          = %d33-126        ; Visible characters
2242
WSP            = SP / HTAB       ; White space
2243
SP             = %d32            ; Space
2244
HTAB           = %d9             ; Horizontal tab
2245
DIGIT          = %d48-57         ; 0-9
2246
ALPHA          = %d65-90 / %d97-122  ; A-Z / a-z
2247

    
2248
; Document Structure
2249
dwd-document   = *metadata-record
2250
                 truth-table-section
2251

    
2252
; Line Ending (Unix-style preferred, Windows accepted)
2253
line-ending    = LF / CRLF
2254

    
2255
; Metadata Records
2256
metadata-record = PIPE metadata-key PIPE field-value PIPE line-ending
2257

    
2258
metadata-key   = key-segment *("." key-segment)
2259
key-segment    = 1*(ALPHA / DIGIT / "_" / "-")
2260
               / array-index
2261
array-index    = 1*DIGIT        ; 1-based indexing
2262

    
2263
; Truth Table Section
2264
truth-table-section = column-header
2265
                      *row-header
2266
                      *truth-value-row
2267

    
2268
column-header  = PIPE "INDEX" PIPE "DATA" *column-number PIPE line-ending
2269
column-number  = PIPE 1*DIGIT
2270

    
2271
row-header     = PIPE row-id PIPE row-label *column-reference PIPE line-ending
2272
row-id         = world-id / key-id
2273
world-id       = "W" 1*DIGIT *("." 1*DIGIT)
2274
key-id         = "K" 1*DIGIT *("." 1*DIGIT)
2275
row-label      = 1*VCHAR
2276
column-reference = PIPE 1*DIGIT
2277

    
2278
truth-value-row = PIPE truth-id PIPE truth-value PIPE column-index PIPE line-ending
2279
truth-id       = "T_" world-id "_" world-id "_" world-id
2280
truth-value    = "00" / "01" / "10" / "11"
2281
column-index   = 1*DIGIT
2282

    
2283
; Coordinates Format (KVc)
2284
coordinates-row = PIPE coords-id PIPE coords-label *column-number PIPE line-ending
2285
coords-id      = value-id / key-id
2286
value-id       = "V_" key-id *("_" key-id)
2287

    
2288
; Field Values
2289
field-value    = *safe-char
2290
safe-char      = VCHAR / WSP / UTF8-char
2291
UTF8-char      = %x80-FF        ; UTF-8 multibyte sequences
2292

    
2293
; Reserved Identifiers
2294
reserved-id    = "INDEX" / "DATA" / "W" 1*DIGIT / "K" 1*DIGIT / "V_" / "T_"
2295
</pre><a href="#section-8.1-2" class="pilcrow"></a>
2296
</div>
2297
</section>
2298
</div>
2299
<div id="field-value-constraints">
2300
<section id="section-8.2">
2301
        <h3 id="name-field-value-constraints">
2302
<a href="#section-8.2" class="section-number selfRef">8.2. </a><a href="#name-field-value-constraints" class="section-name selfRef">Field Value Constraints</a>
2303
        </h3>
2304
<p id="section-8.2-1">Metadata Field Value Constraints:<a href="#section-8.2-1" class="pilcrow"></a></p>
2305
<table class="center" id="table-5">
2306
          <caption><a href="#table-5" class="selfRef">Table 5</a></caption>
2307
<thead>
2308
            <tr>
2309
              <th class="text-left" rowspan="1" colspan="1">Field</th>
2310
              <th class="text-left" rowspan="1" colspan="1">Constraints</th>
2311
            </tr>
2312
          </thead>
2313
          <tbody>
2314
            <tr>
2315
              <td class="text-left" rowspan="1" colspan="1">rule_id</td>
2316
              <td class="text-left" rowspan="1" colspan="1">UUID format <span>[<a href="#RFC4122" class="cite xref">RFC4122</a>]</span>
2317
</td>
2318
            </tr>
2319
            <tr>
2320
              <td class="text-left" rowspan="1" colspan="1">ruledata_version</td>
2321
              <td class="text-left" rowspan="1" colspan="1">Semantic Versioning (SemVer 2.0.0)</td>
2322
            </tr>
2323
            <tr>
2324
              <td class="text-left" rowspan="1" colspan="1">version_standard_url</td>
2325
              <td class="text-left" rowspan="1" colspan="1">Valid URL <span>[<a href="#RFC3986" class="cite xref">RFC3986</a>]</span>
2326
</td>
2327
            </tr>
2328
            <tr>
2329
              <td class="text-left" rowspan="1" colspan="1">properties.id</td>
2330
              <td class="text-left" rowspan="1" colspan="1">UUID format</td>
2331
            </tr>
2332
            <tr>
2333
              <td class="text-left" rowspan="1" colspan="1">metadata.rule.url</td>
2334
              <td class="text-left" rowspan="1" colspan="1">Valid URL</td>
2335
            </tr>
2336
            <tr>
2337
              <td class="text-left" rowspan="1" colspan="1">linked_rules_or_lookups</td>
2338
              <td class="text-left" rowspan="1" colspan="1">JSON array format or empty <span>[<a href="#RFC8259" class="cite xref">RFC8259</a>]</span>
2339
</td>
2340
            </tr>
2341
          </tbody>
2342
        </table>
2343
<p id="section-8.2-3">UUID Format:<a href="#section-8.2-3" class="pilcrow"></a></p>
2344
<p id="section-8.2-4">UUIDs MUST conform to RFC 4122 format:<a href="#section-8.2-4" class="pilcrow"></a></p>
2345
<div class="alignLeft art-text artwork" id="section-8.2-5">
2346
<pre>
2347
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
2348
</pre><a href="#section-8.2-5" class="pilcrow"></a>
2349
</div>
2350
<p id="section-8.2-6">Where x is a hexadecimal digit (0-9, a-f, A-F).<a href="#section-8.2-6" class="pilcrow"></a></p>
2351
<p id="section-8.2-7">Semantic Versioning:<a href="#section-8.2-7" class="pilcrow"></a></p>
2352
<p id="section-8.2-8">Versions MUST follow SemVer 2.0.0 format:<a href="#section-8.2-8" class="pilcrow"></a></p>
2353
<div class="alignLeft art-text artwork" id="section-8.2-9">
2354
<pre>
2355
MAJOR.MINOR.PATCH
2356
</pre><a href="#section-8.2-9" class="pilcrow"></a>
2357
</div>
2358
</section>
2359
</div>
2360
</section>
2361
</div>
2362
<div id="examples">
2363
<section id="section-9">
2364
      <h2 id="name-examples">
2365
<a href="#section-9" class="section-number selfRef">9. </a><a href="#name-examples" class="section-name selfRef">Examples</a>
2366
      </h2>
2367
<div id="complete-example">
2368
<section id="section-9.1">
2369
        <h3 id="name-complete-example">
2370
<a href="#section-9.1" class="section-number selfRef">9.1. </a><a href="#name-complete-example" class="section-name selfRef">Complete Example</a>
2371
        </h3>
2372
<p id="section-9.1-1">The following example demonstrates a complete DWD document with
2373
both metadata and truth table sections.<a href="#section-9.1-1" class="pilcrow"></a></p>
2374
<div class="alignLeft art-text artwork" id="section-9.1-2">
2375
<pre>
2376
|rule_id|933e80c7-72d8-4990-8445-97ea6799322d|
2377
|rulereserve_nodes|*|
2378
|version_standard_url|https://semver.org/|
2379
|ruledata_version|0.0.0|
2380
|properties.id|933e80c7-72d8-4990-8445-97ea6799322d|
2381
|metadata.rule.120_title|Test Rule|
2382
|metadata.rule.240_summary|Example summary text|
2383
|metadata.rule.960_explanation|Detailed explanation of rule logic|
2384
|metadata.rule.rule_group|test-group|
2385
|metadata.rule.rule_criticality|experimental|
2386
|metadata.rule.url|https://example.com/rule|
2387
|metadata.rule.rulemaker_manager.1.name|John Doe|
2388
|metadata.rule.rulemaker_manager.1.email|[email protected]|
2389
|linked_rules_or_lookups|[]|
2390
|in_effect.1.country|US|
2391
|in_effect.1.subcountry|US-CA|
2392
|in_effect.1.timezone|2025-07-07T11:49:51-05:00|
2393
|INDEX|DATA|1|2|3|4|5|
2394
|W1|COLUMNHEADER|1|2|3|4|5|
2395
|W1.1|A|1|2|3|4|5|
2396
|W1.2|B|6|7|8|9|10|
2397
|W2|Function|1|2|3|4|5|
2398
|W2.1|Input Condition|1|2|3||
2399
|W2.2|Output Assertion||4|5||
2400
|W3|Expression|1|2|3|4|5|
2401
|W3.1|{"noun":"test"}|1|2||4|5|
2402
|T_W1.1_W2.1_W3.1|01|1|
2403
|T_W1.2_W2.1_W3.1|00|2|
2404
|T_W1.1_W2.2_W3.1|01|4|
2405
</pre><a href="#section-9.1-2" class="pilcrow"></a>
2406
</div>
2407
</section>
2408
</div>
2409
<div id="metadata-only-example">
2410
<section id="section-9.2">
2411
        <h3 id="name-metadata-only-example">
2412
<a href="#section-9.2" class="section-number selfRef">9.2. </a><a href="#name-metadata-only-example" class="section-name selfRef">Metadata Only Example</a>
2413
        </h3>
2414
<p id="section-9.2-1">A DWD document containing only metadata:<a href="#section-9.2-1" class="pilcrow"></a></p>
2415
<div class="alignLeft art-text artwork" id="section-9.2-2">
2416
<pre>
2417
|rule_id|a1b2c3d4-e5f6-7890-abcd-ef1234567890|
2418
|ruledata_version|1.0.0|
2419
|version_standard_url|https://semver.org/|
2420
|properties.id|a1b2c3d4-e5f6-7890-abcd-ef1234567890|
2421
|metadata.rule.120_title|Simple Rule|
2422
|metadata.rule.240_summary|A rule with only metadata|
2423
</pre><a href="#section-9.2-2" class="pilcrow"></a>
2424
</div>
2425
</section>
2426
</div>
2427
</section>
2428
</div>
2429
<div id="security-considerations">
2430
<section id="section-10">
2431
      <h2 id="name-security-considerations">
2432
<a href="#section-10" class="section-number selfRef">10. </a><a href="#name-security-considerations" class="section-name selfRef">Security Considerations</a>
2433
      </h2>
2434
<p id="section-10-1">This section discusses security considerations when processing DWD
2435
documents.<a href="#section-10-1" class="pilcrow"></a></p>
2436
<div id="input-validation">
2437
<section id="section-10.1">
2438
        <h3 id="name-input-validation">
2439
<a href="#section-10.1" class="section-number selfRef">10.1. </a><a href="#name-input-validation" class="section-name selfRef">Input Validation</a>
2440
        </h3>
2441
<p id="section-10.1-1">Parsers MUST validate input to prevent:<a href="#section-10.1-1" class="pilcrow"></a></p>
2442
<ul class="normal">
2443
<li class="normal" id="section-10.1-2.1">
2444
            <p id="section-10.1-2.1.1">Buffer overflow attacks via excessively long lines<a href="#section-10.1-2.1.1" class="pilcrow"></a></p>
2445
</li>
2446
          <li class="normal" id="section-10.1-2.2">
2447
            <p id="section-10.1-2.2.1">Memory exhaustion via deeply nested structures<a href="#section-10.1-2.2.1" class="pilcrow"></a></p>
2448
</li>
2449
          <li class="normal" id="section-10.1-2.3">
2450
            <p id="section-10.1-2.3.1">Injection attacks through field values<a href="#section-10.1-2.3.1" class="pilcrow"></a></p>
2451
</li>
2452
        </ul>
2453
<p id="section-10.1-3">Implementations SHOULD enforce reasonable limits on:<a href="#section-10.1-3" class="pilcrow"></a></p>
2454
<ul class="normal">
2455
<li class="normal" id="section-10.1-4.1">
2456
            <p id="section-10.1-4.1.1">Maximum line length (recommended: 10,000 characters)<a href="#section-10.1-4.1.1" class="pilcrow"></a></p>
2457
</li>
2458
          <li class="normal" id="section-10.1-4.2">
2459
            <p id="section-10.1-4.2.1">Maximum number of fields per line (recommended: 10,000)<a href="#section-10.1-4.2.1" class="pilcrow"></a></p>
2460
</li>
2461
          <li class="normal" id="section-10.1-4.3">
2462
            <p id="section-10.1-4.3.1">Maximum file size (recommended: 100 MB)<a href="#section-10.1-4.3.1" class="pilcrow"></a></p>
2463
</li>
2464
          <li class="normal" id="section-10.1-4.4">
2465
            <p id="section-10.1-4.4.1">Maximum nesting depth for metadata keys (recommended: 10 levels)<a href="#section-10.1-4.4.1" class="pilcrow"></a></p>
2466
</li>
2467
        </ul>
2468
</section>
2469
</div>
2470
<div id="field-value-sanitization">
2471
<section id="section-10.2">
2472
        <h3 id="name-field-value-sanitization">
2473
<a href="#section-10.2" class="section-number selfRef">10.2. </a><a href="#name-field-value-sanitization" class="section-name selfRef">Field Value Sanitization</a>
2474
        </h3>
2475
<p id="section-10.2-1">Field values MAY contain arbitrary text including:<a href="#section-10.2-1" class="pilcrow"></a></p>
2476
<ul class="normal">
2477
<li class="normal" id="section-10.2-2.1">
2478
            <p id="section-10.2-2.1.1">HTML/XML markup<a href="#section-10.2-2.1.1" class="pilcrow"></a></p>
2479
</li>
2480
          <li class="normal" id="section-10.2-2.2">
2481
            <p id="section-10.2-2.2.1">JSON data structures<a href="#section-10.2-2.2.1" class="pilcrow"></a></p>
2482
</li>
2483
          <li class="normal" id="section-10.2-2.3">
2484
            <p id="section-10.2-2.3.1">SQL fragments<a href="#section-10.2-2.3.1" class="pilcrow"></a></p>
2485
</li>
2486
          <li class="normal" id="section-10.2-2.4">
2487
            <p id="section-10.2-2.4.1">Script code<a href="#section-10.2-2.4.1" class="pilcrow"></a></p>
2488
</li>
2489
        </ul>
2490
<p id="section-10.2-3">Applications processing DWD documents MUST NOT execute field values
2491
as code without proper sanitization and validation.<a href="#section-10.2-3" class="pilcrow"></a></p>
2492
</section>
2493
</div>
2494
<div id="external-references">
2495
<section id="section-10.3">
2496
        <h3 id="name-external-references">
2497
<a href="#section-10.3" class="section-number selfRef">10.3. </a><a href="#name-external-references" class="section-name selfRef">External References</a>
2498
        </h3>
2499
<p id="section-10.3-1">Metadata fields such as "url" and "version_standard_url" contain
2500
external references. Applications SHOULD:<a href="#section-10.3-1" class="pilcrow"></a></p>
2501
<ul class="normal">
2502
<li class="normal" id="section-10.3-2.1">
2503
            <p id="section-10.3-2.1.1">Validate URL schemes (allow only http, https)<a href="#section-10.3-2.1.1" class="pilcrow"></a></p>
2504
</li>
2505
          <li class="normal" id="section-10.3-2.2">
2506
            <p id="section-10.3-2.2.1">Implement timeouts for external resource fetching<a href="#section-10.3-2.2.1" class="pilcrow"></a></p>
2507
</li>
2508
          <li class="normal" id="section-10.3-2.3">
2509
            <p id="section-10.3-2.3.1">Cache external resources to prevent repeated requests<a href="#section-10.3-2.3.1" class="pilcrow"></a></p>
2510
</li>
2511
          <li class="normal" id="section-10.3-2.4">
2512
            <p id="section-10.3-2.4.1">Not automatically dereference URLs without user consent<a href="#section-10.3-2.4.1" class="pilcrow"></a></p>
2513
</li>
2514
        </ul>
2515
</section>
2516
</div>
2517
<div id="privacy-considerations">
2518
<section id="section-10.4">
2519
        <h3 id="name-privacy-considerations">
2520
<a href="#section-10.4" class="section-number selfRef">10.4. </a><a href="#name-privacy-considerations" class="section-name selfRef">Privacy Considerations</a>
2521
        </h3>
2522
<p id="section-10.4-1">DWD documents may contain personally identifiable information (PII)
2523
in metadata fields such as:<a href="#section-10.4-1" class="pilcrow"></a></p>
2524
<ul class="normal">
2525
<li class="normal" id="section-10.4-2.1">
2526
            <p id="section-10.4-2.1.1">Rule maker names and email addresses<a href="#section-10.4-2.1.1" class="pilcrow"></a></p>
2527
</li>
2528
          <li class="normal" id="section-10.4-2.2">
2529
            <p id="section-10.4-2.2.1">Organization-specific identifiers<a href="#section-10.4-2.2.1" class="pilcrow"></a></p>
2530
</li>
2531
          <li class="normal" id="section-10.4-2.3">
2532
            <p id="section-10.4-2.3.1">Jurisdictional information<a href="#section-10.4-2.3.1" class="pilcrow"></a></p>
2533
</li>
2534
        </ul>
2535
<p id="section-10.4-3">Implementations SHOULD:<a href="#section-10.4-3" class="pilcrow"></a></p>
2536
<ul class="normal">
2537
<li class="normal" id="section-10.4-4.1">
2538
            <p id="section-10.4-4.1.1">Allow redaction or anonymization of PII fields<a href="#section-10.4-4.1.1" class="pilcrow"></a></p>
2539
</li>
2540
          <li class="normal" id="section-10.4-4.2">
2541
            <p id="section-10.4-4.2.1">Implement access controls for sensitive rule documents<a href="#section-10.4-4.2.1" class="pilcrow"></a></p>
2542
</li>
2543
          <li class="normal" id="section-10.4-4.3">
2544
            <p id="section-10.4-4.3.1">Log access to documents containing PII<a href="#section-10.4-4.3.1" class="pilcrow"></a></p>
2545
</li>
2546
        </ul>
2547
</section>
2548
</div>
2549
</section>
2550
</div>
2551
<div id="iana-considerations">
2552
<section id="section-11">
2553
      <h2 id="name-iana-considerations">
2554
<a href="#section-11" class="section-number selfRef">11. </a><a href="#name-iana-considerations" class="section-name selfRef">IANA Considerations</a>
2555
      </h2>
2556
<p id="section-11-1">This document has no IANA actions.<a href="#section-11-1" class="pilcrow"></a></p>
2557
</section>
2558
</div>
2559
<div id="sec-combined-references">
2560
<section id="section-12">
2561
      <h2 id="name-references">
2562
<a href="#section-12" class="section-number selfRef">12. </a><a href="#name-references" class="section-name selfRef">References</a>
2563
      </h2>
2564
<div id="sec-normative-references">
2565
<section id="section-12.1">
2566
        <h3 id="name-normative-references">
2567
<a href="#section-12.1" class="section-number selfRef">12.1. </a><a href="#name-normative-references" class="section-name selfRef">Normative References</a>
2568
        </h3>
2569
<dl class="references">
2570
<dt id="RFC2119">[RFC2119]</dt>
2571
        <dd>
2572
<span class="refAuthor">Bradner, S.</span>, <span class="refTitle">"Key words for use in RFCs to Indicate Requirement Levels"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 2119</span>, <span class="seriesInfo">DOI 10.17487/RFC2119</span>, <time datetime="1997-03" class="refDate">March 1997</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>&gt;</span>. </dd>
2573
<dd class="break"></dd>
2574
<dt id="RFC3629">[RFC3629]</dt>
2575
        <dd>
2576
<span class="refAuthor">Yergeau, F.</span>, <span class="refTitle">"UTF-8, a transformation format of ISO 10646"</span>, <span class="seriesInfo">STD 63</span>, <span class="seriesInfo">RFC 3629</span>, <span class="seriesInfo">DOI 10.17487/RFC3629</span>, <time datetime="2003-11" class="refDate">November 2003</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc3629">https://www.rfc-editor.org/info/rfc3629</a>&gt;</span>. </dd>
2577
<dd class="break"></dd>
2578
<dt id="RFC3986">[RFC3986]</dt>
2579
        <dd>
2580
<span class="refAuthor">Berners-Lee, T.</span>, <span class="refAuthor">Fielding, R.</span>, and <span class="refAuthor">L. Masinter</span>, <span class="refTitle">"Uniform Resource Identifier (URI): Generic Syntax"</span>, <span class="seriesInfo">STD 66</span>, <span class="seriesInfo">RFC 3986</span>, <span class="seriesInfo">DOI 10.17487/RFC3986</span>, <time datetime="2005-01" class="refDate">January 2005</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc3986">https://www.rfc-editor.org/info/rfc3986</a>&gt;</span>. </dd>
2581
<dd class="break"></dd>
2582
<dt id="RFC4122">[RFC4122]</dt>
2583
        <dd>
2584
<span class="refAuthor">Leach, P.</span>, <span class="refAuthor">Mealling, M.</span>, and <span class="refAuthor">R. Salz</span>, <span class="refTitle">"A Universally Unique IDentifier (UUID) URN Namespace"</span>, <span class="seriesInfo">RFC 4122</span>, <span class="seriesInfo">DOI 10.17487/RFC4122</span>, <time datetime="2005-07" class="refDate">July 2005</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc4122">https://www.rfc-editor.org/info/rfc4122</a>&gt;</span>. </dd>
2585
<dd class="break"></dd>
2586
<dt id="RFC5234">[RFC5234]</dt>
2587
        <dd>
2588
<span class="refAuthor">Crocker, D., Ed.</span> and <span class="refAuthor">P. Overell</span>, <span class="refTitle">"Augmented BNF for Syntax Specifications: ABNF"</span>, <span class="seriesInfo">STD 68</span>, <span class="seriesInfo">RFC 5234</span>, <span class="seriesInfo">DOI 10.17487/RFC5234</span>, <time datetime="2008-01" class="refDate">January 2008</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc5234">https://www.rfc-editor.org/info/rfc5234</a>&gt;</span>. </dd>
2589
<dd class="break"></dd>
2590
<dt id="RFC8174">[RFC8174]</dt>
2591
      <dd>
2592
<span class="refAuthor">Leiba, B.</span>, <span class="refTitle">"Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 8174</span>, <span class="seriesInfo">DOI 10.17487/RFC8174</span>, <time datetime="2017-05" class="refDate">May 2017</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>&gt;</span>. </dd>
2593
<dd class="break"></dd>
2594
</dl>
2595
</section>
2596
</div>
2597
<div id="sec-informative-references">
2598
<section id="section-12.2">
2599
        <h3 id="name-informative-references">
2600
<a href="#section-12.2" class="section-number selfRef">12.2. </a><a href="#name-informative-references" class="section-name selfRef">Informative References</a>
2601
        </h3>
2602
<dl class="references">
2603
<dt id="RFC5322">[RFC5322]</dt>
2604
        <dd>
2605
<span class="refAuthor">Resnick, P., Ed.</span>, <span class="refTitle">"Internet Message Format"</span>, <span class="seriesInfo">RFC 5322</span>, <span class="seriesInfo">DOI 10.17487/RFC5322</span>, <time datetime="2008-10" class="refDate">October 2008</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc5322">https://www.rfc-editor.org/info/rfc5322</a>&gt;</span>. </dd>
2606
<dd class="break"></dd>
2607
<dt id="RFC4287">[RFC4287]</dt>
2608
        <dd>
2609
<span class="refAuthor">Nottingham, M., Ed.</span> and <span class="refAuthor">R. Sayre, Ed.</span>, <span class="refTitle">"The Atom Syndication Format"</span>, <span class="seriesInfo">RFC 4287</span>, <span class="seriesInfo">DOI 10.17487/RFC4287</span>, <time datetime="2005-12" class="refDate">December 2005</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc4287">https://www.rfc-editor.org/info/rfc4287</a>&gt;</span>. </dd>
2610
<dd class="break"></dd>
2611
<dt id="SemVer">[SemVer]</dt>
2612
        <dd>
2613
<span class="refAuthor">Preston-Werner, T.</span>, <span class="refTitle">"Semantic Versioning 2.0.0"</span>, <time datetime="2013-06" class="refDate">June 2013</time>, <span>&lt;<a href="https://semver.org/spec/v2.0.0.html">https://semver.org/spec/v2.0.0.html</a>&gt;</span>. </dd>
2614
<dd class="break"></dd>
2615
<dt id="RFC8259">[RFC8259]</dt>
2616
      <dd>
2617
<span class="refAuthor">Bray, T., Ed.</span>, <span class="refTitle">"The JavaScript Object Notation (JSON) Data Interchange Format"</span>, <span class="seriesInfo">STD 90</span>, <span class="seriesInfo">RFC 8259</span>, <span class="seriesInfo">DOI 10.17487/RFC8259</span>, <time datetime="2017-12" class="refDate">December 2017</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc8259">https://www.rfc-editor.org/info/rfc8259</a>&gt;</span>. </dd>
2618
<dd class="break"></dd>
2619
</dl>
2620
</section>
2621
</div>
2622
</section>
2623
</div>
2624
<div id="acknowledgments">
2625
<section id="appendix-A">
2626
      <h2 id="name-acknowledgments">
2627
<a href="#appendix-A" class="section-number selfRef">Appendix A. </a><a href="#name-acknowledgments" class="section-name selfRef">Acknowledgments</a>
2628
      </h2>
2629
<p id="appendix-A-1">The authors would like to thank the Xalgorithms Foundation and all
2630
contributors to the Data With Direction Specification.<a href="#appendix-A-1" class="pilcrow"></a></p>
2631
<p id="appendix-A-2">Special thanks to Wayne Cunneyworth for pioneering Table Driven Design,
2632
and to all members of the Xalgorithms Alliance who have contributed to
2633
the development and refinement of the DWD format.<a href="#appendix-A-2" class="pilcrow"></a></p>
2634
</section>
2635
</div>
2636
<div id="appendix-a-comparison-with-related-formats">
2637
<section id="appendix-B">
2638
      <h2 id="name-appendix-a-comparison-with-">
2639
<a href="#appendix-B" class="section-number selfRef">Appendix B. </a><a href="#name-appendix-a-comparison-with-" class="section-name selfRef">Appendix A. Comparison with Related Formats</a>
2640
      </h2>
2641
<p id="appendix-B-1">This appendix provides a non-normative comparison between DWD pipe-
2642
separated format and similar data formats.<a href="#appendix-B-1" class="pilcrow"></a></p>
2643
<div id="csv-comma-separated-values">
2644
<section id="appendix-B.1">
2645
        <h3 id="name-csv-comma-separated-values">
2646
<a href="#appendix-B.1" class="section-number selfRef">B.1. </a><a href="#name-csv-comma-separated-values" class="section-name selfRef">CSV (Comma-Separated Values)</a>
2647
        </h3>
2648
<table class="center" id="table-6">
2649
          <caption><a href="#table-6" class="selfRef">Table 6</a></caption>
2650
<thead>
2651
            <tr>
2652
              <th class="text-left" rowspan="1" colspan="1">Aspect</th>
2653
              <th class="text-left" rowspan="1" colspan="1">CSV</th>
2654
              <th class="text-left" rowspan="1" colspan="1">DWD Pipe-Separated</th>
2655
            </tr>
2656
          </thead>
2657
          <tbody>
2658
            <tr>
2659
              <td class="text-left" rowspan="1" colspan="1">Delimiter</td>
2660
              <td class="text-left" rowspan="1" colspan="1">Comma (,)</td>
2661
              <td class="text-left" rowspan="1" colspan="1">Pipe (|)</td>
2662
            </tr>
2663
            <tr>
2664
              <td class="text-left" rowspan="1" colspan="1">Quoting</td>
2665
              <td class="text-left" rowspan="1" colspan="1">Double quotes</td>
2666
              <td class="text-left" rowspan="1" colspan="1">No quoting required</td>
2667
            </tr>
2668
            <tr>
2669
              <td class="text-left" rowspan="1" colspan="1">Header row</td>
2670
              <td class="text-left" rowspan="1" colspan="1">Single header</td>
2671
              <td class="text-left" rowspan="1" colspan="1">Multiple header types</td>
2672
            </tr>
2673
            <tr>
2674
              <td class="text-left" rowspan="1" colspan="1">Metadata</td>
2675
              <td class="text-left" rowspan="1" colspan="1">Not standardized</td>
2676
              <td class="text-left" rowspan="1" colspan="1">Native support</td>
2677
            </tr>
2678
            <tr>
2679
              <td class="text-left" rowspan="1" colspan="1">Nested data</td>
2680
              <td class="text-left" rowspan="1" colspan="1">Flat structure</td>
2681
              <td class="text-left" rowspan="1" colspan="1">Dot notation support</td>
2682
            </tr>
2683
          </tbody>
2684
        </table>
2685
</section>
2686
</div>
2687
<div id="tsv-tab-separated-values">
2688
<section id="appendix-B.2">
2689
        <h3 id="name-tsv-tab-separated-values">
2690
<a href="#appendix-B.2" class="section-number selfRef">B.2. </a><a href="#name-tsv-tab-separated-values" class="section-name selfRef">TSV (Tab-Separated Values)</a>
2691
        </h3>
2692
<p id="appendix-B.2-1">Similar to CSV but uses tab characters as delimiters. DWD format
2693
differs by using visible pipe characters and supporting structured
2694
metadata alongside tabular data.<a href="#appendix-B.2-1" class="pilcrow"></a></p>
2695
</section>
2696
</div>
2697
<div id="json">
2698
<section id="appendix-B.3">
2699
        <h3 id="name-json">
2700
<a href="#appendix-B.3" class="section-number selfRef">B.3. </a><a href="#name-json" class="section-name selfRef">JSON</a>
2701
        </h3>
2702
<p id="appendix-B.3-1">JSON provides hierarchical data representation but lacks the
2703
human-editable tabular format of DWD. DWD truth tables can be
2704
converted to JSON arrays, and DWD documents often have equivalent
2705
JSON representations.<a href="#appendix-B.3-1" class="pilcrow"></a></p>
2706
</section>
2707
</div>
2708
</section>
2709
</div>
2710
<div id="appendix-b-implementation-guidelines">
2711
<section id="appendix-C">
2712
      <h2 id="name-appendix-b-implementation-g">
2713
<a href="#appendix-C" class="section-number selfRef">Appendix C. </a><a href="#name-appendix-b-implementation-g" class="section-name selfRef">Appendix B. Implementation Guidelines</a>
2714
      </h2>
2715
<div id="parsing-strategy">
2716
<section id="appendix-C.1">
2717
        <h3 id="name-parsing-strategy">
2718
<a href="#appendix-C.1" class="section-number selfRef">C.1. </a><a href="#name-parsing-strategy" class="section-name selfRef">Parsing Strategy</a>
2719
        </h3>
2720
<p id="appendix-C.1-1">Implementations are RECOMMENDED to use a two-pass parsing approach:<a href="#appendix-C.1-1" class="pilcrow"></a></p>
2721
<ol start="1" type="1" class="normal type-1" id="appendix-C.1-2">
2722
<li id="appendix-C.1-2.1">
2723
            <p id="appendix-C.1-2.1.1">First pass: Identify line types (metadata vs. truth table)<a href="#appendix-C.1-2.1.1" class="pilcrow"></a></p>
2724
</li>
2725
          <li id="appendix-C.1-2.2">
2726
            <p id="appendix-C.1-2.2.1">Second pass: Parse fields according to line type<a href="#appendix-C.1-2.2.1" class="pilcrow"></a></p>
2727
</li>
2728
        </ol>
2729
</section>
2730
</div>
2731
<div id="error-handling">
2732
<section id="appendix-C.2">
2733
        <h3 id="name-error-handling">
2734
<a href="#appendix-C.2" class="section-number selfRef">C.2. </a><a href="#name-error-handling" class="section-name selfRef">Error Handling</a>
2735
        </h3>
2736
<p id="appendix-C.2-1">Parsers SHOULD provide detailed error information including:<a href="#appendix-C.2-1" class="pilcrow"></a></p>
2737
<ul class="normal">
2738
<li class="normal" id="appendix-C.2-2.1">
2739
            <p id="appendix-C.2-2.1.1">Line number where error occurred<a href="#appendix-C.2-2.1.1" class="pilcrow"></a></p>
2740
</li>
2741
          <li class="normal" id="appendix-C.2-2.2">
2742
            <p id="appendix-C.2-2.2.1">Type of error (syntax, validation, constraint violation)<a href="#appendix-C.2-2.2.1" class="pilcrow"></a></p>
2743
</li>
2744
          <li class="normal" id="appendix-C.2-2.3">
2745
            <p id="appendix-C.2-2.3.1">Suggested correction if applicable<a href="#appendix-C.2-2.3.1" class="pilcrow"></a></p>
2746
</li>
2747
        </ul>
2748
</section>
2749
</div>
2750
<div id="round-trip-preservation">
2751
<section id="appendix-C.3">
2752
        <h3 id="name-round-trip-preservation">
2753
<a href="#appendix-C.3" class="section-number selfRef">C.3. </a><a href="#name-round-trip-preservation" class="section-name selfRef">Round-Trip Preservation</a>
2754
        </h3>
2755
<p id="appendix-C.3-1">Implementations SHOULD preserve the following when reading and
2756
writing DWD documents:<a href="#appendix-C.3-1" class="pilcrow"></a></p>
2757
<ul class="normal">
2758
<li class="normal" id="appendix-C.3-2.1">
2759
            <p id="appendix-C.3-2.1.1">Field order within records<a href="#appendix-C.3-2.1.1" class="pilcrow"></a></p>
2760
</li>
2761
          <li class="normal" id="appendix-C.3-2.2">
2762
            <p id="appendix-C.3-2.2.1">Whitespace within field values<a href="#appendix-C.3-2.2.1" class="pilcrow"></a></p>
2763
</li>
2764
          <li class="normal" id="appendix-C.3-2.3">
2765
            <p id="appendix-C.3-2.3.1">Presence or absence of optional fields<a href="#appendix-C.3-2.3.1" class="pilcrow"></a></p>
2766
</li>
2767
          <li class="normal" id="appendix-C.3-2.4">
2768
            <p id="appendix-C.3-2.4.1">Comment lines (if supported)<a href="#appendix-C.3-2.4.1" class="pilcrow"></a></p>
2769
</li>
2770
        </ul>
2771
</section>
2772
</div>
2773
</section>
2774
</div>
2775
<div id="authors-addresses">
2776
<section id="appendix-D">
2777
      <h2 id="name-authors-addresses">
2778
<a href="#name-authors-addresses" class="section-name selfRef">Authors' Addresses</a>
2779
      </h2>
2780
<address class="vcard">
2781
        <div dir="auto" class="left"><span class="fn nameRole">Joseph Potvin</span></div>
2782
<div dir="auto" class="left"><span class="org">Xalgorithms Foundation</span></div>
2783
<div class="email">
2784
<span>Email:</span>
2785
<a href="mailto:[email protected]" class="email">[email protected]</a>
2786
</div>
2787
</address>
2788
<address class="vcard">
2789
        <div dir="auto" class="left"><span class="fn nameRole">Charles Langlois</span></div>
2790
<div dir="auto" class="left"><span class="org">Xalgorithms Foundation</span></div>
2791
<div class="email">
2792
<span>Email:</span>
2793
<a href="mailto:[email protected]" class="email">[email protected]</a>
2794
</div>
2795
</address>
2796
</section>
2797
</div>
2798
<script>const toc = document.getElementById("toc");
2799
toc.querySelector("h2").addEventListener("click", e => {
2800
  toc.classList.toggle("active");
2801
});
2802
toc.querySelector("nav").addEventListener("click", e => {
2803
  toc.classList.remove("active");
2804
});
2805
</script>
2806
</body>
2807
</html>
(4-4/5)