-
Notifications
You must be signed in to change notification settings - Fork 41
/
Sink.java
1768 lines (1587 loc) · 57 KB
/
Sink.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.doxia.sink;
/**
* A <i>Sink</i> consumes Doxia events to produce a resultant output format
* (eg Docbook, PDF, XHTML...).
* <p>
* Doxia allows you to transform any supported input document format (ie for which a Parser exists)
* into any supported output document format (ie for which a Sink exists).
* </p>
* <p>
* A parser is responsible for reading an input document and emitting a sequence of Doxia events
* which can then be consumed by a Doxia Sink. Thus, you can parse any front- end format
* (eg APT, FML, Xdoc, ...) and have them all contribute to a final XHTML version of a web site.
* All documents being parsed result in a stream of Doxia events (eg paragraph, bold, italic,
* text,...), which are then fed into a XHTML Sink to produce a set of XHTML pages.
* </p>
* <p>
* A Sink is ultimately responsible for the final format and structure of the output document.
* For example, you can take a collection of APT documents, let a Parser emit a series of Doxia
* events and have that be fed into a Sink to produce a single PDF, a book, a site, or a
* Word document. The Sink is fully responsible for the final output.
* </p>
* <p>
* You can easily integrate any custom (XML, Wiki,...) format by creating a Doxia Parser which
* reads your input document and produces a proper sequence of Doxia events.
* Those can then be fed into an arbitrary Sink to produce any desired final output.
* </p>
* <p>
* <b>Note</b>: All implemented sink <b>should</b> use UTF-8 as encoding.
* </p>
*
* @since 1.0-alpha-6
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
* @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a>
* @author ltheussl
*/
public interface Sink extends AutoCloseable {
/**
* A numbering to handle a number list.
* @see #numberedList(int,SinkEventAttributes)
*/
int NUMBERING_DECIMAL = 0;
/**
* A numbering to handle a lower alpha list.
* @see #numberedList(int,SinkEventAttributes)
*/
int NUMBERING_LOWER_ALPHA = 1;
/**
* A numbering to handle a upper alpha list.
* @see #numberedList(int,SinkEventAttributes)
*/
int NUMBERING_UPPER_ALPHA = 2;
/**
* A numbering to handle a lower roman list.
* @see #numberedList(int,SinkEventAttributes)
*/
int NUMBERING_LOWER_ROMAN = 3;
/**
* A numbering to handle a upper roman list.
* @see #numberedList(int,SinkEventAttributes)
*/
int NUMBERING_UPPER_ROMAN = 4;
/**
* A level 1 section (section).
* @see #section(int,SinkEventAttributes)
*/
int SECTION_LEVEL_1 = 1;
/**
* A level 2 section (subsection).
* @see #section(int,SinkEventAttributes)
*/
int SECTION_LEVEL_2 = 2;
/**
* A level 3 section (sub-subsection).
* @see #section(int,SinkEventAttributes)
*/
int SECTION_LEVEL_3 = 3;
/**
* A level 4 section (sub-sub-subsection).
* @see #section(int,SinkEventAttributes)
*/
int SECTION_LEVEL_4 = 4;
/**
* A level 5 section (sub-sub-sub-subsection).
* @see #section(int,SinkEventAttributes)
*/
int SECTION_LEVEL_5 = 5;
/**
* A level 6 section.
* @see #section(int,SinkEventAttributes)
* @since 2.0.0
*/
int SECTION_LEVEL_6 = 6;
/**
* Center alignment for table cells.
* @see #tableRows(int[], boolean)
*/
int JUSTIFY_CENTER = 0;
/**
* Left alignment for table cells.
* @see #tableRows(int[], boolean)
*/
int JUSTIFY_LEFT = 1;
/**
* Right alignment for table cells.
* @see #tableRows(int[], boolean)
*/
int JUSTIFY_RIGHT = 2;
/**
* Starts the head element. Shortcut for {@link #head(SinkEventAttributes)} with first argument being {@code null}.
*
* @see #head(SinkEventAttributes)
*/
void head();
/**
* Starts the head element.
*
* <p>
* This contains information about the current document, (eg its title) that is not
* considered document content. The head element is optional but if it exists, it has to be
* unique within a sequence of Sink events that produces one output document, and it has
* to come before the {@link #body(SinkEventAttributes)} element.
* </p>
* <p>
* The canonical sequence of events for the head element is:
* </p>
* <pre>
* sink.head();
*
* sink.title();
* sink.text("Title");
* sink.title_();
*
* sink.author();
* sink.text("Author");
* sink.author_();
*
* sink.date();
* sink.text("Date");
* sink.date_();
*
* sink.head_();
* </pre>
* <p>
* but none of the enclosed events is required. However, if they exist they have to occur
* in the order shown, and the title() and date() events have to be unique (author() events
* may occur any number of times).
* </p>
* <p>
* Supported attributes are:
* </p>
* <blockquote>
* {@link SinkEventAttributes#PROFILE PROFILE}, {@link SinkEventAttributes#LANG LANG}.
* </blockquote>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void head(SinkEventAttributes attributes);
/**
* Ends the head element.
*/
void head_();
/**
* Starts the title element. Shortcut for {@link #title(SinkEventAttributes)} with first argument being {@code null}.
*
* @see #title(SinkEventAttributes)
*/
void title();
/**
* Starts the title element. This is used to identify the document.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
* @see #head(SinkEventAttributes)
*/
void title(SinkEventAttributes attributes);
/**
* Ends the title element.
*/
void title_();
/**
* Starts an author element. Shortcut for {@link #author(SinkEventAttributes)} with first argument being {@code null}.
*
* @see #author(SinkEventAttributes)
*/
void author();
/**
* Starts an author element. This is used to identify the author of the document.
*
* <p>
* Supported attributes are: {@link SinkEventAttributes#EMAIL EMAIL}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
* @see #head(SinkEventAttributes)
*/
void author(SinkEventAttributes attributes);
/**
* Ends an author element.
*/
void author_();
/**
* Starts the date element. Shortcut for {@link #date(SinkEventAttributes)} with first argument being {@code null}.
*
* @see #date(SinkEventAttributes)
*/
void date();
/**
* Starts the date element. This is used to identify the date of the document: there is no strict definition
* if it is <b>creation date</b> or <b>last modification date</b>, which are the 2 classical semantics.
* There is no formal formatting requirements either.
* <br>
* The date is recommended (but it is not a requirement) to be aligned to the
* <a href="http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=26780">ISO-8601</a>
* standard, i.e.:
* <pre>YYYY-MM-DD</pre>
* where
* <ul>
* <li><code>YYYY</code> is the year in the Gregorian calendar,</li>
* <li><code>MM</code> is the month of the year between 01 (January) and 12 (December),</li>
* <li>and <code>DD</code> is the day of the month between 01 and 31.</li>
* </ul>
*
* <p>
* Supported attributes are: none.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
* @see #head(SinkEventAttributes)
*/
void date(SinkEventAttributes attributes);
/**
* Ends the date element.
*/
void date_();
/**
* Starts the body of a document. Shortcut for {@link #body(SinkEventAttributes)} with first argument being {@code null}.
*
* @see #body(SinkEventAttributes)
*/
void body();
/**
* Starts the body of a document. This contains the document's content.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
* @see #head(SinkEventAttributes)
*/
void body(SinkEventAttributes attributes);
/**
* Ends the body element.
*/
void body_();
/**
* Starts an article within a document. Shortcut for {@link #article(SinkEventAttributes)} with first argument being {@code null}.
*
* @see #article(SinkEventAttributes)
*/
void article();
/**
* Starts an article within a document.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 2.0
*/
void article(SinkEventAttributes attributes);
/**
* Ends the article element.
*/
void article_();
/**
* Starts a navigation section within a document. Shortcut for {@link #navigation(SinkEventAttributes)} with first argument being {@code null}.
*
* @see #navigation(SinkEventAttributes)
*/
void navigation();
/**
* Starts a navigation section within a document.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 2.0
* @see #navigation(SinkEventAttributes)
*/
void navigation(SinkEventAttributes attributes);
/**
* Ends the navigation element.
*/
void navigation_();
/**
* Starts a sidebar section within a document. Shortcut for {@link #sidebar(SinkEventAttributes)} with first argument being {@code null}.
*
* @see #sidebar(SinkEventAttributes)
*/
void sidebar();
/**
* Starts a sidebar section within a document.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 2.0
*/
void sidebar(SinkEventAttributes attributes);
/**
* Ends the sidebar element.
*/
void sidebar_();
/**
* Starts a title heading element. Shortcut for {@link #sectionTitle(int, SinkEventAttributes)} with first argument being {@code 0} and second argument being {@code null}.
*/
void sectionTitle();
/**
* Ends a title heading element. Shortcut for {@link #sectionTitle_(int)} with argument being {@code 0}.
*/
void sectionTitle_();
/**
* Starts a first heading element which contains the topic of the section. Shortcut for {@link #section(int, SinkEventAttributes)} with first argument being {@code 1} and second argument being {@code null}.
*
* @see #section(int,SinkEventAttributes)
*/
void section1();
/**
* Ends a first heading element. Shortcut for {@link #section_(int)} with argument being {@code 1}.
*/
void section1_();
/**
* Starts a first title heading element. This element is optional, but if it exists,
* it has to be contained, and be the first element, within a {@link #section1()} element.
* <p>
* Shortcut for {@link #sectionTitle(int, SinkEventAttributes)} with first argument being {@code 1} and second argument being {@code null}.
*
* @see #sectionTitle(int,SinkEventAttributes)
*/
void sectionTitle1();
/**
* Ends a first title heading element. Shortcut for {@link #sectionTitle_(int)} with argument being {@code 1}.
*/
void sectionTitle1_();
/**
* Starts a second heading element which contains the topic of the section.
* This has to be contained within a {@link #section1()} element.
* <p>
* Shortcut for {@link #section(int, SinkEventAttributes)} with first argument being {@code 2} and second argument being {@code null}.
*
* @see #section(int,SinkEventAttributes)
*/
void section2();
/**
* Ends a second heading element. Shortcut for {@link #section_(int)} with argument being {@code 2}.
*/
void section2_();
/**
* Starts a second title heading element. This element is optional, but if it exists,
* it has to be contained, and be the first element, within a {@link #section2()} element.
* <p>
* Shortcut for {@link #sectionTitle(int, SinkEventAttributes)} with first argument being {@code 2} and second argument being {@code null}.
* @see #sectionTitle(int,SinkEventAttributes)
*/
void sectionTitle2();
/**
* Ends a second title heading element. Shortcut for {@link #sectionTitle_(int)} with argument being {@code 2}.
*/
void sectionTitle2_();
/**
* Starts a third heading element which contains the topic of the section.
* This has to be contained within a {@link #section2()} element.
* <p>
* Shortcut for {@link #section(int, SinkEventAttributes)} with first argument being {@code 3} and second argument being {@code null}.
*
* @see #section(int,SinkEventAttributes)
*/
void section3();
/**
* Ends a third heading element. Shortcut for {@link #section_(int)} with argument being {@code 3}.
*/
void section3_();
/**
* Starts a third title heading element. This element is optional, but if it exists,
* it has to be contained, and be the first element, within a {@link #section3()} element.
* <p>
* Shortcut for {@link #sectionTitle(int, SinkEventAttributes)} with first argument being {@code 3} and second argument being {@code null}.
* @see #sectionTitle(int,SinkEventAttributes)
*/
void sectionTitle3();
/**
* Ends a third title heading element. Shortcut for {@link #sectionTitle_(int)} with argument being {@code 3}.
*/
void sectionTitle3_();
/**
* Starts a 4th heading element which contains the topic of the section.
* This has to be contained within a {@link #section3()} element.
* <p>
* Shortcut for {@link #section(int, SinkEventAttributes)} with first argument being {@code 4} and second argument being {@code null}.
*
* @see #section(int,SinkEventAttributes)
*/
void section4();
/**
* Ends a 4th heading element. Shortcut for {@link #section_(int)} with argument being {@code 4}.
*/
void section4_();
/**
* Starts a 4th title heading element. This element is optional, but if it exists,
* it has to be contained, and be the first element, within a {@link #section4()} element.
* <p>
* Shortcut for {@link #sectionTitle(int, SinkEventAttributes)} with first argument being {@code 4} and second argument being {@code null}.
*
* @see #sectionTitle(int,SinkEventAttributes)
*/
void sectionTitle4();
/**
* Ends a 4th title heading element. Shortcut for {@link #sectionTitle_(int)} with argument being {@code 4}.
*/
void sectionTitle4_();
/**
* Starts a 5th heading element which contains the topic of the section.
* This has to be contained within a {@link #section5()} element.
* <p>
* Shortcut for {@link #section(int, SinkEventAttributes)} with first argument being {@code 5} and second argument being {@code null}.
*
* @see #section(int,SinkEventAttributes)
*/
void section5();
/**
* Ends a 5th heading element. Shortcut for {@link #section_(int)} with argument being {@code 5}.
*/
void section5_();
/**
* Starts a 5th title heading element. This element is optional, but if it exists,
* it has to be contained, and be the first element, within a {@link #section5()} element.
* <p>
* Shortcut for {@link #sectionTitle(int, SinkEventAttributes)} with first argument being {@code 5} and second argument being {@code null}.
*
* @see #sectionTitle(int,SinkEventAttributes)
*/
void sectionTitle5();
/**
* Ends a 5th title heading element. Shortcut for {@link #sectionTitle_(int)} with argument being {@code 5}.
* @since 2.0.0
*/
void sectionTitle5_();
/**
* Starts a 6th heading element which contains the topic of the section.
* This has to be contained within a {@link #section6()} element.
* <p>
* Shortcut for {@link #section(int, SinkEventAttributes)} with first argument being {@code 6} and second argument being {@code null}.
*
* @see #section(int,SinkEventAttributes)
* @since 2.0.0
*/
void section6();
/**
* Ends a 6th heading element. Shortcut for {@link #section_(int)} with argument being {@code 6}.
*
* @since 2.0.0
*/
void section6_();
/**
* Starts a 6th title heading element. This element is optional, but if it exists,
* it has to be contained, and be the first element, within a {@link #section5()} element.
* <p>
* Shortcut for {@link #sectionTitle(int, SinkEventAttributes)} with first argument being {@code 6} and second argument being {@code null}.
*
* @see #sectionTitle(int,SinkEventAttributes)
* @since 2.0.0
*/
void sectionTitle6();
/**
* Ends a 6th title heading element. Shortcut for {@link #sectionTitle_(int)} with argument being {@code 6}.
*
* @since 2.0.0
*/
void sectionTitle6_();
/**
* Start a new section at the given level.
*
* <p>
* Sections with higher level have to be entirely contained within sections of lower level.
* </p>
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param level the section level (must be a value between {@value #SECTION_LEVEL_1} and {@value #SECTION_LEVEL_6}).
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void section(int level, SinkEventAttributes attributes);
/**
* Ends a section at the given level.
*
* @param level the section level (must be a value between {@value #SECTION_LEVEL_1} and {@value #SECTION_LEVEL_6}).
* @since 1.1
*/
void section_(int level);
/**
* Start a new section title at the given level.
*
* <p>
* This element is optional, but if it exists, it has to be contained, and be the first
* element, within a corresponding {@link #section(int,SinkEventAttributes) section}
* element of the same level.
* </p>
* <p>
* <b>NOTE:</b> It is strongly recommended not to make section titles implicit anchors.
* Neither Parsers nor Sinks should insert any content that is not explicitly present
* in the original source document, as this would lead to undefined behaviour for
* multi-format processing chains. However, while Parsers <b>must never</b> emit anchors
* for section titles, some specialized Sinks may implement such a feature if the resulting
* output documents are not going to be further processed (and this is properly documented).
* </p>
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes} plus
* {@link SinkEventAttributes#ALIGN ALIGN}.
* </p>
*
* @param level the section title level (must be a value between {@value #SECTION_LEVEL_1} and {@value #SECTION_LEVEL_6}).
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void sectionTitle(int level, SinkEventAttributes attributes);
/**
* Ends a section title at the given level.
*
* @param level the section title level (must be a value between {@value #SECTION_LEVEL_1} and {@value #SECTION_LEVEL_6}).
* @since 1.1
*/
void sectionTitle_(int level);
/**
* Start a new header within the section or body. Shortcut for {@link #header(SinkEventAttributes)} with argument being {@code null}.
*/
void header();
/**
* Start a new header within the section or body.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 2.0
*/
void header(SinkEventAttributes attributes);
/**
* Ends a header element.
*/
void header_();
/**
* Start the main content section between the header and the
* footer within the sections and/or body.
* Shortcut for {@link #content(SinkEventAttributes)} with argument being {@code null}.
*/
void content();
/**
* Start the main content section between the header and the
* footer within the sections and/or body.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 2.0
*/
void content(SinkEventAttributes attributes);
/**
* Ends a main content section.
*/
void content_();
/**
* Start a new footer within the section or body. Shortcut for {@link #footer(SinkEventAttributes)} with argument being {@code null}.
*/
void footer();
/**
* Start a new footer within the section or body.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 2.0
*/
void footer(SinkEventAttributes attributes);
/**
* Ends a footer element.
*/
void footer_();
/**
* Starts an unordered list element. Shortcut for {@link #list(SinkEventAttributes)} with argument being {@code null}.
*
* @see #list(SinkEventAttributes)
*/
void list();
/**
* Starts an unordered list.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void list(SinkEventAttributes attributes);
/**
* Ends an unordered list element.
*/
void list_();
/**
* Starts a list item element within an unordered list. Shortcut for {@link #listItem(SinkEventAttributes)} with argument being {@code null}.
*
* @see #listItem(SinkEventAttributes)
*/
void listItem();
/**
* Starts a list item element within an unordered list.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void listItem(SinkEventAttributes attributes);
/**
* Ends a list item element within an unordered list.
*/
void listItem_();
/**
* Starts an ordered list element. Shortcut for {@link #numberedList(int, SinkEventAttributes)} with first argument being {@code numbering} and second argument being {@code null}.
*
* @param numbering the numbering style.
* @see #numberedList(int,SinkEventAttributes)
*/
void numberedList(int numbering);
/**
* Starts an ordered list element.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param numbering the numbering style.
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
* @see #NUMBERING_DECIMAL
* @see #NUMBERING_LOWER_ALPHA
* @see #NUMBERING_LOWER_ROMAN
* @see #NUMBERING_UPPER_ALPHA
* @see #NUMBERING_UPPER_ROMAN
*/
void numberedList(int numbering, SinkEventAttributes attributes);
/**
* Ends an ordered list element.
*/
void numberedList_();
/**
* Starts a list item element within an ordered list. Shortcut for {@link #numberedListItem(SinkEventAttributes)} with argument being {@code null}.
*
* @see #numberedListItem(SinkEventAttributes)
*/
void numberedListItem();
/**
* Starts a list item element within an ordered list.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void numberedListItem(SinkEventAttributes attributes);
/**
* Ends a list item element within an ordered list.
*/
void numberedListItem_();
/**
* Starts a definition list element. Shortcut for {@link #definitionList(SinkEventAttributes)} with argument being {@code null}.
*
* @see #definitionList(SinkEventAttributes)
*/
void definitionList();
/**
* Starts a definition list.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void definitionList(SinkEventAttributes attributes);
/**
* Ends a definition list element.
*/
void definitionList_();
/**
* Starts a list item element within a definition list. Shortcut for {@link #definitionListItem(SinkEventAttributes)} with argument being {@code null}.
*
* @see #definitionListItem(SinkEventAttributes)
*/
void definitionListItem();
/**
* Starts a list item element within a definition list.
*
* <p>
* Every definitionListItem has to contain exactly one {@link #definedTerm(SinkEventAttributes)}
* and one {@link #definition(SinkEventAttributes)}, in this order.
* </p>
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void definitionListItem(SinkEventAttributes attributes);
/**
* Ends a list item element within a definition list.
*/
void definitionListItem_();
/**
* Starts a definition element within a definition list. Shortcut for {@link #definition(SinkEventAttributes)} with argument being {@code null}.
*
* @see #definition(SinkEventAttributes)
*/
void definition();
/**
* Starts a definition element within a definition list.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void definition(SinkEventAttributes attributes);
/**
* Ends a definition element within a definition list.
*/
void definition_();
/**
* Starts a definition term element within a definition list. Shortcut for {@link #definedTerm(SinkEventAttributes)} with argument being {@code null}.
*
* @see #definedTerm(SinkEventAttributes)
*/
void definedTerm();
/**
* Starts a definition term element within a definition list.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void definedTerm(SinkEventAttributes attributes);
/**
* Ends a definition term element within a definition list.
*/
void definedTerm_();
/**
* Starts a basic image embedding element. Shortcut for {@link #figure(SinkEventAttributes)} with argument being {@code null}.
*
* @see #figure(SinkEventAttributes)
*/
void figure();
/**
* Starts a basic image embedding element.
*
* <p>
* The canonical sequence of events for the figure element is:
* </p>
* <pre>
* sink.figure();
*
* sink.figureGraphics("figure.png");
*
* sink.figureCaption();
* sink.text("Figure caption",);
* sink.figureCaption_();
*
* sink.figure_();
* </pre>
* <p>
* where the figureCaption element is optional.
* </p>
* <p>
* However, <strong>NOTE</strong> that the order of figureCaption and
* figureGraphics events is arbitrary,
* ie a parser may emit the figureCaption before or after the figureGraphics.
* Implementing sinks should be prepared to handle both possibilities.
* </p>
* <p>
* <strong>NOTE</strong> also that the figureGraphics() event does not have to be embedded
* inside figure(), in particular for in-line images the figureGraphics() should be used
* stand-alone (in HTML language, figureGraphics() produces a <code><img></code>
* tag, while figure() opens a paragraph- or <code><div></code>- like environment).
* </p>
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
*/
void figure(SinkEventAttributes attributes);
/**
* Ends a basic image embedding element.
*/
void figure_();
/**
* Starts a caption of an image element. Shortcut for {@link #figureCaption(SinkEventAttributes)} with argument being {@code null}.
*
* @see #figureCaption(SinkEventAttributes)
*/
void figureCaption();
/**
* Starts a figure caption.
*
* <p>
* Supported attributes are the {@link SinkEventAttributes base attributes}.
* </p>
*
* @param attributes A set of {@link SinkEventAttributes}, may be <code>null</code>.
* @since 1.1
* @see #figure(SinkEventAttributes)
*/
void figureCaption(SinkEventAttributes attributes);
/**
* Ends a caption of an image.
*/
void figureCaption_();
/**
* Adds a graphic element. Shortcut for {@link #figureGraphics(String, SinkEventAttributes)} with first argument being {@code src} and second argument being {@code null}.
*
* @param src the source
*/
void figureGraphics(String src);
/**
* Adds a graphic element.
*
* <p>
* The <code>src</code> parameter should be a valid link, ie it can be an absolute
* URL or a link relative to the current source document.
* </p>