/usr/lib/ocaml/ocsigen/xHTML.mli is in libocsigen-xhtml-ocaml-dev 1.3.4-2build4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 | (* $Id: xHTML.ml,v 1.31 2005/06/20 17:57:58 ohl Exp $
Copyright (C) 2004 by Thorsten Ohl <ohl@physik.uni-wuerzburg.de>
Copyright (C) 2007 by Vincent Balat, Gabriel Kerneis, CNRS, Université Paris Diderot
XHTML is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
XHTML is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *)
(* Warning:
I hacked this module to try to handle more things and to be closer
to the DTD (and to make it compatible with Ocsigen).
BUT: This hack is not very clean because I don't think I follow
Thorsten Ohl's conventions.
I verified lots of types but not all and I am not sure that it
corresponds exactly to the dtd. (Actually, I am almost sure that it doesn't).
This module would deserve a complete verification and to be cleaned
following Ohl's conventions.
Vincent Balat
*)
(* IDEAS:
It might be possible to factorize attributes and elements into separate
modules. Problems are attributes like [class] and [for] that class with
reserved words. Then the [a_] prefix would have to be maintained and the
only advantage are a potentially better mapping of the XHTML modularization
to O'Caml modules. *)
(** Typesafe constructors for XHTML 1.1 documents.
@see <http://www.w3.org/TR/xhtml-modularization/abstract_modules.html> W3C Recommendation *)
module type T =
sig
(** The elements, attributes, attribute types and data types are given names
that match the names in the W3C recommendation as closely as allowed by
a strict typing discipline and the lexical conventions of O'Caml:
{ul
{- {e elements} are implemented as O'Caml constructors with the same name as
in the W3C recommendation. The domain and codomain are specified as ['a elt],
where ['a] is a concrete phantom type build out of polymorphic variants.}
{- {e attributes} are implemented as O'Caml constructors with [a_] prefixed to the
name. The name is the same as in the W3C recommendation, unless an additional
prefix is required to disambiguate:
{ul
{- [a_fs_rows] and [a_fs_cols] instead of [a_rows] and [a_cols] for framesets,
because of the different argument types.}}}
{- {e attribute types} are implemented as O'Caml types that all have the same names
as in the W3C recommendation, but are all lowercase.}
{- {e data types} are also implemented as O'Caml types that all have the same names
as in the W3C recommendation and are again all lowercase.}}
Finite sets of alternatives are mapped to polymorphic variants.
The phantom type is always the {e most general} required by any (supported)
version of the standard. Type discipline is enforced by exporting or not-exporting
the corresponding constructor. *)
(** {1 Attribute Types}
@see <http://www.w3.org/TR/xhtml-modularization/abstraction.html#s_common_attrtypes> Modularization of XHTML *)
type cdata = string
(** Character data *)
type id = string
(** A document-unique identifier *)
type idref = string
(** A reference to a document-unique identifier *)
type idrefs = idref list
(** A space-separated list of references to document-unique identifiers *)
type name = string
(** A name with the same character constraints as ID above *)
type nmtoken = string
(** A name composed of only name tokens as defined in XML 1.0
@see <http://www.w3.org/TR/2000/REC-xml-20001006> XML 1.0 *)
type nmtokens = nmtoken list
(** One or more white space separated NMTOKEN values *)
type pcdata = string
(** Processed character data *)
(** {2 Data Types} *)
type character = char
(** A single character from ISO 10646. *)
type charset = string
(** A character encoding, as per RFC2045 (MIME).
@see <http://www.ietf.org/rfc/rfc2045.txt> RFC2045 *)
type charsets = charset list
(** A space-separated list of character encodings, as per RFC2045 (MIME).
@see <http://www.ietf.org/rfc/rfc2045.txt> RFC2045 *)
type contenttype = string
(** A media type, as per RFC2045 (MIME).
@see <http://www.ietf.org/rfc/rfc2045.txt> RFC2045 *)
type contenttypes = contenttype list
(** A comma-separated list of media types, as per RFC2045 (MIME).
@see <http://www.ietf.org/rfc/rfc2045.txt> RFC2045 *)
type coords = string list
(** Comma- separated list of coordinates to use in defining areas. *)
type datetime = string
(** Date and time information. *)
type fpi = string
(** A character string representing an SGML Formal Public Identifier. *)
type frametarget = string
(** Frame name used as destination for results of certain actions. *)
type languagecode = string
(** A language code, as per RFC3066.
@see <http://www.ietf.org/rfc/rfc3066.txt> RFC3066 *)
type length = [ `Pixels of int | `Percent of int ]
(** The value may be either in pixels or a percentage of the available
horizontal or vertical space. Thus, the value [`Percent 50] means half of
the available space. *)
type linktypes =
[ `Alternate | `Appendix | `Bookmark | `Chapter | `Contents
| `Copyright | `Glossary | `Help | `Index | `Next | `Prev
| `Section | `Start | `Stylesheet | `Subsection | `Other of string] list
(** Authors may use the following recognized link types, listed here with
their conventional interpretations. A LinkTypes value refers to a
space-separated list of link types. White space characters are not
permitted within link types. These link types are case-insensitive, i.e.,
["Alternate"] has the same meaning as ["alternate"].
User agents, search engines, etc. may interpret these link types in a
variety of ways. For example, user agents may provide access to linked
documents through a navigation bar.
{ul
{- [`Alternate]:
Designates substitute versions for the document in which the link occurs.
When used together with the hreflang attribute, it implies a translated
version of the document. When used together with the media attribute,
it implies a version designed for a different medium (or media).}
{- [`Stylesheet]:
Refers to an external style sheet. See the Style Module for details.
This is used together with the link type ["Alternate"] for user-selectable
alternate style sheets.}
{- [`Start]:
Refers to the first document in a collection of documents.
This link type tells search engines which document is considered
by the author to be the starting point of the collection.}
{- [`Next]:
Refers to the next document in a linear sequence of documents.
User agents may choose to pre-load the "next" document, to reduce
the perceived load time.}
{- [`Prev]:
Refers to the previous document in an ordered series of documents.
Some user agents also support the synonym "Previous".}
{- [`Contents]:
Refers to a document serving as a table of contents. Some user
agents also support the synonym ToC (from "Table of Contents").}
{- [`Index]:
Refers to a document providing an index for the current document.}
{- [`Glossary]:
Refers to a document providing a glossary of terms that pertain to
the current document.}
{- [`Copyright]:
Refers to a copyright statement for the current document.}
{- [`Chapter]:
Refers to a document serving as a chapter in a collection of documents.}
{- [`Section]:
Refers to a document serving as a section in a collection of documents.}
{- [`Subsection]:
Refers to a document serving as a subsection in a collection of documents.}
{- [`Appendix]:
Refers to a document serving as an appendix in a collection of documents.}
{- [`Help]:
Refers to a document offering help (more information, links to other
sources information, etc.)}
{- [`Bookmark]:
Refers to a bookmark. A bookmark is a link to a key entry point within
an extended document. The title attribute may be used, for example, to
label the bookmark. Note that several bookmarks may be defined in each
document.}
{- [`Other]:
refers to any other type (for example [icon] or [shortcut]).
}} *)
type mediadesc =
[ `All | `Aural | `Braille | `Handheld | `Print
| `Projection | `Screen | `TTY | `TV ] list
(** The MediaDesc attribute is a comma-separated list of media descriptors.
The following is a list of recognized media descriptors:
{ul
{- [`Screen]:
Intended for non-paged computer screens.}
{- [`TTY]:
Intended for media using a fixed-pitch character grid, such as
teletypes, terminals, or portable devices with limited display
capabilities.}
{- [`TV]:
Intended for television-type devices (low resolution, color,
limited scrollability).}
{- [`Projection]:
Intended for projectors.}
{- [`Handheld]:
Intended for handheld devices (small screen, monochrome,
bitmapped graphics, limited bandwidth).}
{- [`Print]:
Intended for paged, opaque material and for documents viewed
on screen in print preview mode.}
{- [`Braille]:
Intended for braille tactile feedback devices.}
{- [`Aural]:
Intended for speech synthesizers.}
{- [`All]:
Suitable for all devices.}}
Future versions of XHTML may introduce new values and may allow
parameterized values. To facilitate the introduction of these
extensions, conforming user agents must be able to parse the media
attribute value as follows:
{ol
{- The value is a comma-separated list of entries. For example,
[media="screen, 3d-glasses, print and resolution > 90dpi"]
is mapped to: ["screen"], ["3d-glasses"],
["print and resolution > 90dpi"].}
{- Each entry is truncated just before the first character that
isn't a US ASCII letter [\[a-zA-Z\]] (ISO 10646 hex 41-5a,
61-7a), digit [\[0-9\]] (hex 30-39), or hyphen-minus (hex 2d).
In the example, this gives: ["screen"], ["3d-glasses"], ["print"].}
{- A case-insensitive match is then made with the set of media
types defined above. User agents may ignore entries that
don't match. In the example we are left with ["screen"] and
["print"].}}
Note. Style sheets may include media-dependent variations within them
(e.g., the [CSS \@media] construct). In such cases it may be appropriate
to use ["media=all"]. *)
type multilength = [ length | `Relative of int ]
(** The value may be a Length or a relative length. A relative length
has the form ["i*"], where ["i"] is an integer. When allotting space
among elements competing for that space, user agents allot pixel
and percentage lengths first, then divide up remaining available
space among relative lengths. Each relative length receives a
portion of the available space that is proportional to the integer
preceding the ["*"]. The value ["*"] is equivalent to ["1*"]. Thus, if
60 pixels of space are available after the user agent allots pixel
and percentage space, and the competing relative lengths are ["1*"],
["2*"], and ["3*"], the ["1*"] will be allotted 10 pixels, the ["2*"] will be
allotted 20 pixels, and the ["3*"] will be allotted 30 pixels. *)
type multilengths = multilength list (* comma-separated *)
(** A comma separated list of items of type MultiLength. *)
type number = int
(** One or more digits. *)
type pixels = int
(** The value is an integer that represents the number of pixels of
the canvas (screen, paper). Thus, the value ["50"] means fifty
pixels. For normative information about the definition of a pixel,
please consult CSS2.
@see <http://www.w3.org/TR/1998/REC-CSS2-19980512> CSS2 *)
type script = string
(** Script data can be the content of the ["script"] element and the
value of intrinsic event attributes. User agents must not evaluate
script data as HTML markup but instead must pass it on as data to a
script engine.
The case-sensitivity of script data depends on the scripting
language.
Please note that script data that is element content may not
contain character references, but script data that is the value of
an attribute may contain them. *)
type text = string
(** Arbitrary textual data, likely meant to be human-readable. *)
type uri (* I abstract this for Ocsigen -- VB *)
val uri_of_string : string -> uri
val string_of_uri : uri -> string
(** A Uniform Resource Identifier, as per RFC2396.
@see <http://www.ietf.org/rfc/rfc2396.txt> RFC2396 *)
type uris = uri
(** A space-separated list of Uniform Resource Identifiers, as per RFC2396.
@see <http://www.ietf.org/rfc/rfc2396.txt> RFC2396 *)
(** {1 Common Attributes} *)
type +'a attrib
type +'a attribs
val to_xmlattribs : 'a attrib list -> XML.attrib list (* VB *)
(** ['a] is known as a {i phantom type}. The implementation is
actually monomorphic (the different element types are distinguished
by a homogeneous variable, such as their textual representation)
and the type variable [`a] is just used by the type checker.
NB: It might be possible to use polymorphic variants directly, without
phantom types, but the implementation is likely to be more involved. *)
(** {2 Core} *)
type core = [ `Class | `Id | `Title ]
val a_class : nmtokens -> [>`Class] attrib
(** This attribute assigns a class name or set of class names to an
element. Any number of elements may be assigned the same class
name or names. *)
val a_id : id -> [>`Id] attrib
(** This attribute assigns a name to an element. This name must be
unique in a document. *)
val a_title : cdata -> [>`Title] attrib
(** This attribute offers advisory information about the element for
which it is set. *)
(** Values of the title attribute may be rendered by user agents in a
variety of ways. For instance, visual browsers frequently display
the title as a {i tool tip} (a short message that appears when the
pointing device pauses over an object). Audio user agents may
speak the title information in a similar context. *)
(** The title attribute has an additional role when used with the [link]
element to designate an external style sheet. Please consult the
section on links and style sheets for details. *)
(** {2 I18N} *)
type i18n = [ `XML_lang ]
val a_xml_lang : nmtoken -> [>`XML_lang] attrib
(** {2 Style}
The Style collection is deprecated, because the Style Attribute Module is
deprecated. *)
(** {2 Events} *)
(** Javascript events *)
type events = [ `OnClick | `OnDblClick | `OnMouseDown | `OnMouseUp |
`OnMouseOver | `OnMouseMove | `OnMouseOut | `OnKeyPress |
`OnKeyDown | `OnKeyUp ]
val a_onblur : cdata -> [>`OnBlur] attrib
val a_onclick : cdata -> [>`OnClick] attrib
val a_ondblclick : cdata -> [>`OnDblClick] attrib
val a_onchange : cdata -> [>`OnChange] attrib
val a_onfocus : cdata -> [>`OnFocus] attrib
val a_onload : cdata -> [>`OnLoad] attrib
val a_onunload : cdata -> [>`OnUnload] attrib
val a_onreset : cdata -> [>`OnReset] attrib
val a_onselect : cdata -> [>`OnSelect] attrib
val a_onsubmit : cdata -> [>`OnSubmit] attrib
val a_onmousedown : cdata -> [>`OnMouseDown] attrib
val a_onmouseup : cdata -> [>`OnMouseUp] attrib
val a_onmouseover : cdata -> [>`OnMouseOver] attrib
val a_onmousemove : cdata -> [>`OnMouseMove] attrib
val a_onmouseout : cdata -> [>`OnMouseOut] attrib
val a_onkeypress : cdata -> [>`OnKeyPress] attrib
val a_onkeydown : cdata -> [>`OnKeyDown] attrib
val a_onkeyup : cdata -> [>`OnKeyUp] attrib
type common = [ core | i18n | events | `Style_Attr]
(** {1 Modules, Element Sets and Attributes } *)
(** {2 5.2. Core Modules} *)
(** {3 5.2.1. Structure Module} *)
module STRUCTURE :
sig
type t = [ `Body | `Head | `Html | `Title ]
end
val a_profile : uri -> [>`Profile] attrib
val a_version : cdata -> [>`Version] attrib
val a_xmlns : [< `W3_org_1999_xhtml ] -> [>`XMLns] attrib
(** {3 5.2.2. Text Module} *)
module TEXT :
sig
type heading = [ `H1 | `H2 | `H3 | `H4 | `H5 | `H6 ]
type block = [ `Address | `Blockquote | `Div | `P | `Pre ]
type inline =
[ `Abbr | `Acronym | `Br | `Cite | `Code | `Dfn
| `Em | `Kbd | `Q | `Samp | `Span | `Strong | `Var ]
type flow = [ heading | block | inline ]
end
val a_cite : uri -> [>`Cite] attrib
val a_xml_space : [< `Preserve ] -> [>`XML_space] attrib
(** {3 5.2.3. Hypertext Module} *)
module HYPERTEXT :
sig
type inline = [ `A ]
type flow = inline
end
val a_accesskey : character -> [>`Accesskey] attrib
(** This attribute assigns an access key to an element. An access key
is a single character from the document character
set. NB: authors should consider the input method of the
expected reader when specifying an accesskey. *)
val a_charset : charset -> [>`Charset] attrib
(** This attribute specifies the character encoding of the resource
designated by the link. Please consult the section on character
encodings for more details. *)
val a_accept_charset : charset -> [>`Accept_charset] attrib
val a_accept : contenttype -> [>`Accept] attrib
val a_href : uri -> [>`Href] attrib
(** This attribute specifies the location of a Web resource, thus
defining a link between the current element (the source anchor)
and the destination anchor defined by this attribute. *)
val a_hreflang : languagecode -> [>`Hreflang] attrib
(** This attribute specifies the base language of the resource
designated by href and may only be used when href is specified. *)
val a_rel : linktypes -> [>`Rel] attrib
(** This attribute describes the relationship from the current document
to the anchor specified by the href attribute. The value of this attribute
is a space-separated list of link types. *)
val a_rev : linktypes -> [>`Rev] attrib
(** This attribute is used to describe a reverse link from the anchor specified
by the href attribute to the current document. The value of this attribute
is a space-separated list of link types. *)
val a_tabindex : number -> [>`Tabindex] attrib
(** This attribute specifies the position of the current element in
the tabbing order for the current document. This value must be a
number between 0 and 32767. User agents should ignore leading
zeros. *)
val a_type : contenttype -> [>`Type] attrib
(** This attribute gives an advisory hint as to the content type of
the content available at the link target address. It allows user
agents to opt to use a fallback mechanism rather than fetch the
content if they are advised that they will get content in a
content type they do not support.Authors who use this attribute
take responsibility to manage the risk that it may become
inconsistent with the content available at the link target
address. *)
(** {3 5.2.3. List Module} *)
module LIST :
sig
type list = [ `Dl | `Ol | `Ul ]
type t = [ `Dd | `Dt | `Li ]
type flow = list
end
(** {2 5.3. Applet Module}
This module is deprecated. Similar functionality
can be found in the Object Module. *)
(** {2 5.4. Text Extension Modules} *)
(** {3 5.4.1. Presentation Module} *)
module PRESENTATION :
sig
type block = [ `Hr ]
type inline = [ `B | `Big | `I | `Small | `Sub | `Sup | `Tt ]
type flow = [ inline | block ]
end
(** {3 5.4.2. Edit Module} *)
(* VB *)
val a_datetime : cdata -> [>`Datetime] attrib
(* VB *)
(** {3 5.4.3. Bi-directional Text Module} *)
(* VB *)
val a_dir : [< `Ltr | `Rtl ] -> [>`Dir] attrib
(* VB *)
(** {2 5.5. Forms Modules} *)
(** {3 5.5.1. Basic Forms Module} *)
module FORMS :
sig
type t = [ `Option ]
type form = [ `Form ]
type formctrl_sans_label = [ `Input | `Select | `Textarea | `Button ]
type formctrl = [ formctrl_sans_label | `Label ]
type block = form
type inline_sans_label = formctrl_sans_label
type inline = formctrl
type flow_sans_label = [block | inline_sans_label ]
type flow = [ block | inline ]
end
val a_action : uri -> [>`Action] attrib
(** This attribute specifies a form processing agent. User agent
behavior for a value other than an HTTP URI is undefined. *)
val a_checked : [< `Checked ] -> [>`Checked] attrib
(** When the [type] attribute has the value ["radio"] or ["checkbox"],
this boolean attribute specifies that the button is on. User
agents must ignore this attribute for other control types. *)
val a_cols : number -> [>`Cols] attrib
(** This attribute specifies the visible width in average character
widths. Users should be able to enter longer lines than this, so
user agents should provide some means to scroll through the
contents of the control when the contents extend beyond the
visible area. User agents may wrap visible text lines to keep long
lines visible without the need for scrolling. *)
val a_enctype : contenttype -> [>`Enctype] attrib
val a_for : idref -> [>`For] attrib
val a_maxlength : number -> [>`Maxlength] attrib
val a_method : [< `Get | `Post ] -> [>`Method] attrib
val a_multiple : [< `Multiple ] -> [>`Multiple] attrib
val a_name : cdata -> [>`Name] attrib
(** This attribute assigns the control name. *)
val a_rows : number -> [>`Rows] attrib
(** This attribute specifies the number of visible text lines. Users
should be able to enter more lines than this, so user agents
should provide some means to scroll through the contents of the
control when the contents extend beyond the visible area. *)
val a_selected : [< `Selected ] -> [>`Selected] attrib
(** When set, this boolean attribute specifies that this option is pre-selected. *)
val a_size : number -> [>`Size] attrib
val a_src : uri -> [>`Src] attrib
val a_input_type :
[< `Text | `Password | `Checkbox | `Radio | `Submit | `Reset | `Hidden | `File | `Image | `Button ] ->
[>`Input_Type] attrib
val a_value : cdata -> [>`Value] attrib
(** This attribute specifies the initial value of the control. If this
attribute is not set, the initial value is set to the contents of
the [option] element. *)
val a_value_type : [< `Data | `Ref | `Object ] -> [>`Value_Type] attrib
(** {3 5.5.2. Forms Module} *)
val a_disabled : [< `Disabled ] -> [>`Disabled] attrib
val a_readonly : [< `Readonly ] -> [>`Readonly] attrib
val a_button_type : [< `Button | `Submit | `Reset ] ->
[>`Button_Type] attrib
val a_label : text -> [> `Label ] attrib
(** {2 5.6. Table Modules} *)
(** {3 5.6.1. Basic Tables Module} *)
module TABLES :
sig
type t = [ `Caption | `Td | `Th | `Tr ]
type block = [ `Table ]
type flow = block
end
val a_abbr : text -> [>`Abbr] attrib
val a_align : [< `Left | `Center | `Right | `Justify | `Char ] ->
[>`Align] attrib
val a_axis : cdata -> [>`Axis] attrib
val a_colspan : number -> [>`Colspan] attrib
val a_headers : idrefs -> [>`Headers] attrib
val a_rowspan : number -> [>`Rowspan] attrib
val a_scope : [< `Row | `Col | `Rowgroup | `Colgroup ] -> [>`Scope] attrib
val a_summary : text -> [>`Summary] attrib
val a_valign : [< `Top | `Middle | `Bottom | `Baseline ] ->
[>`Valign] attrib
(** {3 5.6.2. Tables Module} *)
val a_border : pixels -> [>`Border] attrib
val a_cellpadding : length -> [>`Cellpadding] attrib
val a_cellspacing : length -> [>`Cellspacing] attrib
val a_datapagesize : cdata -> [>`Datapagesize] attrib
val a_frame :
[< `Void | `Above | `Below | `Hsides | `LHS | `RHS
| `Vsides | `Box | `Border ] -> [>`Frame] attrib
val a_rules : [< `None | `Groups | `Rows | `Cols | `All ] -> [>`Rules] attrib
val a_char : character -> [>`Char] attrib
val a_charoff : length -> [>`Charoff] attrib
val a_span : number -> [>`Span] attrib
val a_alt : text -> [>`Alt] attrib
val a_height : length -> [>`Height] attrib
val a_longdesc : uri -> [>`Longdesc] attrib
val a_width : length -> [>`Width] attrib
(** {2 5.8. Client-side Image Map Module} *)
type shape = [ `Rect | `Circle | `Poly | `Default ]
val a_shape : shape -> [>`Shape] attrib
val a_coords : int list -> [>`Coords] attrib
val a_nohref : [< `Nohref ] -> [>`Nohref] attrib
val a_usemap : idref -> [>`Usemap] attrib
(** {2 5.9. Server-side Image Map Module} *)
val a_ismap : [< `Ismap ] -> [>`Ismap] attrib
(** {2 5.10. Object Module} *)
(* VB *)
val a_declare : [< `Declare ] -> [> `Declare ] attrib
val a_classid : uri -> [> `Classid ] attrib
val a_codebase : uri -> [> `Codebase ] attrib
val a_data : uri -> [> `Data ] attrib
val a_codetype : contenttype -> [>`Codetype] attrib
val a_archive : uris -> [>`Archive] attrib
val a_standby : text -> [>`Standby] attrib
(* VB *)
(** {2 5.11. Frames Module} *)
val a_fs_rows : multilengths -> [>`FS_Rows] attrib
val a_fs_cols : multilengths -> [>`FS_Cols] attrib
val a_frameborder : [< `Zero | `One ] -> [>`Frameborder] attrib
val a_marginheight : pixels -> [>`Marginheight] attrib
val a_marginwidth : pixels -> [>`Marginwidth] attrib
val a_noresize : [< `Noresize ] -> [>`Noresize] attrib
val a_scrolling : [< `Yes | `No | `Auto ] -> [>`Scrolling] attrib
(** {2 5.12. Target Module} *)
val a_target : frametarget -> [>`Target] attrib
(** {2 5.14. Intrinsic Events Module} *)
(** {2 5.15. Metainformation Module} *)
module METAINFORMATION :
sig
type t = [ `Meta ]
end
val a_content : cdata -> [>`Content] attrib
val a_http_equiv : nmtoken -> [>`Http_equiv] attrib
val a_scheme : cdata -> [>`Scheme] attrib
(** {2 5.16. Scripting Module} *)
(* VB *)
val a_defer : [< `Defer ] -> [>`Defer] attrib
(* VB *)
(** {2 5.17. Style Sheet Module} *)
module STYLE_SHEET :
sig
type t = [ `Style ]
end
val a_media : mediadesc -> [>`Media] attrib
(** {2 5.18. Style Attribute Module} *)
val a_style : string -> [>`Style_Attr] attrib
(** {2 5.19. Link Module} *)
module LINK :
sig
type t = [ `Link ]
end
(** {2 5.20. Base Module} *)
module BASE :
sig
type t = [ `Base ]
end
(** {2 5.21. Name Identification Module}
This module is deprecated in XHTML 1.1, but supported for XHTML 1.0
using [`Name_01_00] . *)
(** {2 5.22. Legacy Module} *)
(** *)
(* VB *)
type edit = [ `Ins | `Del ]
type scripttag = [ `Script | `Noscript ]
type misc = [ edit | scripttag ]
module SPECIAL : sig
type inline = [ `Img | `Map | `Object ]
type block = [ `Table | `Form | `Fieldset ]
type flow = [ inline | block ]
end
type i18nclass = [ `Bdo ]
(* VB *)
(* CH *)
module RUBY : sig
type inline = [ `Ruby_simple1 | `Ruby_simple2 | `Ruby_complex ]
type flow = inline
end
type no_ruby_inline = [ TEXT.inline | PRESENTATION.inline | HYPERTEXT.inline | SPECIAL.inline | FORMS.inline | i18nclass ]
type no_ruby_content = [ `PCDATA | no_ruby_inline | misc ]
(* CH *)
(** {1 Combined Element Sets:} *)
type block =
[ TEXT.block | PRESENTATION.block | FORMS.block | TABLES.block | SPECIAL.block | TEXT.heading | LIST.list | misc ]
type block_sans_form =
[ TEXT.block | PRESENTATION.block | TABLES.block | TEXT.heading | LIST.list | misc ]
type flow =
[ TEXT.flow | HYPERTEXT.flow | LIST.flow | FORMS.flow | TABLES.flow | PRESENTATION.flow | SPECIAL.flow | i18nclass | misc | RUBY.flow ]
type flow_sans_table =
[ TEXT.flow | HYPERTEXT.flow | LIST.flow | FORMS.flow | PRESENTATION.flow | SPECIAL.flow | i18nclass | misc | RUBY.flow ]
type inline =
[ TEXT.inline | HYPERTEXT.inline | PRESENTATION.inline
| FORMS.inline | SPECIAL.inline | i18nclass | misc | RUBY.inline ]
type inline_sans_a_mix =
[ TEXT.inline | PRESENTATION.inline
| FORMS.inline | SPECIAL.inline | i18nclass | misc | RUBY.inline ]
type buttoncontent = (* VB *)
[ TEXT.inline | PRESENTATION.inline
| SPECIAL.inline | i18nclass | block_sans_form ]
type precontent = (* VB *)
[ TEXT.inline | HYPERTEXT.inline | `Tt | `I | `B | `Script | `Map |
i18nclass ]
type inline_sans_label =
[ TEXT.inline | HYPERTEXT.inline | PRESENTATION.inline
| FORMS.inline_sans_label | SPECIAL.inline | i18nclass | misc ]
type heading = TEXT.heading
(** {1 Elements} *)
(* For Ocsigen I need to specify the variance --Vincent *)
type +'a elt
(** {2 Element Constructor Types} *)
type ('a, 'b) nullary = ?a:('a attrib list) -> unit -> 'b elt
type ('a, 'b, 'c) unary = ?a:('a attrib list) -> 'b elt -> 'c elt
type ('a, 'b, 'c, 'd) binary = ?a:('a attrib list) -> 'b elt -> 'c elt -> 'd elt
(* CH *)
type ('a, 'b, 'c, 'd, 'e, 'f) quadry= ?a:('a attrib list) -> 'b elt -> 'c elt -> 'd elt -> 'e elt -> 'f elt
(* CH *)
type ('a, 'b, 'c) star = ?a:('a attrib list) -> 'b elt list -> 'c elt
(** Star '*' denotes any number of children, uncluding zero. *)
type ('a, 'b, 'c) plus = ?a:('a attrib list) -> 'b elt -> 'b elt list -> 'c elt
(** Plus '+' requires at least one child. *)
(** {2 Structure} *)
type html = [`Html] elt
val html : ?a:([< i18n | `Version | `XMLns ] attrib list) ->
[< `Head ] elt -> [< `Body | `Frameset ] elt -> html
val head : ?a:([< i18n | `Profile ] attrib list) ->
[< `Base | `Title ] elt ->
[< `Meta | `Link | `Style | `Object | `Script ] elt list
-> [>`Head] elt
val title : ([< i18n ], [< `PCDATA ], [>`Title]) unary
val body : ([< common |`OnLoad |`OnUnload ], [< block ], [>`Body]) star
(** {2 Data} *)
val pcdata : string -> [>`PCDATA] elt
val entity : string -> [>`PCDATA] elt
val space : unit -> [>`PCDATA] elt
val cdata : string -> [>`PCDATA] elt (* GK *)
val cdata_script : string -> [>`PCDATA] elt (* GK *)
val cdata_style : string -> [>`PCDATA] elt (* GK *)
(**/**)
val unsafe_data : string -> 'a elt
(**/**)
(** {2 Text} *)
val h1 : ([< common ], [< `PCDATA | inline ], [>`H1]) star
val h2 : ([< common ], [< `PCDATA | inline ], [>`H2]) star
val h3 : ([< common ], [< `PCDATA | inline ], [>`H3]) star
val h4 : ([< common ], [< `PCDATA | inline ], [>`H4]) star
val h5 : ([< common ], [< `PCDATA | inline ], [>`H5]) star
val h6 : ([< common ], [< `PCDATA | inline ], [>`H6]) star
val address : ([< common ], [< `PCDATA | inline ], [>`Address]) star
val blockquote : ([< common | `Cite ],
[< `PCDATA | block ], [>`Blockquote]) star
val div : ([< common ], [< `PCDATA | flow ], [>`Div]) star
val p : ([< common ], [< `PCDATA | inline ], [>`P]) star
val pre : ([< common | `XML_space ],
[< `PCDATA | precontent ], [>`Pre]) star
val abbr : ([< common ], [< `PCDATA | inline ], [>`Abbr]) star
val acronym : ([< common ], [< `PCDATA | inline ], [>`Acronym]) star
val br : ([< core ], [>`Br]) nullary
val cite : ([< common ], [< `PCDATA | inline ], [>`Cite]) star
val code : ([< common ], [< `PCDATA | inline ], [>`Code]) star
val dfn : ([< common ], [< `PCDATA | inline ], [>`Dfn]) star
val em : ([< common ], [< `PCDATA | inline ], [>`Em]) star
val kbd : ([< common ], [< `PCDATA | inline ], [>`Kbd]) star
val q : ([< common | `Cite ], [< `PCDATA | inline ], [>`Q]) star
val samp : ([< common ], [< `PCDATA | inline ], [>`Samp]) star
val span : ([< common ], [< `PCDATA | inline ], [>`Span]) star
val strong : ([< common ], [< `PCDATA | inline ], [>`Strong]) star
val var : ([< common ], [< `PCDATA | inline ], [>`Var]) star
(** {2 Hypertext} *)
val a : ([< common | `Accesskey | `Charset | `Href | `Hreflang
| `Name_01_00 | `Rel | `Rev | `Tabindex | `Target | `Type
| `Shape | `Coords | `OnBlur |`OnFocus],
[< `PCDATA | inline_sans_a_mix ], [>`A]) star
(** {2 List} *)
val dl : ([< common ], [< `Dt | `Dd ], [>`Dl]) plus
val ol : ([< common ], [< `Li ], [>`Ol]) plus
val ul : ([< common ], [< `Li ], [>`Ul]) plus
val dd : ([< common ], [< `PCDATA | flow ], [>`Dd]) star
val dt : ([< common ], [< `PCDATA | inline ], [>`Dt]) star
val li : ([< common ], [< `PCDATA | flow ], [>`Li]) star
(** {2 Presentation} *)
val hr : ([< common ], [>`Hr]) nullary
val b : ([< common ], [< `PCDATA | inline ], [>`B]) star
val big : ([< common ], [< `PCDATA | inline ], [>`Big]) star
val i : ([< common ], [< `PCDATA | inline ], [>`I]) star
val small : ([< common ], [< `PCDATA | inline ], [>`Small]) star
val sub : ([< common ], [< `PCDATA | inline ], [>`Sub]) star
val sup : ([< common ], [< `PCDATA | inline ], [>`Sup]) star
val tt : ([< common ], [< `PCDATA | inline ], [>`Tt]) star
(* CH *)
val bdo : dir:[< `Ltr | `Rtl ] -> ([< core | `XML_lang ],[< `PCDATA | inline ],[> `Bdo ]) star
(* CH *)
val area : alt:text -> ([< common | `Href | `Shape | `Coords | `Nohref | `Tabindex | `Accesskey |`OnBlur |`OnFocus],[>`Area]) nullary
val map : id:id -> ([< events | core | `XMLns | `Class | `Title | i18n ],[< block | `Area ],[>`Map]) plus
val del : ([< common | `Cite | `Datetime ],[< `PCDATA | flow ],[>`Del]) star
val ins : ([< common | `Cite | `Datetime ],[< `PCDATA | flow ],[>`Ins]) star
val script : contenttype:contenttype -> ([< `XMLns | `Id | `Charset | `Src | `Defer | `XML_space ],[< `PCDATA ],[>`Script]) unary
val noscript : ([< common ],[< block ],[>`Noscript]) plus
(* VB *)
(** {2 Forms} *)
(** {3 Basic Forms} *)
(** One can use [open Basic_Forms] to enable basic forms. *)
module Basic_Forms :
sig
val form : action:uri ->
([< common | `Enctype | `Method | `Name_01_00 | `Target |`OnReset | `OnSubmit],
[< block_sans_form ], [>`Form]) plus
val input : ([< common | `Accesskey | `Checked | `Maxlength | `Name | `Size
| `Src | `Tabindex | `Input_Type | `Value | `Usemap|`OnBlur |`OnChange |`OnFocus | `OnSelect], [>`Input]) nullary
val label : ([< common | `Accesskey | `For ],
[< `PCDATA | inline_sans_label ], [>`Label]) star
val option : ([< common | `Selected | `Value ],
[< `PCDATA ], [>`Option]) unary
val select : ([< common | `Multiple | `Name | `Size | `Tabindex |`OnBlur |`OnChange |`OnFocus ],
[< `Option ], [>`Select]) plus
val textarea : rows:number -> cols:number ->
([< common | `Accesskey | `Name | `Tabindex |`OnBlur |`OnChange |`OnFocus | `OnSelect],
[< `PCDATA ], [>`Textarea]) unary
end
(** {3 Forms} *)
(** Generic forms. WARNING: If you find a bug or if something is missing please send a bug report to the Ocsigen project! -- VB *)
val form : action:uri ->
([< common | `Enctype | `Method | `Name_01_00 | `Target | `Accept_charset | `Accept |`OnReset | `OnSubmit],
[< block_sans_form | `Fieldset ], [>`Form]) plus
val input : ([< common | `Accesskey | `Checked | `Maxlength | `Name | `Size
| `Src | `Tabindex | `Input_Type | `Value | `Disabled | `Readonly | `Alt | `Accept | `Usemap |`Ismap |`OnBlur |`OnChange |`OnFocus | `OnSelect], [>`Input]) nullary
val label : ([< common | `Accesskey | `For |`OnBlur |`OnFocus],
[< `PCDATA | inline_sans_label ], [>`Label]) star
val optgroup : label:text ->
([< common | `Disabled ],
[< `Option ], [>`Optgroup]) plus
val option : ([< common | `Selected | `Value | `Disabled | `Label ],
[< `PCDATA ], [>`Option]) unary
val select : ([< common | `Multiple | `Name | `Size | `Tabindex | `Disabled |`OnBlur |`OnChange |`OnFocus ],
[< `Option | `Optgroup ], [>`Select]) plus
val textarea : rows:number -> cols:number ->
([< common | `Accesskey | `Name | `Tabindex | `Disabled | `Readonly |`OnBlur |`OnChange |`OnFocus | `OnSelect],
[< `PCDATA ], [>`Textarea]) unary
val fieldset : ([< common ],
[< `PCDATA | `Legend | flow ], [>`Fieldset]) star
val legend : ([< common | `Accesskey ],
[< `PCDATA | inline ], [>`Legend]) star
val button : ([< common | `Name | `Value | `Button_Type | `Disabled | `Accesskey | `Tabindex |`OnBlur |`OnFocus],
[< `PCDATA | buttoncontent ], [>`Button]) star
(** {2 Tables} *)
(** {3 Basic Tables} *)
(** One can use [open Basic_Tables] to switch globally to basic tables. *)
module Basic_Tables :
sig
val a_align : [< `Left | `Center | `Right ] -> [>`Align] attrib
val a_scope : [< `Row | `Col ] -> [>`Scope] attrib
val a_valign : [< `Top | `Middle | `Bottom ] -> [>`Valign] attrib
val caption : ([< common ], [< `PCDATA | inline ], [>`Caption]) star
val table : ?caption:([< `Caption ] elt) ->
([< common | `Summary | `Width ], [< `Tr ], [>`Table]) plus
val td : ([< common | `Abbr | `Align | `Axis | `Colspan | `Headers | `Rowspan
| `Scope | `Valign ], [< `PCDATA | flow_sans_table ], [>`Td]) star
val th : ([< common | `Abbr | `Align | `Axis | `Colspan | `Headers | `Rowspan
| `Scope | `Valign ], [< `PCDATA | flow_sans_table ], [>`Th]) star
val tr : ([< common | `Align | `Valign ], [< `Td | `Th ], [>`Tr]) plus
end
(** {3 Tables} *)
val caption : ([< common ], [< `PCDATA | inline ], [>`Caption]) star
val table : ?caption:([< `Caption ] elt) ->
?columns:([< `Cols of ([< `Col ] elt list)
| `Colgroups of ([< `Colgroup ] elt list) ]) ->
([< common | `Border | `Cellpadding | `Cellspacing | `Datapagesize
| `Frame | `Rules | `Summary | `Width ], [< `Tr ], [>`Table]) plus
val tablex : ?caption:([< `Caption ] elt) ->
?columns:([< `Cols of ([< `Col ] elt list)
| `Colgroups of ([< `Colgroup ] elt list) ]) ->
?thead:([< `Thead ] elt) -> ?tfoot:([< `Tfoot ] elt) ->
([< common | `Border | `Cellpadding | `Cellspacing | `Datapagesize
| `Frame | `Rules | `Summary | `Width ], [< `Tbody ], [>`Table]) plus
val td : ([< common | `Abbr | `Align | `Axis | `Char | `Charoff
| `Colspan | `Headers | `Rowspan | `Scope | `Valign ],
[< `PCDATA | flow ], [>`Td]) star
val th : ([< common | `Abbr | `Align | `Axis | `Char | `Charoff
| `Colspan | `Headers | `Rowspan | `Scope | `Valign ],
[< `PCDATA | flow ], [>`Th]) star
val tr : ([< common | `Align | `Char | `Charoff | `Valign ],
[< `Td | `Th ], [>`Tr]) plus
val col : ([< common | `Align | `Char | `Charoff
| `Span | `Valign | `Width ], [>`Col]) nullary
val colgroup : ([< common | `Align | `Char | `Charoff
| `Span | `Valign | `Width ], [< `Col ], [>`Colgroup]) star
val thead : ([< common | `Align | `Char | `Charoff | `Valign ],
[< `Tr ], [>`Thead]) plus
val tbody : ([< common | `Align | `Char | `Charoff | `Valign ],
[< `Tr ], [>`Tbody]) plus
val tfoot : ([< common | `Align | `Char | `Charoff | `Valign ],
[< `Tr ], [>`Tfoot]) plus
(** {2 Image} *)
val img : src:uri -> alt:text ->
([< common | `Height | `Longdesc | `Name_01_00 | `Width | `Usemap |`Ismap ], [>`Img]) nullary
(** {2 Object} VB *)
val object_ : ([< common | `Declare | `Classid | `Codebase | `Data | `Type | `Codetype | `Archive | `Standby
| `Height | `Width | `Name | `Tabindex | `Usemap],[< `PCDATA | flow | `Param ],[> `Object ]) star
val param : name:text ->([< `XMLns |`Id | `Value | `Value_Type | `Type ], [> `Param ]) nullary
(** {2 Frames} *)
val frameset : ?noframes:([< `Noframes ] elt) ->
([< core | `FS_Rows | `FS_Cols |`OnLoad |`OnUnload], [< `Frameset | `Frame ], [>`Frameset]) plus
val frame : src:uri ->
([< core | `Frameborder | `Longdesc | `Marginheight | `Marginwidth
| `Name_01_00 | `Noresize | `Scrolling ], [>`Frame]) nullary
val noframes : ([< common ], [< `Body ], [>`Noframes]) unary
(** {2 Meta} *)
val meta : content:cdata ->
([< i18n | `Http_equiv | `Name | `Scheme ], [>`Meta]) nullary
(** {2 Style Sheets} *)
val style : contenttype:contenttype ->
([< i18n |`XMLns |`Id | `Media | `Title | `XML_space ], [< `PCDATA ], [>`Style]) star
(** {2 Link} *)
val link : ([< common | `Charset | `Href | `Hreflang | `Media
| `Rel | `Rev | `Target | `Type ], [>`Link]) nullary
(** {2 Base} *)
val base : href:uri -> unit -> [>`Base] elt
(*val base : href:uri -> ([`XMLns], [>`Base] elt)*)
(** {2 Ruby} *)
val ruby_simple1 : ?a:([< common] attrib list) ->
[< `Rb ] elt -> [< `Rt ] elt -> [>`Ruby_simple1] elt
val ruby_simple2 : ?a:([< common] attrib list) ->
[< `Rb ] elt -> [< `Rp ] elt -> [< `Rt ] elt -> [< `Rp ] elt -> [>`Ruby_simple2] elt
val ruby_complex : ?a:([< common] attrib list) ->
[< `Rbc ] elt -> [< `Rtc_complex ] elt -> [>`Ruby_complex] elt
val rbc : ([< common ], [< `Rb ], [>`Rbc]) plus
val rtc : ([< common ], [< `Rt ], [>`Rtc]) plus
val rtc_complex : ([< common ], [< `Rt_complex ], [>`Rtc]) plus
val rb : ([< common ], [< no_ruby_content ], [>`Rb]) star
val rt : ([< common ], [< no_ruby_content ], [>`Rt]) star
val rt_complex : ([< common | `Rbspan], [< no_ruby_content ], [>`Rt]) star
val rp : ([< common ], [< `PCDATA ], [>`Rp]) star
val a_rbspan : number -> [>`Rbspan] attrib
(** {1 Output} *)
(** [?encode] maps strings to HTML and {e must} encode the unsafe characters
['<'], ['>'], ['"'], ['&'] and the control characters 0-8, 11-12, 14-31, 127
to HTML entities. [XML.encode_unsafe] is the default for [?encode] in [output]
and [pretty_print] below. Other implementations are provided by the module
[Netencoding] in the
{{:http://www.ocaml-programming.de/programming/ocamlnet.html}OcamlNet} library, e.g.:
[let encode = Netencoding.Html.encode ~in_enc:`Enc_iso88591 ~out_enc:`Enc_usascii ()],
Where national characters are replaced by HTML entities.
The user is of course free to write her own implementation.
@see <http://www.ocaml-programming.de/programming/ocamlnet.html> OcamlNet *)
(** [~encoding] is the official name of the external character set encoding that
is used by [outs : string -> unit]. *)
type doctypes =
[ `HTML_v03_02 | `HTML_v04_01 | `XHTML_01_00 | `XHTML_01_01
| `Doctype of string ]
val doctype : [< doctypes ] -> string
val output : ?encode:(string -> string) -> ?encoding:string ->
(string -> unit) -> html -> unit
val pretty_print : ?width:int ->
?encode:(string -> string) -> ?encoding:string ->
(string -> unit) -> html -> unit
(** {1 Tools} *)
val version : string
val standard : uri
val validator : uri
val validator_icon : unit -> [>`A] elt
(** A hyperlink to the W3C validator, including the logo.
@see <http://validator.w3.org> Validator *)
val addto_class : string -> 'a elt -> 'a elt
(** Add the element and all its subelements to a class. Note that this
is only almost typesafe, because a few elements from the structure class
do not support the class attribute. On the other hand, listing all
allowed elements would be too tedious right now. *)
val addto_class1 : string -> 'a elt -> 'a elt
(** Add the element to a class. *)
val set_rowspan : int -> ([< `Th | `Td ] as 'a) elt -> 'a elt
(** Set the rowspan attribute for the element. *)
val rewrite_hrefs : (string -> string) -> 'a elt -> 'a elt
(*
val amap : (string -> 'a attribs -> 'a attribs) -> 'b elt -> 'b elt
val amap1 : (string -> 'a attribs -> 'a attribs) -> 'b elt -> 'b elt
val rm_attrib : (string -> bool) -> 'a attribs -> 'a attribs
val rm_attrib_from_list :
(string -> bool) -> (string -> bool) -> 'a attribs -> 'a attribs
(** Exporting the following will drive a hole through the type system,
because they allow to add any attribute to any element. *)
val add_int_attrib : string -> int -> 'a attribs -> 'a attribs
val add_string_attrib : string -> string -> 'a attribs -> 'a attribs
val add_comma_sep_attrib : string -> string -> 'a attribs -> 'a attribs
val add_space_sep_attrib : string -> string -> 'a attribs -> 'a attribs
*)
val tot : XML.elt -> 'a elt
val totl : XML.elt list -> 'a elt list
val toelt : 'a elt -> XML.elt
val toeltl : 'a elt list -> XML.elt list
end
(** An alias for XHTML 1.1 (for symmetry):
@see <http://www.w3.org/TR/xhtml11/> XHTML 1.1 - Module-based XHTML *)
module type T_01_01 = T
(** XHTML 1.0 includes some deprecated features that since
have been removed from XHTML 1.1:
@see <http://www.w3.org/TR/xhtml11/changes.html#a_changes> Changes from XHTML 1.0 Strict
@see <http://www.w3.org/TR/2000/REC-xhtml1-20000126/> XHTML 1.0: The Extensible HyperText Markup Language *)
module type T_01_00 =
sig
include T
(** XHTML 1.1 has removed the name attribute from several elements: *)
val a_name_01_00 : cdata -> [>`Name_01_00] attrib
end
module M : T
module M_01_01 : T_01_01
module M_01_00 : T_01_00
|