001package org.apache.maven.doxia.markup; 002 003/* 004 * Licensed to the Apache Software Foundation (ASF) under one 005 * or more contributor license agreements. See the NOTICE file 006 * distributed with this work for additional information 007 * regarding copyright ownership. The ASF licenses this file 008 * to you under the Apache License, Version 2.0 (the 009 * "License"); you may not use this file except in compliance 010 * with the License. You may obtain a copy of the License at 011 * 012 * http://www.apache.org/licenses/LICENSE-2.0 013 * 014 * Unless required by applicable law or agreed to in writing, 015 * software distributed under the License is distributed on an 016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 017 * KIND, either express or implied. See the License for the 018 * specific language governing permissions and limitations 019 * under the License. 020 */ 021 022import javax.swing.text.html.HTML.Tag; 023 024 025/** 026 * List of <code>Html</code> tags. 027 * <p> 028 * This should contain all valid XHTML 1.0 and HTML5 tags, comprising the tags 029 * in {@link javax.swing.text.html.HTML.Tag} plus several others. 030 * </p> 031 * 032 * @see <a href= 033 * "https://www.w3.org/TR/2012/WD-html-markup-20121011/elements-by-function.html"> 034 * https://www.w3.org/TR/2012/WD-html-markup-20121011/elements-by-function.html</a> 035 * @author ltheussl 036 * @since 1.0 037 */ 038@SuppressWarnings( "checkstyle:interfaceistype" ) 039public interface HtmlMarkup 040 extends XmlMarkup 041{ 042 043 /** A simple HTML tag. Eg <code><br/></code>. */ 044 int TAG_TYPE_SIMPLE = 1; 045 046 /** A start HTML tag. Eg <code><p></code>. */ 047 int TAG_TYPE_START = 2; 048 049 /** An end HTML tag. Eg <code></p></code>. */ 050 int TAG_TYPE_END = 3; 051 052 /** 053 * An HTML entity. Eg <code>&lt;</code>. 054 * 055 * @since 1.1.1. 056 */ 057 int ENTITY_TYPE = 4; 058 059 /** 060 * A CDATA type event. 061 * 062 * @since 1.1.1. 063 */ 064 int CDATA_TYPE = 5; 065 066 // ---------------------------------------------------------------------- 067 // All XHTML 1.0 tags 068 // ---------------------------------------------------------------------- 069 070 /** Xhtml tag for <code>a</code>. */ 071 Tag A = Tag.A; 072 073 /** Xhtml tag for <code>abbr</code>. */ 074 Tag ABBR = new Tag() 075 { 076 /** {@inheritDoc} */ 077 @Override 078 public String toString() 079 { 080 return "abbr"; 081 } 082 }; 083 084 /** Xhtml tag for <code>acronym</code>. */ 085 Tag ACRONYM = new Tag() 086 { 087 /** {@inheritDoc} */ 088 @Override 089 public String toString() 090 { 091 return "acronym"; 092 } 093 }; 094 095 /** Xhtml tag for <code>address</code>. */ 096 Tag ADDRESS = Tag.ADDRESS; 097 098 /** Xhtml tag for <code>applet</code>. */ 099 Tag APPLET = Tag.APPLET; 100 101 /** Xhtml tag for <code>area</code>. */ 102 Tag AREA = Tag.AREA; 103 104 /** Html5 tag for <code>article</code>. */ 105 Tag ARTICLE = new Tag() 106 { 107 /** {@inheritDoc} */ 108 @Override 109 public String toString() 110 { 111 return "article"; 112 } 113 }; 114 115 /** Html5 tag for <code>aside</code>. */ 116 Tag ASIDE = new Tag() 117 { 118 /** {@inheritDoc} */ 119 @Override 120 public String toString() 121 { 122 return "aside"; 123 } 124 }; 125 126 /** Html5 tag for <code>audio</code>. */ 127 Tag AUDIO = new Tag() 128 { 129 /** {@inheritDoc} */ 130 @Override 131 public String toString() 132 { 133 return "audio"; 134 } 135 }; 136 137 /** Xhtml tag for <code>b</code>. */ 138 Tag B = Tag.B; 139 140 /** Xhtml tag for <code>base</code>. */ 141 Tag BASE = Tag.BASE; 142 143 /** Xhtml tag for <code>basefont</code>. */ 144 Tag BASEFONT = Tag.BASEFONT; 145 146 /** Html5 tag for <code>bdi</code>. */ 147 Tag BDI = new Tag() 148 { 149 /** {@inheritDoc} */ 150 @Override 151 public String toString() 152 { 153 return "bdi"; 154 } 155 }; 156 157 /** Xhtml tag for <code>bdo</code>. */ 158 Tag BDO = new Tag() 159 { 160 /** {@inheritDoc} */ 161 @Override 162 public String toString() 163 { 164 return "bdo"; 165 } 166 }; 167 168 /** Xhtml tag for <code>big</code>. */ 169 Tag BIG = Tag.BIG; 170 171 /** Xhtml tag for <code>blockquote</code>. */ 172 Tag BLOCKQUOTE = Tag.BLOCKQUOTE; 173 174 /** Xhtml tag for <code>body</code>. */ 175 Tag BODY = Tag.BODY; 176 177 /** Xhtml tag for <code>br</code>. */ 178 Tag BR = Tag.BR; 179 180 /** Xhtml tag for <code>button</code>. */ 181 Tag BUTTON = new Tag() 182 { 183 /** {@inheritDoc} */ 184 @Override 185 public String toString() 186 { 187 return "button"; 188 } 189 }; 190 191 /** Html5 tag for <code>canvas</code>. */ 192 Tag CANVAS = new Tag() 193 { 194 /** {@inheritDoc} */ 195 @Override 196 public String toString() 197 { 198 return "canvas"; 199 } 200 }; 201 202 /** Xhtml tag for <code>caption</code>. */ 203 Tag CAPTION = Tag.CAPTION; 204 205 /** Xhtml tag for <code>center</code>. */ 206 Tag CENTER = Tag.CENTER; 207 208 /** Xhtml tag for <code>cite</code>. */ 209 Tag CITE = Tag.CITE; 210 211 /** Xhtml tag for <code>code</code>. */ 212 Tag CODE = Tag.CODE; 213 214 /** Xhtml tag for <code>col</code>. */ 215 Tag COL = new Tag() 216 { 217 /** {@inheritDoc} */ 218 @Override 219 public String toString() 220 { 221 return "col"; 222 } 223 }; 224 225 /** Xhtml tag for <code>colgroup</code>. */ 226 Tag COLGROUP = new Tag() 227 { 228 /** {@inheritDoc} */ 229 @Override 230 public String toString() 231 { 232 return "colgroup"; 233 } 234 }; 235 236 /** Html5 tag for <code>command</code>. */ 237 Tag COMMAND = new Tag() 238 { 239 /** {@inheritDoc} */ 240 @Override 241 public String toString() 242 { 243 return "command"; 244 } 245 }; 246 247 /** Html5 tag for <code>data</code>. */ 248 Tag DATA = new Tag() 249 { 250 /** {@inheritDoc} */ 251 @Override 252 public String toString() 253 { 254 return "data"; 255 } 256 }; 257 258 /** Html5 tag for <code>datalist</code>. */ 259 Tag DATALIST = new Tag() 260 { 261 /** {@inheritDoc} */ 262 @Override 263 public String toString() 264 { 265 return "datalist"; 266 } 267 }; 268 269 /** Xhtml tag for <code>dd</code>. */ 270 Tag DD = Tag.DD; 271 272 /** Xhtml tag for <code>del</code>. */ 273 Tag DEL = new Tag() 274 { 275 /** {@inheritDoc} */ 276 @Override 277 public String toString() 278 { 279 return "del"; 280 } 281 }; 282 283 /** Html5 tag for <code>details</code>. */ 284 Tag DETAILS = new Tag() 285 { 286 /** {@inheritDoc} */ 287 @Override 288 public String toString() 289 { 290 return "details"; 291 } 292 }; 293 294 /** Xhtml tag for <code>dfn</code>. */ 295 Tag DFN = Tag.DFN; 296 297 /** Html5 tag for <code>dialog</code>. */ 298 Tag DIALOG = new Tag() 299 { 300 /** {@inheritDoc} */ 301 @Override 302 public String toString() 303 { 304 return "dialog"; 305 } 306 }; 307 308 /** Xhtml tag for <code>dir</code>. */ 309 Tag DIR = Tag.DIR; 310 311 /** Xhtml tag for <code>div</code>. */ 312 Tag DIV = Tag.DIV; 313 314 /** Xhtml tag for <code>dl</code>. */ 315 Tag DL = Tag.DL; 316 317 /** Xhtml tag for <code>dt</code>. */ 318 Tag DT = Tag.DT; 319 320 /** Xhtml tag for <code>em</code>. */ 321 Tag EM = Tag.EM; 322 323 /** Html5 tag for <code>embed</code>. */ 324 Tag EMBED = new Tag() 325 { 326 /** {@inheritDoc} */ 327 @Override 328 public String toString() 329 { 330 return "embed"; 331 } 332 }; 333 334 /** Xhtml tag for <code>fieldset</code>. */ 335 Tag FIELDSET = new Tag() 336 { 337 /** {@inheritDoc} */ 338 @Override 339 public String toString() 340 { 341 return "fieldset"; 342 } 343 }; 344 345 /** Html5 tag for <code>figcaption</code>. */ 346 Tag FIGCAPTION = new Tag() 347 { 348 /** {@inheritDoc} */ 349 @Override 350 public String toString() 351 { 352 return "figcaption"; 353 } 354 }; 355 356 /** Html5 tag for <code>figure</code>. */ 357 Tag FIGURE = new Tag() 358 { 359 /** {@inheritDoc} */ 360 @Override 361 public String toString() 362 { 363 return "figure"; 364 } 365 }; 366 367 /** Xhtml tag for <code>font</code>. */ 368 Tag FONT = Tag.FONT; 369 370 /** Html5 tag for <code>footer</code>. */ 371 Tag FOOTER = new Tag() 372 { 373 /** {@inheritDoc} */ 374 @Override 375 public String toString() 376 { 377 return "footer"; 378 } 379 }; 380 381 /** Xhtml tag for <code>form</code>. */ 382 Tag FORM = Tag.FORM; 383 384 /** Xhtml tag for <code>frame</code>. */ 385 Tag FRAME = Tag.FRAME; 386 387 /** Xhtml tag for <code>frameset</code>. */ 388 Tag FRAMESET = Tag.FRAMESET; 389 390 /** Xhtml tag for <code>h1</code>. */ 391 Tag H1 = Tag.H1; 392 393 /** Xhtml tag for <code>h2</code>. */ 394 Tag H2 = Tag.H2 ; 395 396 /** Xhtml tag for <code>h3</code>. */ 397 Tag H3 = Tag.H3; 398 399 /** Xhtml tag for <code>h4</code>. */ 400 Tag H4 = Tag.H4; 401 402 /** Xhtml tag for <code>h5</code>. */ 403 Tag H5 = Tag.H5; 404 405 /** Xhtml tag for <code>h6</code>. */ 406 Tag H6 = Tag.H6; 407 408 /** Xhtml tag for <code>head</code>. */ 409 Tag HEAD = Tag.HEAD; 410 411 /** Html5 tag for <code>header</code>. */ 412 Tag HEADER = new Tag() 413 { 414 /** {@inheritDoc} */ 415 @Override 416 public String toString() 417 { 418 return "header"; 419 } 420 }; 421 422 /** Html5 tag for <code>hgroup</code>. */ 423 Tag HGROUP = new Tag() 424 { 425 /** {@inheritDoc} */ 426 @Override 427 public String toString() 428 { 429 return "hgroup"; 430 } 431 }; 432 433 /** Xhtml tag for <code>hr</code>. */ 434 Tag HR = Tag.HR; 435 436 /** Xhtml tag for <code>html</code>. */ 437 Tag HTML = Tag.HTML; 438 439 /** Xhtml tag for <code>i</code>. */ 440 Tag I = Tag.I; 441 442 /** Xhtml tag for <code>iframe</code>. */ 443 Tag IFRAME = new Tag() 444 { 445 /** {@inheritDoc} */ 446 @Override 447 public String toString() 448 { 449 return "iframe"; 450 } 451 }; 452 453 /** Xhtml tag for <code>img</code>. */ 454 Tag IMG = Tag.IMG; 455 456 /** Xhtml tag for <code>input</code>. */ 457 Tag INPUT = Tag.INPUT; 458 459 /** Xhtml tag for <code>ins</code>. */ 460 Tag INS = new Tag() 461 { 462 /** {@inheritDoc} */ 463 @Override 464 public String toString() 465 { 466 return "ins"; 467 } 468 }; 469 470 /** Xhtml tag for <code>isindex</code>. */ 471 Tag ISINDEX = Tag.ISINDEX; 472 473 /** Xhtml tag for <code>kbd</code>. */ 474 Tag KBD = Tag.KBD; 475 476 /** Html5 tag for <code>keygen</code>. */ 477 Tag KEYGEN = new Tag() 478 { 479 /** {@inheritDoc} */ 480 @Override 481 public String toString() 482 { 483 return "keygen"; 484 } 485 }; 486 487 /** Xhtml tag for <code>label</code>. */ 488 Tag LABEL = new Tag() 489 { 490 /** {@inheritDoc} */ 491 @Override 492 public String toString() 493 { 494 return "label"; 495 } 496 }; 497 498 /** Xhtml tag for <code>legend</code>. */ 499 Tag LEGEND = new Tag() 500 { 501 /** {@inheritDoc} */ 502 @Override 503 public String toString() 504 { 505 return "legend"; 506 } 507 }; 508 509 /** Xhtml tag for <code>li</code>. */ 510 Tag LI = Tag.LI; 511 512 /** Xhtml tag for <code>link</code>. */ 513 Tag LINK = Tag.LINK; 514 515 /** Xhtml tag for <code>map</code>. */ 516 Tag MAP = Tag.MAP; 517 518 /** Html5 tag for <code>main</code>. */ 519 Tag MAIN = new Tag() 520 { 521 /** {@inheritDoc} */ 522 @Override 523 public String toString() 524 { 525 return "main"; 526 } 527 }; 528 529 /** Html5 tag for <code>mark</code>. */ 530 Tag MARK = new Tag() 531 { 532 /** {@inheritDoc} */ 533 @Override 534 public String toString() 535 { 536 return "mark"; 537 } 538 }; 539 540 /** Xhtml tag for <code>menu</code>. */ 541 Tag MENU = Tag.MENU; 542 543 /** Xhtml tag for <code>meta</code>. */ 544 Tag META = Tag.META; 545 546 /** Html5 tag for <code>meter</code>. */ 547 Tag METER = new Tag() 548 { 549 /** {@inheritDoc} */ 550 @Override 551 public String toString() 552 { 553 return "meter"; 554 } 555 }; 556 557 /** Html5 tag for <code>nav</code>. */ 558 Tag NAV = new Tag() 559 { 560 /** {@inheritDoc} */ 561 @Override 562 public String toString() 563 { 564 return "nav"; 565 } 566 }; 567 568 /** Xhtml tag for <code>noframes</code>. */ 569 Tag NOFRAMES = Tag.NOFRAMES; 570 571 /** Xhtml tag for <code>noscript</code>. */ 572 Tag NOSCRIPT = new Tag() 573 { 574 /** {@inheritDoc} */ 575 @Override 576 public String toString() 577 { 578 return "noscript"; 579 } 580 }; 581 582 /** Xhtml tag for <code>object</code>. */ 583 Tag OBJECT = Tag.OBJECT; 584 585 /** Xhtml tag for <code>ol</code>. */ 586 Tag OL = Tag.OL; 587 588 /** Xhtml tag for <code>optgroup</code>. */ 589 Tag OPTGROUP = new Tag() 590 { 591 /** {@inheritDoc} */ 592 @Override 593 public String toString() 594 { 595 return "optgroup"; 596 } 597 }; 598 599 /** Xhtml tag for <code>option</code>. */ 600 Tag OPTION = Tag.OPTION; 601 602 /** Html5 tag for <code>output</code>. */ 603 Tag OUTPUT = new Tag() 604 { 605 /** {@inheritDoc} */ 606 @Override 607 public String toString() 608 { 609 return "output"; 610 } 611 }; 612 613 /** Xhtml tag for <code>p</code>. */ 614 Tag P = Tag.P; 615 616 /** Xhtml tag for <code>param</code>. */ 617 Tag PARAM = Tag.PARAM; 618 619 /** Html5 tag for <code>picture</code>. */ 620 Tag PICTURE = new Tag() 621 { 622 /** {@inheritDoc} */ 623 @Override 624 public String toString() 625 { 626 return "picture"; 627 } 628 }; 629 630 /** Xhtml tag for <code>pre</code>. */ 631 Tag PRE = Tag.PRE; 632 633 /** Html5 tag for <code>progress</code>. */ 634 Tag PROGRESS = new Tag() 635 { 636 /** {@inheritDoc} */ 637 @Override 638 public String toString() 639 { 640 return "progress"; 641 } 642 }; 643 644 /** Xhtml tag for <code>q</code>. */ 645 Tag Q = new Tag() 646 { 647 /** {@inheritDoc} */ 648 @Override 649 public String toString() 650 { 651 return "q"; 652 } 653 }; 654 655 /** Html5 tag for <code>rb</code>. */ 656 Tag RB = new Tag() 657 { 658 /** {@inheritDoc} */ 659 @Override 660 public String toString() 661 { 662 return "rb"; 663 } 664 }; 665 666 /** Html5 tag for <code>rp</code>. */ 667 Tag RP = new Tag() 668 { 669 /** {@inheritDoc} */ 670 @Override 671 public String toString() 672 { 673 return "rp"; 674 } 675 }; 676 677 /** Html5 tag for <code>rt</code>. */ 678 Tag RT = new Tag() 679 { 680 /** {@inheritDoc} */ 681 @Override 682 public String toString() 683 { 684 return "rt"; 685 } 686 }; 687 688 /** Html5 tag for <code>rtc</code>. */ 689 Tag RTC = new Tag() 690 { 691 /** {@inheritDoc} */ 692 @Override 693 public String toString() 694 { 695 return "rtc"; 696 } 697 }; 698 699 /** Html5 tag for <code>ruby</code>. */ 700 Tag RUBY = new Tag() 701 { 702 /** {@inheritDoc} */ 703 @Override 704 public String toString() 705 { 706 return "ruby"; 707 } 708 }; 709 710 /** Xhtml tag for <code>s</code>. */ 711 Tag S = Tag.S; 712 713 /** Xhtml tag for <code>samp</code>. */ 714 Tag SAMP = Tag.SAMP; 715 716 /** Xhtml tag for <code>script</code>. */ 717 Tag SCRIPT = Tag.SCRIPT; 718 719 /** Html5 tag for <code>section</code>. */ 720 Tag SECTION = new Tag() 721 { 722 /** {@inheritDoc} */ 723 @Override 724 public String toString() 725 { 726 return "section"; 727 } 728 }; 729 730 /** Xhtml tag for <code>select</code>. */ 731 Tag SELECT = Tag.SELECT; 732 733 /** Xhtml tag for <code>small</code>. */ 734 Tag SMALL = Tag.SMALL; 735 736 /** Html5 tag for <code>source</code>. */ 737 Tag SOURCE = new Tag() 738 { 739 /** {@inheritDoc} */ 740 @Override 741 public String toString() 742 { 743 return "source"; 744 } 745 }; 746 747 /** Xhtml tag for <code>span</code>. */ 748 Tag SPAN = Tag.SPAN; 749 750 /** Xhtml tag for <code>strike</code>. */ 751 Tag STRIKE = Tag.STRIKE; 752 753 /** Xhtml tag for <code>strong</code>. */ 754 Tag STRONG = Tag.STRONG; 755 756 /** Xhtml tag for <code>style</code>. */ 757 Tag STYLE = Tag.STYLE; 758 759 /** Xhtml tag for <code>sub</code>. */ 760 Tag SUB = Tag.SUB; 761 762 /** Html5 tag for <code>summary</code>. */ 763 Tag SUMMARY = new Tag() 764 { 765 /** {@inheritDoc} */ 766 @Override 767 public String toString() 768 { 769 return "summary"; 770 } 771 }; 772 773 /** Xhtml tag for <code>sup</code>. */ 774 Tag SUP = Tag.SUP; 775 776 /** Xhtml tag for <code>table</code>. */ 777 Tag TABLE = Tag.TABLE; 778 779 /** Xhtml tag for <code>tbody</code>. */ 780 Tag TBODY = new Tag() 781 { 782 /** {@inheritDoc} */ 783 @Override 784 public String toString() 785 { 786 return "tbody"; 787 } 788 }; 789 790 /** Xhtml tag for <code>td</code>. */ 791 Tag TD = Tag.TD; 792 793 /** Html5 tag for <code>template</code>. */ 794 Tag TEMPLATE = new Tag() 795 { 796 /** {@inheritDoc} */ 797 @Override 798 public String toString() 799 { 800 return "template"; 801 } 802 }; 803 804 /** Xhtml tag for <code>textarea</code>. */ 805 Tag TEXTAREA = Tag.TEXTAREA; 806 807 /** Xhtml tag for <code>tfoot</code>. */ 808 Tag TFOOT = new Tag() 809 { 810 /** {@inheritDoc} */ 811 @Override 812 public String toString() 813 { 814 return "tfoot"; 815 } 816 }; 817 818 /** Xhtml tag for <code>th</code>. */ 819 Tag TH = Tag.TH; 820 821 /** Xhtml tag for <code>thead</code>. */ 822 Tag THEAD = new Tag() 823 { 824 /** {@inheritDoc} */ 825 @Override 826 public String toString() 827 { 828 return "thead"; 829 } 830 }; 831 832 /** Html5 tag for <code>time</code>. */ 833 Tag TIME = new Tag() 834 { 835 /** {@inheritDoc} */ 836 @Override 837 public String toString() 838 { 839 return "time"; 840 } 841 }; 842 843 /** Xhtml tag for <code>title</code>. */ 844 Tag TITLE = Tag.TITLE; 845 846 /** Xhtml tag for <code>tr</code>. */ 847 Tag TR = Tag.TR; 848 849 /** Html5 tag for <code>track</code>. */ 850 Tag TRACK = new Tag() 851 { 852 /** {@inheritDoc} */ 853 @Override 854 public String toString() 855 { 856 return "track"; 857 } 858 }; 859 860 /** Xhtml tag for <code>tt</code>. */ 861 Tag TT = Tag.TT; 862 863 /** Xhtml tag for <code>u</code>. */ 864 Tag U = Tag.U; 865 866 /** Xhtml tag for <code>ul</code>. */ 867 Tag UL = Tag.UL; 868 869 /** Xhtml tag for <code>var</code>. */ 870 Tag VAR = Tag.VAR ; 871 872 /** Html5 tag for <code>video</code>. */ 873 Tag VIDEO = new Tag() 874 { 875 /** {@inheritDoc} */ 876 @Override 877 public String toString() 878 { 879 return "video"; 880 } 881 }; 882 883 /** Html5 tag for <code>wbr</code>. */ 884 Tag WBR = new Tag() 885 { 886 /** {@inheritDoc} */ 887 @Override 888 public String toString() 889 { 890 return "wbr"; 891 } 892 }; 893 894}