|
352 | 352 |
|
353 | 353 | <x:scenario label="Where id doesn't exist (no text node)">
|
354 | 354 | <x:context select="//h:a[@id = 'bogus_no_text_node']"/>
|
355 |
| - <x:expect label="XSL should resolve to content after # sign"> |
| 355 | + <x:expect label="href should resolve to # sign and content that follows"> |
356 | 356 | <a id="bogus_no_text_node" data-type="xref" href="#bogus">...</a>
|
357 | 357 | </x:expect>
|
358 | 358 | </x:scenario>
|
359 | 359 |
|
360 | 360 | <x:scenario label="Where id doesn't exist (text node)">
|
361 | 361 | <x:context select="//h:a[@id = 'bogus_text_node']"/>
|
362 |
| - <x:expect label="href should resolve to content after # sign"> |
| 362 | + <x:expect label="href should resolve to # sign and content that follows"> |
363 | 363 | <a id="bogus_text_node" data-type="xref" href="#bogus">...</a>
|
364 | 364 | </x:expect>
|
365 | 365 | </x:scenario>
|
366 | 366 |
|
367 | 367 | <x:scenario label="Where id doesn't exist and no # sign (no text node)">
|
368 | 368 | <x:context select="//h:a[@id = 'random_bogus_no_text_node']"/>
|
369 |
| - <x:expect label="href should be left untouched"> |
370 |
| - <a id="random_bogus_no_text_node" data-type="xref" href="random_bogus_text">...</a> |
| 369 | + <x:expect label="existing href should be prepended by a # sign"> |
| 370 | + <a id="random_bogus_no_text_node" data-type="xref" href="#random_bogus_text">...</a> |
371 | 371 | </x:expect>
|
372 | 372 | </x:scenario>
|
373 | 373 |
|
374 | 374 | <x:scenario label="Where id doesn't exist and no # sign (text node)">
|
375 | 375 | <x:context select="//h:a[@id = 'random_bogus_text_node']"/>
|
376 |
| - <x:expect label="href should be left untouched"> |
377 |
| - <a id="random_bogus_text_node" data-type="xref" href="random_bogus_text">...</a> |
| 376 | + <x:expect label="existing href should be prepended by a # sign"> |
| 377 | + <a id="random_bogus_text_node" data-type="xref" href="#random_bogus_text">...</a> |
378 | 378 | </x:expect>
|
379 | 379 | </x:scenario>
|
380 | 380 |
|
381 | 381 | <x:scenario label="Where href is a bogus file/id pair (no text node)">
|
382 | 382 | <x:context select="//h:a[@id = 'fileref_bogus_no_text_node']"/>
|
383 |
| - <x:expect label="href should resolve to content after # sign"> |
| 383 | + <x:expect label="href should resolve to # sign and content that follows"> |
384 | 384 | <a id="fileref_bogus_no_text_node" data-type="xref" href="#bogus">...</a>
|
385 | 385 | </x:expect>
|
386 | 386 | </x:scenario>
|
387 | 387 |
|
388 | 388 | <x:scenario label="Where href is a bogus file/id pair (text node)">
|
389 | 389 | <x:context select="//h:a[@id = 'fileref_bogus_text_node']"/>
|
390 |
| - <x:expect label="href should resolve to content after # sign"> |
| 390 | + <x:expect label="href should resolve to # sign and content that follows"> |
391 | 391 | <a id="fileref_bogus_text_node" data-type="xref" href="#bogus">...</a>
|
392 | 392 | </x:expect>
|
393 | 393 | </x:scenario>
|
|
510 | 510 | </x:scenario>
|
511 | 511 | </x:scenario>
|
512 | 512 |
|
513 |
| - <x:scenario label="When an XREF element is matched that contains an href pointing to a Web URL (not a valid XREF)"> |
| 513 | + <x:scenario label="When an 'a' element is matched that contains an href pointing to a Web URL (not a valid XREF)"> |
514 | 514 | <x:context>
|
515 | 515 | <section id="chapter1" data-type="chapter">
|
516 | 516 | <p>Here comes a cross-reference: see <a id="no_text_node" href="http://oreilly.com/whatever.html#chapter1"/></p>
|
|
588 | 588 | </x:scenario>
|
589 | 589 | </x:scenario>
|
590 | 590 |
|
591 |
| - <x:scenario label="When an XREF element is matched that contains an href pointing to a bogus id"> |
| 591 | + <x:scenario label="When an 'a' element is matched that contains an href pointing to a bogus id"> |
592 | 592 | <x:context>
|
593 | 593 | <section id="chapter1" data-type="chapter">
|
594 | 594 | <p>Here comes a bogus cross-reference: see <a id="bogus_no_text_node" href="#bogus"/></p>
|
|
609 | 609 |
|
610 | 610 | <x:scenario label="Where id doesn't exist (no text node)">
|
611 | 611 | <x:context select="//h:a[@id = 'bogus_no_text_node']"/>
|
612 |
| - <x:expect label="href should resolve to content after # sign"> |
| 612 | + <x:expect label="href should resolve to # sign and content that follows"> |
613 | 613 | <a id="bogus_no_text_node" href="#bogus">...</a>
|
614 | 614 | </x:expect>
|
615 | 615 | </x:scenario>
|
616 | 616 |
|
617 | 617 | <x:scenario label="Where id doesn't exist (text node)">
|
618 | 618 | <x:context select="//h:a[@id = 'bogus_text_node']"/>
|
619 |
| - <x:expect label="href should resolve to content after # sign"> |
| 619 | + <x:expect label="href should resolve to # sign and content that follows"> |
620 | 620 | <a id="bogus_text_node" href="#bogus">...</a>
|
621 | 621 | </x:expect>
|
622 | 622 | </x:scenario>
|
623 | 623 |
|
624 | 624 | <x:scenario label="Where id doesn't exist and no # sign (no text node)">
|
625 | 625 | <x:context select="//h:a[@id = 'random_bogus_no_text_node']"/>
|
626 |
| - <x:expect label="href should be left untouched"> |
627 |
| - <a id="random_bogus_no_text_node" href="random_bogus_text">...</a> |
| 626 | + <x:expect label="href should resolve to # sign and existing href value"> |
| 627 | + <a id="random_bogus_no_text_node" href="#random_bogus_text">...</a> |
628 | 628 | </x:expect>
|
629 | 629 | </x:scenario>
|
630 | 630 |
|
631 | 631 | <x:scenario label="Where id doesn't exist and no # sign (text node)">
|
632 | 632 | <x:context select="//h:a[@id = 'random_bogus_text_node']"/>
|
633 |
| - <x:expect label="href should be left untouched"> |
634 |
| - <a id="random_bogus_text_node" href="random_bogus_text">...</a> |
| 633 | + <x:expect label="href should resolve to # sign and existing href value"> |
| 634 | + <a id="random_bogus_text_node" href="#random_bogus_text">...</a> |
635 | 635 | </x:expect>
|
636 | 636 | </x:scenario>
|
637 | 637 |
|
638 | 638 | <x:scenario label="Where href is a bogus file/id pair (no text node)">
|
639 | 639 | <x:context select="//h:a[@id = 'fileref_bogus_no_text_node']"/>
|
640 |
| - <x:expect label="href should resolve to content after # sign"> |
| 640 | + <x:expect label="href should resolve to # sign and content that follows"> |
641 | 641 | <a id="fileref_bogus_no_text_node" href="#bogus">...</a>
|
642 | 642 | </x:expect>
|
643 | 643 | </x:scenario>
|
644 | 644 |
|
645 | 645 | <x:scenario label="Where href is a bogus file/id pair (text node)">
|
646 | 646 | <x:context select="//h:a[@id = 'fileref_bogus_text_node']"/>
|
647 |
| - <x:expect label="href should resolve to content after # sign"> |
| 647 | + <x:expect label="href should resolve to # sign and content that follows"> |
648 | 648 | <a id="fileref_bogus_text_node" href="#bogus">...</a>
|
649 | 649 | </x:expect>
|
650 | 650 | </x:scenario>
|
651 | 651 |
|
652 | 652 | <x:scenario label="Where id doesn't exist (link; no text node)">
|
653 | 653 | <x:context select="//h:a[@id = 'bogus_no_text_node_link']"/>
|
654 |
| - <x:expect label="href should resolve to content after # sign"> |
| 654 | + <x:expect label="href should resolve to # sign and content that follows"> |
655 | 655 | <a id="bogus_no_text_node_link" data-type="link" href="#bogus">...</a>
|
656 | 656 | </x:expect>
|
657 | 657 | </x:scenario>
|
658 | 658 |
|
659 | 659 | <x:scenario label="Where id doesn't exist (link; text node)">
|
660 | 660 | <x:context select="//h:a[@id = 'bogus_text_node_link']"/>
|
661 |
| - <x:expect label="href should resolve to content after # sign"> |
| 661 | + <x:expect label="href should resolve to # sign and content that follows"> |
662 | 662 | <a id="bogus_text_node_link" data-type="link" href="#bogus">...</a>
|
663 | 663 | </x:expect>
|
664 | 664 | </x:scenario>
|
665 | 665 |
|
666 | 666 | <x:scenario label="Where id doesn't exist and no # sign (link; no text node)">
|
667 | 667 | <x:context select="//h:a[@id = 'random_bogus_no_text_node_link']"/>
|
668 |
| - <x:expect label="href should be left untouched"> |
669 |
| - <a id="random_bogus_no_text_node_link" data-type="link" href="random_bogus_text">...</a> |
| 668 | + <x:expect label="href should resolve to # sign and existing href value"> |
| 669 | + <a id="random_bogus_no_text_node_link" data-type="link" href="#random_bogus_text">...</a> |
670 | 670 | </x:expect>
|
671 | 671 | </x:scenario>
|
672 | 672 |
|
673 | 673 | <x:scenario label="Where id doesn't exist and no # sign (link; text node)">
|
674 | 674 | <x:context select="//h:a[@id = 'random_bogus_text_node_link']"/>
|
675 |
| - <x:expect label="href should be left untouched"> |
676 |
| - <a id="random_bogus_text_node_link" data-type="link" href="random_bogus_text">...</a> |
| 675 | + <x:expect label="href should resolve to # sign and existing href value"> |
| 676 | + <a id="random_bogus_text_node_link" data-type="link" href="#random_bogus_text">...</a> |
677 | 677 | </x:expect>
|
678 | 678 | </x:scenario>
|
679 | 679 |
|
680 | 680 | <x:scenario label="Where href is a bogus file/id pair (link; no text node)">
|
681 | 681 | <x:context select="//h:a[@id = 'fileref_bogus_no_text_node_link']"/>
|
682 |
| - <x:expect label="href should resolve to content after # sign"> |
| 682 | + <x:expect label="href should resolve to # sign and content that follows"> |
683 | 683 | <a id="fileref_bogus_no_text_node_link" data-type="link" href="#bogus">...</a>
|
684 | 684 | </x:expect>
|
685 | 685 | </x:scenario>
|
686 | 686 |
|
687 | 687 | <x:scenario label="Where href is a bogus file/id pair (link; text node)">
|
688 | 688 | <x:context select="//h:a[@id = 'fileref_bogus_text_node_link']"/>
|
689 |
| - <x:expect label="href should resolve to content after # sign"> |
| 689 | + <x:expect label="href should resolve to # sign and content that follows"> |
690 | 690 | <a id="fileref_bogus_text_node_link" data-type="link" href="#bogus">...</a>
|
691 | 691 | </x:expect>
|
692 | 692 | </x:scenario>
|
|
774 | 774 |
|
775 | 775 | <x:scenario label="If an href contains a mailto: scheme">
|
776 | 776 | <x:call template="calculate-output-href">
|
777 |
| - < x:param name= "source-href-value" select= "'[email protected]'"/> |
| 777 | + < x:param name= "source-href-value" select= "'mailto:[email protected]'"/> |
778 | 778 | </x:call>
|
779 |
| - < x:expect label= "It should be output as is"> [email protected]</ x:expect> |
| 779 | + < x:expect label= "It should be output as is"> mailto:[email protected]</ x:expect> |
780 | 780 | </x:scenario>
|
781 | 781 |
|
782 | 782 | <x:scenario label="If href text does not contain absolute URL or # sign">
|
783 | 783 | <x:call template="calculate-output-href">
|
784 |
| - <x:param name="source-href-value" select="'ch01.html'"/> |
| 784 | + <x:param name="source-href-value" select="'random_text'"/> |
785 | 785 | </x:call>
|
786 |
| - <x:expect label="It should be output as is">ch01.html</x:expect> |
| 786 | + <x:expect label="It should be output as is, prepended by a # sign">#random_text</x:expect> |
787 | 787 | </x:scenario>
|
788 | 788 |
|
789 | 789 | <x:scenario label="If href text does not contain absolute URL and contains multiple # signs">
|
|
0 commit comments