@@ -582,6 +582,115 @@ sect5:none
582
582
</x : scenario >
583
583
</x : scenario >
584
584
585
+ <x : scenario label =" When generating a label for a table" >
586
+ <x : context select =" (//h:section//h:table)[3]" mode =" label.markup" >
587
+ <section data-type =" chapter" >
588
+ <h1 >This is a chapter heading</h1 >
589
+ <p >Running out of amusing things to say</p >
590
+ <table >
591
+ <!-- No caption -->
592
+ <tbody >
593
+ <tr >
594
+ <td >Python</td >
595
+ <td >Java</td >
596
+ </tr >
597
+ <tr >
598
+ <td >Ruby</td >
599
+ <td >Perl</td >
600
+ </tr >
601
+ </tbody >
602
+ </table >
603
+ <table >
604
+ <!-- Empty caption -->
605
+ <caption />
606
+ <tbody >
607
+ <tr >
608
+ <td >pencil</td >
609
+ </tr >
610
+ <tr >
611
+ <td >paper</td >
612
+ </tr >
613
+ </tbody >
614
+ </table >
615
+ <table >
616
+ <caption >Our favorite colors</caption >
617
+ <thead >
618
+ <tr >
619
+ <th >Name</th >
620
+ <th >Color</th >
621
+ </tr >
622
+ </thead >
623
+ <tbody >
624
+ <tr >
625
+ <td >Tom</td >
626
+ <td >vermilion</td >
627
+ </tr >
628
+ <tr >
629
+ <td >Richard</td >
630
+ <td >fuchsia</td >
631
+ </tr >
632
+ <tr >
633
+ <td >Harry</td >
634
+ <td >cerulean</td >
635
+ </tr >
636
+ </tbody >
637
+ </table >
638
+ </section >
639
+ </x : context >
640
+
641
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
642
+ <x : context >
643
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
644
+ </x : context >
645
+ <x : expect label =" Ignore 'informal' (uncaptioned or empty-captioned) tables in the count" >1</x : expect >
646
+ </x : scenario >
647
+
648
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
649
+ <x : context >
650
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
651
+ </x : context >
652
+ <x : expect label =" Ignore 'informal' (uncaptioned or empty-captioned) tables in the count" >1-1</x : expect >
653
+ </x : scenario >
654
+ </x : scenario >
655
+
656
+
657
+ <x : scenario label =" When generating a label for a figure" >
658
+ <x : context select =" (//h:section//h:figure)[3]" mode =" label.markup" >
659
+ <section data-type =" chapter" >
660
+ <h1 >This is a chapter heading</h1 >
661
+ <p >Running out of amusing things to say</p >
662
+ <figure >
663
+ <!-- No caption (technically shouldn't be a <figure> element here in this case) -->
664
+ <img src =" tegucigalpa.png" />
665
+ </figure >
666
+ <figure >
667
+ <!-- Empty caption -->
668
+ <figcaption />
669
+ <img src =" paramaribo.png" />
670
+ </figure >
671
+ <figure >
672
+ <figcaption >Image of the Ouagadougou skyline</figcaption >
673
+ <img src =" ouagadougou.png" />
674
+ </figure >
675
+ </section >
676
+ </x : context >
677
+
678
+ <x : scenario label =" With label.formal.with.ancestor disabled" >
679
+ <x : context >
680
+ <x : param name =" label.formal.with.ancestor" select =" 0" />
681
+ </x : context >
682
+ <x : expect label =" Ignore 'informal' (uncaptioned or empty-captioned) figures in the count" >1</x : expect >
683
+ </x : scenario >
684
+
685
+ <x : scenario label =" With label.formal.with.ancestor enabled" >
686
+ <x : context >
687
+ <x : param name =" label.formal.with.ancestor" select =" 1" />
688
+ </x : context >
689
+ <x : expect label =" Ignore 'informal' (uncaptioned or empty-captioned) figures in the count" >1-1</x : expect >
690
+ </x : scenario >
691
+ </x : scenario >
692
+
693
+
585
694
<x : pending >
586
695
587
696
<x : scenario label =" When generating a label for a part div with label.section.with.ancestors enabled" >
0 commit comments