This document is also available in this non-normative format: Changes since previous Working Draft.
Copyright © 2009-2010 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This specification defines rules and guidelines for adapting the RDFa Core 1.1 specification for use in HTML5 and XHTML5. The rules defined in this specification not only apply to HTML5 documents in non-XML and XML mode, but also to HTML4 and XHTML documents interpreted through the HTML5 parsing rules.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
There are a number of substantive differences between this version and its predecessor, including:
The latest stable version of the editor's draft of this specification is always available on the W3C CVS server.
This specification has been jointly developed by the RDFa Working Group and the HTML Working Group and is currently being published by the HTML Working Group to further discussions on HTML and RDFa integration.
This specification is an extension to the HTML5 language. All normative content in the HTML5 specification, unless specifically overridden by this specification, is intended to be the basis for this specification.
A sample test harness is available. This set of tests is not intended to be exhaustive. Users may find the tests to be useful examples of RDFa usage. A community-maintained Wiki page includes subsequent updates.
This document was published by the HTML Working Group as a Working Draft. This document is intended to become a W3C Recommendation. If you wish to make comments regarding this document, please send them to public-rdfa-wg@w3.org (subscribe, archives). All feedback is welcome.
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
Also available is a public list of any patent disclosures for the RDFa Working Group.
This section is non-normative.
Today's web is built predominantly for human consumption. Even as machine-readable data begins to permeate the web, it is typically distributed in a separate file, with a separate format, and very limited correspondence between the human and machine versions. As a result, web browsers can provide only minimal assistance to humans in parsing and processing web data: browsers only see presentation information. RDFa is intended to solve the problem of machine-readable data in HTML documents. RDFa provides a set of HTML attributes to augment visual data with machine-readable hints. Using RDFa, authors may turn their existing human-visible text and links into machine-readable data without repeating content.
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words must, must not, required, should, should not, recommended, may, and optional in this specification are to be interpreted as described in [RFC2119].
In order for a document to claim that it is a conforming HTML+RDFa document, it must provide the facilities described as mandatory in this section. The document conformance criteria are listed below, of which only a subset are mandatory:
version
attribute on the
html
element. The value of the version
attribute should be "HTML+RDFa 1.1" if the document is a non-XML mode
document, or "XHTML+RDFa 1.1" if the document is a XML mode
document.An example of a conforming HTML+RDFa document:
<html version="HTML+RDFa 1.1" lang="en"> <head> <title>Example Document</title> </head> <body> <p>Moved to <a href="http://example.org/">example.org</a>.</p> </body> </html>
Non-XML mode HTML+RDFa 1.1 documents should be labeled with the Internet Media Type "text/html" as defined in [RFC3236].
The RDFa Processor conformance criteria are listed below, all of which are mandatory:
A User Agent is considered to be a type of RDFa Processor when the User Agent stores or processes RDFa attributes and their values. The reason there are separate RDFa Processor Conformance and a User Agent Conformance sections is because one can be a valid HTML5 RDFa Processor but not a valid HTML5 User Agent (for example, by only providing a very small subset of rendering functionality).
The User Agent conformance criteria are listed below, all of which are mandatory:
The RDFa Core 1.1 [RDFA-CORE] specification is the base document on which this specification builds. RDFa Core 1.1 specifies the attributes and syntax, in Section 5: Attributes and Syntax, and processing model, in Section 7: Processing Model, for extracting RDF from a Web document. This section specifies changes to the attributes and processing model defined in RDFa Core 1.1 in order to support extracting RDF from HTML documents.
The requirements and rules, as specified in RDFa Core and further extended in this document, apply to all HTML5 documents. The RDFa Processor operating on HTML and XHTML documents, specifically the resulting DOMs or Infosets, must apply the same processing rules for HTML4, HTML5 and XHTML5 serializations, DOMs and/or Infosets.
Documents conforming to the rules in this specification are processed according to [RDFA-CORE] with the following extensions:
http://www.w3.org/1999/xhtml/vocab#
.base
element.head
or
body
element. If it is, then act as if there is an empty @about present,
and process it according to the rule for @about.head
or
body
element. If it is, then act as if there is an empty @about present,
and process it according to the rule for @about.RDFa's tree-based processing rules, outlined in Section 7.5: Sequence of the RDFa Core 1.1 specification [RDFA-CORE], allow an input document to be automatically corrected, cleaned-up, re-arranged, or modified in any way that is approved by the host language prior to processing. Element nesting issues in HTML documents should be corrected before the input document is translated into the DOM, a valid tree-based model, on which the RDFa processing rules will operate.
Any mechanism that generates a data structure equivalent to the HTML5 or XHTML5 DOM, such as the html5lib library, may be used as the mechanism to construct the tree-based model provided as input to the RDFa processing rules.
RDFa Core 1.1 allows for the current language to be specified by the Host Language. In order for RDFa Processors to conform to this specification, they must use the mechanism described in The lang and xml:lang attributes section of the [HTML5] specification to determine the language of a node.
If an author is editing an HTML fragment and is unsure of the final
encapsulating MIME type for their markup, it is suggested that the author
specify both lang
and xml:lang
where the value in
both attributes is exactly the same.
When generating literals of type XMLLiteral, the processor must ensure that the output XMLLiteral is a namespace well-formed XML fragment. A namespace well-formed XML fragment has the following properties:
xmlns
and xmlns:
stored in the
RDFa Processor's current
evaluation context
in the
list of URI mappings
must be preserved in the generated XMLLiteral. The PREFIX value for
xmlns:PREFIX
must be transformed to all lower-case characters
when preserving the value in the XMLLiteral. All active namespaces declared
via xmlns
and xmlns:
must be placed in each
top-level element in the generated XMLLiteral, taking care to not overwrite
pre-existing namespace values.An RDFa Processor that transforms the XML fragment must use the Coercing an HTML DOM into an Infoset algorithm, as specified in the HTML5 specification, followed by the algorithm defined in the Serializing XHTML Fragments section of the HTML5 specification. If an error or exception occurs at any point during the transformation, the triple containing the XMLLiteral must not be generated.
Transformation to a namespace well-formed XML fragment is required because an application that consumes XMLLiteral data expects that data to be a namespace well-formed XML fragment.
The transformation requirement does not apply to input data that are
text-only, such as literals that contain a datatype
attribute
with an empty value (""
), or input data that that contain only
text nodes.
An example transformation demonstrating the preservation of namespace values is provided below. The → symbol is used to denote that the line is a continuation of the previous line and is included purely for the purposes of readability:
<p xmlns:ex="http://example.org/vocab#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> Two rectangles (the example markup for them are stored in a triple): <svg xmlns="http://www.w3.org/2000/svg" property="ex:markup" datatype="rdf:XMLLiteral"> →<rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:1; stroke:rgb(0,0,0)"> →<rect width="50" height="50" style="fill:rgb(255,0,0);stroke-width:2;stroke:rgb(0,0,0)"></rect></rect></svg> </p>
The markup above should produce the following triple, which preserves the
xmlns declaration in the markup by injecting the xmlns
attribute
in the rect
elements:
<> <http://example.org/vocab#markup> "<rect xmlns=\"http://www.w3.org/2000/svg\" width=\"300\" →height=\"100\" style=\"fill:rgb(0,0,255);stroke-width:1; stroke:rgb(0,0,0)\"/> →<rect xmlns=\"http://www.w3.org/2000/svg\" width=\"50\" →height=\"50\" style=\"fill:rgb(255,0,0);stroke-width:2; →stroke:rgb(0,0,0)\"/>"^^http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral .
Since the ex
and rdf
namespaces are not used in either rect
element, they are not
preserved in the XMLLiteral.
Similarly, compound document elements that reside in different namespaces must have their namespaces declarations preserved:
<p xmlns:ex="http://example.org/vocab#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <span class="hilite">xmlns:fb="http://www.facebook.com/2008/fbml"</span> This is how you markup a user in FBML: <span property="ex:markup" datatype="rdf:XMLLiteral"> →<p><fb:user uid="12345">The User</fb:user></p> →</span> </p>
The markup above should produce the following triple, which preserves the
fb
namespace in the corresponding triple:
<>
<http://example.org/vocab#markup>
"<p xmlns:fb="http://www.facebook.com/2008/fbml">
→<fb:user uid="12345">
→</p>"^^http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral .
xmlns:
-Prefixed AttributesWhile this section outlines xmlns: processing in RDFa, the support for distributed extensibility in non-XML mode HTML5 (using xmlns and xmlns:) is still an open issue. This section may be further modified before Last Call based on progress made on the distributed extensibility issue.
CURIE prefix mappings specified using attributes prepended with
xmlns:
must be processed using the algorithm defined in
section 4.4.1:
Extracting URI Mappings from Infosets
for Infoset-based processors, or section 4.5.1:
Extracting URI Mappings from DOMs
for DOM Level 2-based processors. For CURIE prefix mappings using the
prefix
attribute,
Section 7.5: Sequence,
step #4 must be used to process namespace values.
Since CURIE prefix mappings have been specified using
xmlns:
, and since HTML attribute names are case-insensitive,
CURIE prefix names declared using the xmlns:
attribute-name
pattern xmlns:<PREFIX>="<URI>"
should be specified
using only lower-case characters. For example, the text
"xmlns:
" and the text in "<PREFIX>"
should
be lower-case only. This is to ensure that prefix mappings are interpreted
in the same way between HTML (case-insensitive attribute names) and XHTML
(case-sensitive attribute names) document types.
Status: ISSUE-41 (decentralized extensibility) blocks progress to Last Call
There are a few extensions to the HTML5 specification that are required in order to fully support RDFa. The following sub-sections outline the necessary extensions to the base HTML5 specification.
All RDFa attributes and valid values (including CURIEs), as listed in Section 2.1: The RDFa Attributes, are conforming when used in an HTML5 or XHTML5 document.
The @version
attribute is an optional attribute that is
allowed on the html
element. It specifies the HTML5 language
features that are enabled for the current document. The value must contain at
least one non-space character. The value must conform to a
set of space-separated tokens, as defined in
[HTML5], Space-separated tokens.
xmlns:
-Prefixed AttributesWhile this section outlines xmlns: conformance criteria for HTML+RDFa, the support for distributed extensibility in non-XML mode HTML5 (using xmlns and xmlns:) is still an open issue. This section may be further modified before Last Call based on progress made on the distributed extensibility issue.
Since RDFa uses attributes starting with xmlns:
to specify
CURIE prefixes, any attribute starting with a case-insensitive match on the
text string "xmlns:
" must be preserved in the DOM or other
tree-like model that is passed to the RDFa Processor.
For documents conforming to this specification, attributes with
names that have a case insensitive prefix matching "xmlns:
"
must be considered conforming. Conformance checkers must
accept attribute names that have a case insensitive prefix matching
"xmlns:
" as conforming.
All attributes starting with a case insensitive prefix matching
"xmlns:
" must conform to the production rules outlined in
Namespaces in XML [XML-NAMES11],
Section 3: Declaring Namespaces.
Documents that contain xmlns:
attributes that do not conform to
Namespaces in XML must not be accepted as conforming.
This section needs feedback from the user agent vendors to ensure that this feature does not conflict with user agent architecture and has no technical reason that it cannot be implemented.
RDFa is uses the xmlns:
pattern to
declare prefix mappings, it is important that namespace information that
is declared in non-XML mode HTML5 documents are mapped to an Infoset
correctly. In order to ensure this mapping is performed correctly, the
"Coercing an HTML DOM into an infoset" rules defined in [HTML5]
must be extended to include the following rule:
If the XML API is namespace-aware, the tool must ensure that
([namespace
name], [local name],
[normalized
value]) namespace tuples are created when converting the non-XML mode
DOM into an Infoset. Given a standard xmlns:
definition,
xmlns:foo="http://example.org/bar#"
, the [namespace name]
is http://www.w3.org/2000/xmlns/
,
the [local name] is foo
, and the
[normalized value] is http://example.org/bar#
, thus the
namespace tuple would be (http://www.w3.org/2000/xmlns/
,
foo
, http://example.org/bar#
).
For example, given the following input text:
<div xmlns:audio="http://purl.org/media/audio#">
The div
element above, when coerced from an HTML DOM into
an Infoset, should contain an attribute in the [namespace
attributes] list with a [namespace name] set to
"http://www.w3.org/2000/xmlns/
", a [local name] set to
audio
, and a [normalized value] of
"http://purl.org/media/audio#
".
While the intent of the RDFa processing instructions were to provide a set of rules that are as language and toolchain agnostic as possible, for the sake of clarity, detailed methods of extracting RDFa content from processors operating on an XML Information Set are provided below.
Extracting URI Mappings declared via xmlns:
while operating from within an Infoset-based RDFa processor can be achieved
using the following algorithm:
While processing an element as described in [RDFA-CORE], Section 7.5: Sequence, Step #2:
xmlns:
, create a [URI mapping] by
storing the [local name] part with the xmlns:
characters
removed as the value to be mapped, and the [normalized
value] as the value to map.
This step is unnecessary if the Infoset coercion rules preserve namespaces specified in non-XML mode.
For example, assume that the following markup is processed by an Infoset-based RDFa processor:
<div xmlns:audio="http://purl.org/media/audio#" ...
After the markup is processed, there should exist a [URI mapping] in
the [local list of URI mappings] that contains a mapping from
audio
to http://purl.org/media/audio#
.
There are a number of non-prefixed attributes that are associated with RDFa Processing in HTML5. If an XML Information Set based RDFa processor is used to process these attributes, the following algorithm should be used to detect and extract the values of the attributes.
While processing Infoset Attribute Information Items in Element Information Items as described in [RDFA-CORE], Section 7.5: Sequence, Step #4 through Step #9:
This mechanism should be double-checked against all of the RDFa Javascript implementations to ensure correctness.
While the intent of the RDFa processing instructions were to provide a set of rules that are as language and toolchain agnostic as possible, for the sake of clarity, detailed methods of extracting RDFa content from processors operating in a DOM2 environment are provided below.
Extracting URI Mappings declared via xmlns:
while operating
from within a DOM Level 2 based RDFa processor can be achieved using the
following algorithm:
While processing each DOM2 [Element] as described in [RDFA-CORE], Section 7.5: Sequence, Step #2:
xmlns
, create a [URI mapping] by
storing the [local
name] as the value to be mapped, and the [Node.nodeValue]
as the value to map.xmlns:
, create a [URI mapping] by
storing the [local name] part with the xmlns:
characters
removed as the value to be mapped, and the [Node.nodeValue]
as the value to map.
This step is unnecessary if the XML and non-XML mode DOMs are namespace consistent.
For example, assume that the following markup is processed by a DOM2-based RDFa processor:
<div xmlns:audio="http://purl.org/media/audio#" ...
After the markup is processed, there should exist a [URI mapping] in
the [local list of URI mappings] that contains a mapping from
audio
to http://purl.org/media/audio#
.
There are a number of non-prefixed attributes that are associated with RDFa processing in HTML5. If an DOM2-based RDFa processor is used to process these attributes, the following algorithm should be used to detect and extract the values of the attributes.
While processing an element as described in [RDFA-CORE], Section 5.5: Sequence, Step #4 through Step #9:
Note that the values defined in this section may be removed from this document and placed in an external 'RDFa Profile' so that they can be maintained independent of the specification.
The terms defined in this section must be mapped to lower case by an RDFa Processor. The vocabulary terms are:
Refers to a resource that defines a citation.
In the following example, the cite
is used to
reference the book from which the quotation is taken:
As Gandalf the White said in
<span rel="cite" resource="http://www.example.com/books/the_two_towers">
The Two Towers
</span>,
<quote xml:lang="en">"The hospitality of
your hall is somewhat lessened of late, Theoden King."</quote>
which would generate the following triples:
<> xhv:cite <http://www.example.com/books/the_two_towers> .
cite
is also useful for referencing specifications:
More information can be found in
<span rel="cite" resource="http://www.w3.org/TR/REC-xml">[XML]</cite>.
which would generate the following triples:
<> xhv:cite <http://www.w3.org/TR/REC-xml> .
Documents written using the markup language defined in this specification may be validated using the DTD defined in this section. If a document author wants to facilitate such validation, they may include the following declaration at the top of their document:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/html401-rdfa11-1.dtd">
You can download this version of this file from DTD/html401-rdfa11-1.dtd. The latest version is available at http://www.w3.org/MarkUp/DTD/html401-rdfa11-1.dtd.
<!-- This is the HTML 4.01 + RDFa 1.1 DTD, which includes presentation attributes and elements that W3C expects to phase out as support for style sheets matures. This DTD should be considered as a Transitional doctype with respect to content, but as a Strict doctype with respect to rendering mode. HTML 4 includes mechanisms for style sheets, scripting, embedding objects, improved support for right to left and mixed direction text, and enhancements to forms for improved accessibility for people with disabilities. Draft: $Date: 2019/03/20 17:11:42 $ Editors: Shane McCarron <shane@aptest.com> Manu Sporny <msporny@digitalbazaar.com> Original Authors: Dave Raggett <dsr@w3.org> Arnaud Le Hors <lehors@w3.org> Ian Jacobs <ij@w3.org> Further information about RDFa is available at: http://www.w3.org/TR/rdfa-core Further information about HTML 4.01 is available at: http://www.w3.org/TR/1999/REC-html401-19991224 Further information about HTML+RDFa is available at: http://www.w3.org/TR/rdfa-in-html The HTML 4.01 specification includes additional syntactic constraints that cannot be expressed within the DTDs. --> <!ENTITY % HTML.Version "-//W3C//DTD HTML 4.01+RDFa 1.1//EN" -- Typical usage: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/html401-rdfa11-1.dtd"> <html> <head> ... </head> <body> ... </body> </html> The URI used as a system identifier with the public identifier allows the user agent to download the DTD and entity sets as needed. --> <!--================== Imported Names ====================================--> <!-- Feature Switch for frameset documents --> <!ENTITY % HTML.Frameset "IGNORE"> <!ENTITY % ContentType "CDATA" -- media type, as per [RFC2045] --> <!ENTITY % ContentTypes "CDATA" -- comma-separated list of media types, as per [RFC2045] --> <!ENTITY % Charset "CDATA" -- a character encoding, as per [RFC2045] --> <!ENTITY % Charsets "CDATA" -- a space-separated list of character encodings, as per [RFC2045] --> <!ENTITY % LanguageCode "NAME" -- a language code, as per [RFC1766] --> <!ENTITY % Character "CDATA" -- a single character from [ISO10646] --> <!ENTITY % LinkTypes "CDATA" -- space-separated list of link types --> <!ENTITY % MediaDesc "CDATA" -- single or comma-separated list of media descriptors --> <!ENTITY % URI "CDATA" -- a Uniform Resource Identifier, see [URI] --> <!ENTITY % Datetime "CDATA" -- date and time information. ISO date format --> <!ENTITY % Script "CDATA" -- script expression --> <!ENTITY % StyleSheet "CDATA" -- style sheet data --> <!ENTITY % FrameTarget "CDATA" -- render in this frame --> <!ENTITY % Text "CDATA"> <!-- Parameter Entities --> <!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT" -- repeatable head elements --> <!ENTITY % heading "H1|H2|H3|H4|H5|H6"> <!ENTITY % list "UL | OL | DIR | MENU"> <!ENTITY % preformatted "PRE"> <!ENTITY % Color "CDATA" -- a color using sRGB: #RRGGBB as Hex values --> <!-- There are also 16 widely known color names with their sRGB values: Black = #000000 Green = #008000 Silver = #C0C0C0 Lime = #00FF00 Gray = #808080 Olive = #808000 White = #FFFFFF Yellow = #FFFF00 Maroon = #800000 Navy = #000080 Red = #FF0000 Blue = #0000FF Purple = #800080 Teal = #008080 Fuchsia= #FF00FF Aqua = #00FFFF --> <!ENTITY % bodycolors " bgcolor %Color; #IMPLIED -- document background color -- text %Color; #IMPLIED -- document text color -- link %Color; #IMPLIED -- color of links -- vlink %Color; #IMPLIED -- color of visited links -- alink %Color; #IMPLIED -- color of selected links -- "> <!--================ Character mnemonic entities =========================--> <!ENTITY % HTMLlat1 PUBLIC "-//W3C//ENTITIES Latin1//EN//HTML" "http://www.w3.org/TR/html401/HTMLlat1.ent"> %HTMLlat1; <!ENTITY % HTMLsymbol PUBLIC "-//W3C//ENTITIES Symbols//EN//HTML" "http://www.w3.org/TR/html401/HTMLsymbol.ent"> %HTMLsymbol; <!ENTITY % HTMLspecial PUBLIC "-//W3C//ENTITIES Special//EN//HTML" "http://www.w3.org/TR/html401/HTMLspecial.ent"> %HTMLspecial; <!--=================== Generic Attributes ===============================--> <!ENTITY % coreattrs "id ID #IMPLIED -- document-wide unique id -- class CDATA #IMPLIED -- space-separated list of classes -- style %StyleSheet; #IMPLIED -- associated style info -- title %Text; #IMPLIED -- advisory title -- > <!ENTITY % i18n "lang %LanguageCode; #IMPLIED -- language code -- dir (ltr|rtl) #IMPLIED -- direction for weak/neutral text --" > <!ENTITY % events "onclick %Script; #IMPLIED -- a pointer button was clicked -- ondblclick %Script; #IMPLIED -- a pointer button was double clicked-- onmousedown %Script; #IMPLIED -- a pointer button was pressed down -- onmouseup %Script; #IMPLIED -- a pointer button was released -- onmouseover %Script; #IMPLIED -- a pointer was moved onto -- onmousemove %Script; #IMPLIED -- a pointer was moved within -- onmouseout %Script; #IMPLIED -- a pointer was moved away -- onkeypress %Script; #IMPLIED -- a key was pressed and released -- onkeydown %Script; #IMPLIED -- a key was pressed down -- onkeyup %Script; #IMPLIED -- a key was released --" > <!ENTITY % TERMorURIorCURIE "CDATA" > <!ENTITY % TERMorURIorCURIEs "CDATA" > <!ENTITY % URIorCURIE "CDATA" > <!ENTITY % URIs "CDATA" > <!ENTITY % metainformation "about %URIorCURIE; #IMPLIED -- RDFa - specifies subject -- content CDATA #IMPLIED -- RDFa - specifies object override -- datatype %TERMorURIorCURIE; #IMPLIED -- RDFa - specifies object datatype -- typeof %TERMorURIorCURIEs; #IMPLIED -- RDFa - bnode or rdf:type triple -- prefix CDATA #IMPLIED -- RDFa - specifies prefix mappings -- profile %URIs; #IMPLIED -- RDFa - specifies term document -- property %TERMorURIorCURIEs; #IMPLIED -- RDFa - specifies predicate -- rel %TERMorURIorCURIEs; #IMPLIED -- relationship for linked resource -- rev %TERMorURIorCURIEs; #IMPLIED -- reverse relationship for linked resource -- href %URI; #IMPLIED -- URI for linked resource -- resource %URIorCURIE; #IMPLIED -- RDFa - like href, but overrides it -- vocab %URI; #IMPLIED -- RDFa - specifies default vocabulary" > <!-- Reserved Feature Switch --> <!ENTITY % HTML.Reserved "IGNORE"> <!-- The following attributes are reserved for possible future use --> <![ %HTML.Reserved; [ <!ENTITY % reserved "datasrc %URI; #IMPLIED -- a single or tabular Data Source -- datafld CDATA #IMPLIED -- the property or column name -- dataformatas (plaintext|html) plaintext -- text or html --" > ]]> <!ENTITY % reserved ""> <!ENTITY % attrs "%coreattrs; %i18n; %events; %metainformation;"> <!ENTITY % align "align (left|center|right|justify) #IMPLIED" -- default is left for ltr paragraphs, right for rtl -- > <!--=================== Text Markup ======================================--> <!ENTITY % fontstyle "TT | I | B | U | S | STRIKE | BIG | SMALL"> <!ENTITY % phrase "EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | ABBR | ACRONYM" > <!ENTITY % special "A | IMG | APPLET | OBJECT | FONT | BASEFONT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO | IFRAME"> <!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON"> <!-- %inline; covers inline or "text-level" elements --> <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl; "> <!ELEMENT (%fontstyle;|%phrase;) - - (%inline;)*> <!ATTLIST (%fontstyle;|%phrase;) %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript --> <!ATTLIST (SUB|SUP) %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT SPAN - - (%inline;)* -- generic language/style container --> <!ATTLIST SPAN %attrs; -- %coreattrs, %i18n, %events -- %reserved; -- reserved for possible future use -- > <!ELEMENT BDO - - (%inline;)* -- I18N BiDi over-ride --> <!ATTLIST BDO %coreattrs; -- id, class, style, title -- lang %LanguageCode; #IMPLIED -- language code -- dir (ltr|rtl) #required -- directionality -- > <!ELEMENT BASEFONT - O EMPTY -- base font size --> <!ATTLIST BASEFONT id ID #IMPLIED -- document-wide unique id -- size CDATA #required -- base font size for FONT elements -- color %Color; #IMPLIED -- text color -- face CDATA #IMPLIED -- comma-separated list of font names -- > <!ELEMENT FONT - - (%inline;)* -- local change to font --> <!ATTLIST FONT %coreattrs; -- id, class, style, title -- %i18n; -- lang, dir -- size CDATA #IMPLIED -- [+|-]nn e.g. size="+1", size="4" -- color %Color; #IMPLIED -- text color -- face CDATA #IMPLIED -- comma-separated list of font names -- > <!ELEMENT BR - O EMPTY -- forced line break --> <!ATTLIST BR %coreattrs; -- id, class, style, title -- clear (left|all|right|none) none -- control of text flow -- > <!--================== HTML content models ===============================--> <!-- HTML has two basic content models: %inline; character level elements and text strings %block; block-like elements e.g. paragraphs and lists --> <!ENTITY % block "P | %heading; | %list; | %preformatted; | DL | DIV | CENTER | NOSCRIPT | NOFRAMES | BLOCKQUOTE | FORM | ISINDEX | HR | TABLE | FIELDSET | ADDRESS"> <!ENTITY % flow "%block; | %inline;"> <!--=================== Document Body ====================================--> <!ELEMENT BODY O O (%flow;)* +(INS|DEL) -- document body --> <!ATTLIST BODY %attrs; -- %coreattrs, %i18n, %events -- onload %Script; #IMPLIED -- the document has been loaded -- onunload %Script; #IMPLIED -- the document has been removed -- background %URI; #IMPLIED -- texture tile for document background -- %bodycolors; -- bgcolor, text, link, vlink, alink -- > <!ELEMENT ADDRESS - - ((%inline;)|P)* -- information on author --> <!ATTLIST ADDRESS %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT DIV - - (%flow;)* -- generic language/style container --> <!ATTLIST DIV %attrs; -- %coreattrs, %i18n, %events -- %align; -- align, text alignment -- %reserved; -- reserved for possible future use -- > <!ELEMENT CENTER - - (%flow;)* -- shorthand for DIV align=center --> <!ATTLIST CENTER %attrs; -- %coreattrs, %i18n, %events -- > <!--================== The Anchor Element ================================--> <!ENTITY % Shape "(rect|circle|poly|default)"> <!ENTITY % Coords "CDATA" -- comma-separated list of lengths --> <!ELEMENT A - - (%inline;)* -(A) -- anchor --> <!ATTLIST A %attrs; -- %coreattrs, %i18n, %events -- charset %Charset; #IMPLIED -- char encoding of linked resource -- type %ContentType; #IMPLIED -- advisory content type -- name CDATA #IMPLIED -- named link end -- hreflang %LanguageCode; #IMPLIED -- language code -- target %FrameTarget; #IMPLIED -- render in this frame -- accesskey %Character; #IMPLIED -- accessibility key character -- shape %Shape; rect -- for use with client-side image maps -- coords %Coords; #IMPLIED -- for use with client-side image maps -- tabindex NUMBER #IMPLIED -- position in tabbing order -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- > <!--================== Client-side image maps ============================--> <!-- These can be placed in the same document or grouped in a separate document although this isn't yet widely supported --> <!ELEMENT MAP - - ((%block;) | AREA)+ -- client-side image map --> <!ATTLIST MAP %attrs; -- %coreattrs, %i18n, %events -- name CDATA #required -- for reference by usemap -- > <!ELEMENT AREA - O EMPTY -- client-side image map area --> <!ATTLIST AREA %attrs; -- %coreattrs, %i18n, %events -- shape %Shape; rect -- controls interpretation of coords -- coords %Coords; #IMPLIED -- comma-separated list of lengths -- target %FrameTarget; #IMPLIED -- render in this frame -- nohref (nohref) #IMPLIED -- this region has no action -- alt %Text; #required -- short description -- tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- > <!--================== The LINK Element ==================================--> <!-- Relationship values can be used in principle: a) for document specific toolbars/menus when used with the LINK element in document head e.g. start, contents, previous, next, index, end, help b) to link to a separate style sheet (rel=stylesheet) c) to make a link to a script (rel=script) d) by stylesheets to control how collections of html nodes are rendered into printed documents e) to make a link to a printable version of this document e.g. a postscript or pdf version (rel=alternate media=print) --> <!ELEMENT LINK - O EMPTY -- a media-independent link --> <!ATTLIST LINK %attrs; -- %coreattrs, %i18n, %events -- charset %Charset; #IMPLIED -- char encoding of linked resource -- hreflang %LanguageCode; #IMPLIED -- language code -- type %ContentType; #IMPLIED -- advisory content type -- media %MediaDesc; #IMPLIED -- for rendering on these media -- target %FrameTarget; #IMPLIED -- render in this frame -- > <!--=================== Images ===========================================--> <!-- Length defined in strict DTD for cellpadding/cellspacing --> <!ENTITY % Length "CDATA" -- nn for pixels or nn% for percentage length --> <!ENTITY % MultiLength "CDATA" -- pixel, percentage, or relative --> <![ %HTML.Frameset; [ <!ENTITY % MultiLengths "CDATA" -- comma-separated list of MultiLength --> ]]> <!ENTITY % Pixels "CDATA" -- integer representing length in pixels --> <!ENTITY % IAlign "(top|middle|bottom|left|right)" -- center? --> <!-- To avoid problems with text-only UAs as well as to make image content understandable and navigable to users of non-visual UAs, you need to provide a description with ALT, and avoid server-side image maps --> <!ELEMENT IMG - O EMPTY -- Embedded image --> <!ATTLIST IMG %attrs; -- %coreattrs, %i18n, %events -- src %URI; #required -- URI of image to embed -- alt %Text; #required -- short description -- longdesc %URI; #IMPLIED -- link to long description (complements alt) -- name CDATA #IMPLIED -- name of image for scripting -- height %Length; #IMPLIED -- override height -- width %Length; #IMPLIED -- override width -- usemap %URI; #IMPLIED -- use client-side image map -- ismap (ismap) #IMPLIED -- use server-side image map -- align %IAlign; #IMPLIED -- vertical or horizontal alignment -- border %Pixels; #IMPLIED -- link border width -- hspace %Pixels; #IMPLIED -- horizontal gutter -- vspace %Pixels; #IMPLIED -- vertical gutter -- > <!-- USEMAP points to a MAP element which may be in this document or an external document, although the latter is not widely supported --> <!--==================== OBJECT ======================================--> <!-- OBJECT is used to embed objects as part of HTML pages PARAM elements should precede other content. SGML mixed content model technicality precludes specifying this formally ... --> <!ELEMENT OBJECT - - (PARAM | %flow;)* -- generic embedded object --> <!ATTLIST OBJECT %attrs; -- %coreattrs, %i18n, %events -- declare (declare) #IMPLIED -- declare but don't instantiate flag -- classid %URI; #IMPLIED -- identifies an implementation -- codebase %URI; #IMPLIED -- base URI for classid, data, archive-- data %URI; #IMPLIED -- reference to object's data -- type %ContentType; #IMPLIED -- content type for data -- codetype %ContentType; #IMPLIED -- content type for code -- archive CDATA #IMPLIED -- space-separated list of URIs -- standby %Text; #IMPLIED -- message to show while loading -- height %Length; #IMPLIED -- override height -- width %Length; #IMPLIED -- override width -- usemap %URI; #IMPLIED -- use client-side image map -- name CDATA #IMPLIED -- submit as part of form -- tabindex NUMBER #IMPLIED -- position in tabbing order -- align %IAlign; #IMPLIED -- vertical or horizontal alignment -- border %Pixels; #IMPLIED -- link border width -- hspace %Pixels; #IMPLIED -- horizontal gutter -- vspace %Pixels; #IMPLIED -- vertical gutter -- %reserved; -- reserved for possible future use -- > <!ELEMENT PARAM - O EMPTY -- named property value --> <!ATTLIST PARAM id ID #IMPLIED -- document-wide unique id -- %metainformation; -- metadata attributes -- name CDATA #required -- property name -- value CDATA #IMPLIED -- property value -- valuetype (DATA|REF|OBJECT) DATA -- How to interpret value -- type %ContentType; #IMPLIED -- content type for value when valuetype=ref -- > <!--=================== Java APPLET ==================================--> <!-- One of code or object attributes must be present. Place PARAM elements before other content. --> <!ELEMENT APPLET - - (PARAM | %flow;)* -- Java applet --> <!ATTLIST APPLET %coreattrs; -- id, class, style, title -- %metainformation; -- metadata attributes -- codebase %URI; #IMPLIED -- optional base URI for applet -- archive CDATA #IMPLIED -- comma-separated archive list -- code CDATA #IMPLIED -- applet class file -- object CDATA #IMPLIED -- serialized applet file -- alt %Text; #IMPLIED -- short description -- name CDATA #IMPLIED -- allows applets to find each other -- width %Length; #required -- initial width -- height %Length; #required -- initial height -- align %IAlign; #IMPLIED -- vertical or horizontal alignment -- hspace %Pixels; #IMPLIED -- horizontal gutter -- vspace %Pixels; #IMPLIED -- vertical gutter -- > <!--=================== Horizontal Rule ==================================--> <!ELEMENT HR - O EMPTY -- horizontal rule --> <!ATTLIST HR %attrs; -- %coreattrs, %i18n, %events -- align (left|center|right) #IMPLIED noshade (noshade) #IMPLIED size %Pixels; #IMPLIED width %Length; #IMPLIED > <!--=================== Paragraphs =======================================--> <!ELEMENT P - O (%inline;)* -- paragraph --> <!ATTLIST P %attrs; -- %coreattrs, %i18n, %events -- %align; -- align, text alignment -- > <!--=================== Headings =========================================--> <!-- There are six levels of headings from H1 (the most important) to H6 (the least important). --> <!ELEMENT (%heading;) - - (%inline;)* -- heading --> <!ATTLIST (%heading;) %attrs; -- %coreattrs, %i18n, %events -- %align; -- align, text alignment -- > <!--=================== Preformatted Text ================================--> <!-- excludes markup for images and changes in font size --> <!ENTITY % pre.exclusion "IMG|OBJECT|APPLET|BIG|SMALL|SUB|SUP|FONT|BASEFONT"> <!ELEMENT PRE - - (%inline;)* -(%pre.exclusion;) -- preformatted text --> <!ATTLIST PRE %attrs; -- %coreattrs, %i18n, %events -- width NUMBER #IMPLIED > <!--===================== Inline Quotes ==================================--> <!ELEMENT Q - - (%inline;)* -- short inline quotation --> <!ATTLIST Q %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- URI for source document or msg -- > <!--=================== Block-like Quotes ================================--> <!ELEMENT BLOCKQUOTE - - (%flow;)* -- long quotation --> <!ATTLIST BLOCKQUOTE %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- URI for source document or msg -- > <!--=================== Inserted/Deleted Text ============================--> <!-- INS/DEL are handled by inclusion on BODY --> <!ELEMENT (INS|DEL) - - (%flow;)* -- inserted text, deleted text --> <!ATTLIST (INS|DEL) %attrs; -- %coreattrs, %i18n, %events -- cite %URI; #IMPLIED -- info on reason for change -- datetime %Datetime; #IMPLIED -- date and time of change -- > <!--=================== Lists ============================================--> <!-- definition lists - DT for term, DD for its definition --> <!ELEMENT DL - - (DT|DD)+ -- definition list --> <!ATTLIST DL %attrs; -- %coreattrs, %i18n, %events -- compact (compact) #IMPLIED -- reduced interitem spacing -- > <!ELEMENT DT - O (%inline;)* -- definition term --> <!ELEMENT DD - O (%flow;)* -- definition description --> <!ATTLIST (DT|DD) %attrs; -- %coreattrs, %i18n, %events -- > <!-- Ordered lists (OL) Numbering style 1 arablic numbers 1, 2, 3, ... a lower alpha a, b, c, ... A upper alpha A, B, C, ... i lower roman i, ii, iii, ... I upper roman I, II, III, ... The style is applied to the sequence number which by default is reset to 1 for the first list item in an ordered list. This can't be expressed directly in SGML due to case folding. --> <!ENTITY % OLStyle "CDATA" -- constrained to: "(1|a|A|i|I)" --> <!ELEMENT OL - - (LI)+ -- ordered list --> <!ATTLIST OL %attrs; -- %coreattrs, %i18n, %events -- type %OLStyle; #IMPLIED -- numbering style -- compact (compact) #IMPLIED -- reduced interitem spacing -- start NUMBER #IMPLIED -- starting sequence number -- > <!-- Unordered Lists (UL) bullet styles --> <!ENTITY % ULStyle "(disc|square|circle)"> <!ELEMENT UL - - (LI)+ -- unordered list --> <!ATTLIST UL %attrs; -- %coreattrs, %i18n, %events -- type %ULStyle; #IMPLIED -- bullet style -- compact (compact) #IMPLIED -- reduced interitem spacing -- > <!ELEMENT (DIR|MENU) - - (LI)+ -(%block;) -- directory list, menu list --> <!ATTLIST DIR %attrs; -- %coreattrs, %i18n, %events -- compact (compact) #IMPLIED -- reduced interitem spacing -- > <!ATTLIST MENU %attrs; -- %coreattrs, %i18n, %events -- compact (compact) #IMPLIED -- reduced interitem spacing -- > <!ENTITY % LIStyle "CDATA" -- constrained to: "(%ULStyle;|%OLStyle;)" --> <!ELEMENT LI - O (%flow;)* -- list item --> <!ATTLIST LI %attrs; -- %coreattrs, %i18n, %events -- type %LIStyle; #IMPLIED -- list item style -- value NUMBER #IMPLIED -- reset sequence number -- > <!--================ Forms ===============================================--> <!ELEMENT FORM - - (%flow;)* -(FORM) -- interactive form --> <!ATTLIST FORM %attrs; -- %coreattrs, %i18n, %events -- action %URI; #required -- server-side form handler -- method (GET|POST) GET -- HTTP method used to submit the form-- enctype %ContentType; "application/x-www-form-urlencoded" accept %ContentTypes; #IMPLIED -- list of MIME types for file upload -- name CDATA #IMPLIED -- name of form for scripting -- onsubmit %Script; #IMPLIED -- the form was submitted -- onreset %Script; #IMPLIED -- the form was reset -- target %FrameTarget; #IMPLIED -- render in this frame -- accept-charset %Charsets; #IMPLIED -- list of supported charsets -- > <!-- Each label must not contain more than ONE field --> <!ELEMENT LABEL - - (%inline;)* -(LABEL) -- form field label text --> <!ATTLIST LABEL %attrs; -- %coreattrs, %i18n, %events -- for IDREF #IMPLIED -- matches field ID value -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- > <!ENTITY % InputType "(TEXT | PASSWORD | CHECKBOX | RADIO | SUBMIT | RESET | FILE | HIDDEN | IMAGE | BUTTON)" > <!-- attribute name required for all but submit and reset --> <!ELEMENT INPUT - O EMPTY -- form control --> <!ATTLIST INPUT %attrs; -- %coreattrs, %i18n, %events -- type %InputType; TEXT -- what kind of widget is needed -- name CDATA #IMPLIED -- submit as part of form -- value CDATA #IMPLIED -- Specify for radio buttons and checkboxes -- checked (checked) #IMPLIED -- for radio buttons and check boxes -- disabled (disabled) #IMPLIED -- unavailable in this context -- readonly (readonly) #IMPLIED -- for text and passwd -- size CDATA #IMPLIED -- specific to each type of field -- maxlength NUMBER #IMPLIED -- max chars for text fields -- src %URI; #IMPLIED -- for fields with images -- alt CDATA #IMPLIED -- short description -- usemap %URI; #IMPLIED -- use client-side image map -- ismap (ismap) #IMPLIED -- use server-side image map -- tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- onselect %Script; #IMPLIED -- some text was selected -- onchange %Script; #IMPLIED -- the element value was changed -- accept %ContentTypes; #IMPLIED -- list of MIME types for file upload -- align %IAlign; #IMPLIED -- vertical or horizontal alignment -- %reserved; -- reserved for possible future use -- > <!ELEMENT SELECT - - (OPTGROUP|OPTION)+ -- option selector --> <!ATTLIST SELECT %attrs; -- %coreattrs, %i18n, %events -- name CDATA #IMPLIED -- field name -- size NUMBER #IMPLIED -- rows visible -- multiple (multiple) #IMPLIED -- default is single selection -- disabled (disabled) #IMPLIED -- unavailable in this context -- tabindex NUMBER #IMPLIED -- position in tabbing order -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- onchange %Script; #IMPLIED -- the element value was changed -- %reserved; -- reserved for possible future use -- > <!ELEMENT OPTGROUP - - (OPTION)+ -- option group --> <!ATTLIST OPTGROUP %attrs; -- %coreattrs, %i18n, %events -- disabled (disabled) #IMPLIED -- unavailable in this context -- label %Text; #required -- for use in hierarchical menus -- > <!ELEMENT OPTION - O (#PCDATA) -- selectable choice --> <!ATTLIST OPTION %attrs; -- %coreattrs, %i18n, %events -- selected (selected) #IMPLIED disabled (disabled) #IMPLIED -- unavailable in this context -- label %Text; #IMPLIED -- for use in hierarchical menus -- value CDATA #IMPLIED -- defaults to element content -- > <!ELEMENT TEXTAREA - - (#PCDATA) -- multi-line text field --> <!ATTLIST TEXTAREA %attrs; -- %coreattrs, %i18n, %events -- name CDATA #IMPLIED rows NUMBER #required cols NUMBER #required disabled (disabled) #IMPLIED -- unavailable in this context -- readonly (readonly) #IMPLIED tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- onselect %Script; #IMPLIED -- some text was selected -- onchange %Script; #IMPLIED -- the element value was changed -- %reserved; -- reserved for possible future use -- > <!-- #PCDATA is to solve the mixed content problem, per specification only whitespace is allowed there! --> <!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group --> <!ATTLIST FIELDSET %attrs; -- %coreattrs, %i18n, %events -- > <!ELEMENT LEGEND - - (%inline;)* -- fieldset legend --> <!ENTITY % LAlign "(top|bottom|left|right)"> <!ATTLIST LEGEND %attrs; -- %coreattrs, %i18n, %events -- accesskey %Character; #IMPLIED -- accessibility key character -- align %LAlign; #IMPLIED -- relative to fieldset -- > <!ELEMENT BUTTON - - (%flow;)* -(A|%formctrl;|FORM|ISINDEX|FIELDSET|IFRAME) -- push button --> <!ATTLIST BUTTON %attrs; -- %coreattrs, %i18n, %events -- name CDATA #IMPLIED value CDATA #IMPLIED -- sent to server when submitted -- type (button|submit|reset) submit -- for use as form button -- disabled (disabled) #IMPLIED -- unavailable in this context -- tabindex NUMBER #IMPLIED -- position in tabbing order -- accesskey %Character; #IMPLIED -- accessibility key character -- onfocus %Script; #IMPLIED -- the element got the focus -- onblur %Script; #IMPLIED -- the element lost the focus -- %reserved; -- reserved for possible future use -- > <!--======================= Tables =======================================--> <!-- IETF HTML table standard, see [RFC1942] --> <!-- The BORDER attribute sets the thickness of the frame around the table. The default units are screen pixels. The FRAME attribute specifies which parts of the frame around the table should be rendered. The values are not the same as CALS to avoid a name clash with the VALIGN attribute. The value "border" is included for backwards compatibility with <TABLE BORDER> which yields frame=border and border=implied For <TABLE BORDER=1> you get border=1 and frame=implied. In this case, it is appropriate to treat this as frame=border for backwards compatibility with deployed browsers. --> <!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)"> <!-- The RULES attribute defines which rules to draw between cells: If RULES is absent then assume: "none" if BORDER is absent or BORDER=0 otherwise "all" --> <!ENTITY % TRules "(none | groups | rows | cols | all)"> <!-- horizontal placement of table relative to document --> <!ENTITY % TAlign "(left|center|right)"> <!-- horizontal alignment attributes for cell contents --> <!ENTITY % cellhalign "align (left|center|right|justify|char) #IMPLIED char %Character; #IMPLIED -- alignment char, e.g. char=':' -- charoff %Length; #IMPLIED -- offset for alignment char --" > <!-- vertical alignment attributes for cell contents --> <!ENTITY % cellvalign "valign (top|middle|bottom|baseline) #IMPLIED" > <!ELEMENT TABLE - - (CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)> <!ELEMENT CAPTION - - (%inline;)* -- table caption --> <!ELEMENT THEAD - O (TR)+ -- table header --> <!ELEMENT TFOOT - O (TR)+ -- table footer --> <!ELEMENT TBODY O O (TR)+ -- table body --> <!ELEMENT COLGROUP - O (COL)* -- table column group --> <!ELEMENT COL - O EMPTY -- table column --> <!ELEMENT TR - O (TH|TD)+ -- table row --> <!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell--> <!ATTLIST TABLE -- table element -- %attrs; -- %coreattrs, %i18n, %events -- summary %Text; #IMPLIED -- purpose/structure for speech output-- width %Length; #IMPLIED -- table width -- border %Pixels; #IMPLIED -- controls frame width around table -- frame %TFrame; #IMPLIED -- which parts of frame to render -- rules %TRules; #IMPLIED -- rulings between rows and cols -- cellspacing %Length; #IMPLIED -- spacing between cells -- cellpadding %Length; #IMPLIED -- spacing within cells -- align %TAlign; #IMPLIED -- table position relative to window -- bgcolor %Color; #IMPLIED -- background color for cells -- %reserved; -- reserved for possible future use -- datapagesize CDATA #IMPLIED -- reserved for possible future use -- > <!ENTITY % CAlign "(top|bottom|left|right)"> <!ATTLIST CAPTION %attrs; -- %coreattrs, %i18n, %events -- align %CAlign; #IMPLIED -- relative to table -- > <!-- COLGROUP groups a set of COL elements. It allows you to group several semantically related columns together. --> <!ATTLIST COLGROUP %attrs; -- %coreattrs, %i18n, %events -- span NUMBER 1 -- default number of columns in group -- width %MultiLength; #IMPLIED -- default width for enclosed COLs -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!-- COL elements define the alignment properties for cells in one or more columns. The WIDTH attribute specifies the width of the columns, e.g. width=64 width in screen pixels width=0.5* relative width of 0.5 The SPAN attribute causes the attributes of one COL element to apply to more than one column. --> <!ATTLIST COL -- column groups and properties -- %attrs; -- %coreattrs, %i18n, %events -- span NUMBER 1 -- COL attributes affect N columns -- width %MultiLength; #IMPLIED -- column width specification -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!-- Use THEAD to duplicate headers when breaking table across page boundaries, or for static headers when TBODY sections are rendered in scrolling panel. Use TFOOT to duplicate footers when breaking table across page boundaries, or for static footers when TBODY sections are rendered in scrolling panel. Use multiple TBODY sections when rules are needed between groups of table rows. --> <!ATTLIST (THEAD|TBODY|TFOOT) -- table section -- %attrs; -- %coreattrs, %i18n, %events -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- > <!ATTLIST TR -- table row -- %attrs; -- %coreattrs, %i18n, %events -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- bgcolor %Color; #IMPLIED -- background color for row -- > <!-- Scope is simpler than headers attribute for common tables --> <!ENTITY % Scope "(row|col|rowgroup|colgroup)"> <!-- TH is for headers, TD for data, but for cells acting as both use TD --> <!ATTLIST (TH|TD) -- header or data cell -- %attrs; -- %coreattrs, %i18n, %events -- abbr %Text; #IMPLIED -- abbreviation for header cell -- axis CDATA #IMPLIED -- comma-separated list of related headers-- headers IDREFS #IMPLIED -- list of id's for header cells -- scope %Scope; #IMPLIED -- scope covered by header cells -- rowspan NUMBER 1 -- number of rows spanned by cell -- colspan NUMBER 1 -- number of cols spanned by cell -- %cellhalign; -- horizontal alignment in cells -- %cellvalign; -- vertical alignment in cells -- nowrap (nowrap) #IMPLIED -- suppress word wrap -- bgcolor %Color; #IMPLIED -- cell background color -- width %Length; #IMPLIED -- width for cell -- height %Length; #IMPLIED -- height for cell -- > <!--================== Document Frames ===================================--> <!-- The content model for HTML documents depends on whether the HEAD is followed by a FRAMESET or BODY element. The widespread omission of the BODY start tag makes it impractical to define the content model without the use of a marked section. --> <![ %HTML.Frameset; [ <!ELEMENT FRAMESET - - ((FRAMESET|FRAME)+ & NOFRAMES?) -- window subdivision--> <!ATTLIST FRAMESET %coreattrs; -- id, class, style, title -- rows %MultiLengths; #IMPLIED -- list of lengths, default: 100% (1 row) -- cols %MultiLengths; #IMPLIED -- list of lengths, default: 100% (1 col) -- onload %Script; #IMPLIED -- all the frames have been loaded -- onunload %Script; #IMPLIED -- all the frames have been removed -- > ]]> <![ %HTML.Frameset; [ <!-- reserved frame names start with "_" otherwise starts with letter --> <!ELEMENT FRAME - O EMPTY -- subwindow --> <!ATTLIST FRAME %coreattrs; -- id, class, style, title -- longdesc %URI; #IMPLIED -- link to long description (complements title) -- name CDATA #IMPLIED -- name of frame for targetting -- src %URI; #IMPLIED -- source of frame content -- frameborder (1|0) 1 -- request frame borders? -- marginwidth %Pixels; #IMPLIED -- margin widths in pixels -- marginheight %Pixels; #IMPLIED -- margin height in pixels -- noresize (noresize) #IMPLIED -- allow users to resize frames? -- scrolling (yes|no|auto) auto -- scrollbar or none -- > ]]> <!ELEMENT IFRAME - - (%flow;)* -- inline subwindow --> <!ATTLIST IFRAME %coreattrs; -- id, class, style, title -- longdesc %URI; #IMPLIED -- link to long description (complements title) -- name CDATA #IMPLIED -- name of frame for targetting -- src %URI; #IMPLIED -- source of frame content -- frameborder (1|0) 1 -- request frame borders? -- marginwidth %Pixels; #IMPLIED -- margin widths in pixels -- marginheight %Pixels; #IMPLIED -- margin height in pixels -- scrolling (yes|no|auto) auto -- scrollbar or none -- align %IAlign; #IMPLIED -- vertical or horizontal alignment -- height %Length; #IMPLIED -- frame height -- width %Length; #IMPLIED -- frame width -- > <![ %HTML.Frameset; [ <!ENTITY % noframes.content "(BODY) -(NOFRAMES)"> ]]> <!ENTITY % noframes.content "(%flow;)*"> <!ELEMENT NOFRAMES - - %noframes.content; -- alternate content container for non frame-based rendering --> <!ATTLIST NOFRAMES %attrs; -- %coreattrs, %i18n, %events -- > <!--================ Document Head =======================================--> <!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" --> <!ENTITY % head.content "TITLE & ISINDEX? & BASE?"> <!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head --> <!ATTLIST HEAD %attrs; > <!-- The TITLE element is not considered part of the flow of text. It should be displayed, for example as the page header or window title. Exactly one title is required per document. --> <!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title --> <!ATTLIST TITLE %attrs> <!ELEMENT ISINDEX - O EMPTY -- single line prompt --> <!ATTLIST ISINDEX %coreattrs; -- id, class, style, title -- %i18n; -- lang, dir -- prompt %Text; #IMPLIED -- prompt message --> <!ELEMENT BASE - O EMPTY -- document base URI --> <!ATTLIST BASE href %URI; #IMPLIED -- URI that acts as base URI -- target %FrameTarget; #IMPLIED -- render in this frame -- > <!ELEMENT META - O EMPTY -- generic metainformation --> <!ATTLIST META %i18n; -- lang, dir, for use with content -- %metainformation; http-equiv NAME #IMPLIED -- HTTP response header name -- name NAME #IMPLIED -- metainformation name -- scheme CDATA #IMPLIED -- select form of content -- > <!ELEMENT STYLE - - %StyleSheet -- style info --> <!ATTLIST STYLE %i18n; -- lang, dir, for use with title -- type %ContentType; #required -- content type of style language -- media %MediaDesc; #IMPLIED -- designed for use with these media -- title %Text; #IMPLIED -- advisory title -- > <!ELEMENT SCRIPT - - %Script; -- script statements --> <!ATTLIST SCRIPT charset %Charset; #IMPLIED -- char encoding of linked resource -- type %ContentType; #required -- content type of script language -- language CDATA #IMPLIED -- predefined script language name -- src %URI; #IMPLIED -- URI for an external script -- defer (defer) #IMPLIED -- UA may defer execution of script -- event CDATA #IMPLIED -- reserved for possible future use -- for %URI; #IMPLIED -- reserved for possible future use -- > <!ELEMENT NOSCRIPT - - (%flow;)* -- alternate content container for non script-based rendering --> <!ATTLIST NOSCRIPT %attrs; -- %coreattrs, %i18n, %events -- > <!--================ Document Structure ==================================--> <!ENTITY % version "version CDATA #FIXED '%HTML.Version;'"> <![ %HTML.Frameset; [ <!ENTITY % html.content "HEAD, FRAMESET"> ]]> <!ENTITY % html.content "HEAD, BODY"> <!ELEMENT HTML O O (%html.content;) -- document root element --> <!ATTLIST HTML %attrs; %version; >
This section is non-normative.
In early 2004, Mark Birbeck published a document named "RDF in XHTML" via the XHTML2 Working Group wherein he laid the groundwork for what would eventually become RDFa (The Resource Description Framework in Attributes).
In 2006, the work was co-sponsored by the Semantic Web Deployment Work Group, which began to formalize a technology to express semantic data in XHTML. This technology was successfully developed and reached consensus at the W3C, later published as an official W3C Recommendation. While HTML provides a mechanism to express the structure of a document (title, paragraphs, links), RDFa provides a mechanism to express the meaning in a document (people, places, events).
The document, titled "RDF in XHTML: Syntax and Processing" [XHTML-RDFA], defined a set of attributes and rules for processing those attributes that resulted in the output of machine-readable semantic data. While the document applied to XHTML, the attributes and rules were always intended to operate across any tree-based structure containing attributes on tree nodes (such as HTML4, SVG and ODF).
While RDFa was initially specified for use in XHTML, adoption by a number of large organizations on the Web spurred RDFa's use in non-XHTML languages. Its use in HTML4, before an official specification was developed for those languages, caused concern regarding document conformance.
Over the years, the members of the RDFa Task Force had discussed the possibility of applying the same attributes and processing rules outlined in the XHTML+RDFa specification to all HTML family documents. By design, the possibility of a unified semantic data expression mechanism between all HTML and XHTML family documents was squarely in the realm of possibility.
An RDFa Working Group was created in 2010 to address the issues concerning multiple language implementations of RDFa. The XHTML+RDFa document was split into a base specification, called RDFa Core 1.1 [RDFA-CORE], and thin specifications that layer above RDFa Core 1.1. The XHTML+RDFa 1.1 specification [XHTML-RDFA] is an example of such a thin specification. This document, also a thin specification, is targeted at HTML4, HTML5 and XHTML5.
This document describes the extensions to the RDFa Core 1.1 specification that permits the use of RDFa in all HTML family documents. By using the attributes and processing rules described in the RDFa Core 1.1 specification and heeding the minor changes in this document, authors can generate markup that produces the same semantic data output in HTML4, HTML5 and XHTML5.
This section is non-normative.
2009-10-15: First version of the RDFa for HTML4, HTML5 and XHTML5.
2010-03-04: Updated HTML5 coercion to Infoset rules, preservation of namespaces in Infoset and DOM2-based processors, clarifying how to extract RDFa attributes via Infoset, how to extract RDFa attributes via DOM2.
2010-05-02: Inheritance of basic processing rules from RDFa 1.1 [RDFA-CORE], instead of XHTML+RDFa 1.0 [RDFA-SYNTAX], inclusion of the HTML Default Vocabulary Terms, inclusion of a HTML 4.01 + RDFa 1.1 DTD for validation purposes.
This section is non-normative.
At the time of publication, the members of the RDFa Working Group were:
Ben Adida (chair), Benjamin Adrian, Mark Birbeck, Abhijit Galkward, Markus Gylling, Ivan Herman (staff contact), Toby Inkster, Shane McCarron, Knud Möller, John O'Donovan, Steven Pemberton, Jeffrey Sonstein, Manu Sporny (chair), Robert Weir
At the time of publication, the members of the HTML Working Group were:
Colin Aarts, Miller Abel, D.R.Imanuel Abromeit, Robert Accettura, Chris Adams, Ben Adida, Arihant Agarwal, yael aharon, Jim Allan, Kazuyuki Ashimura, Tab Atkins Jr., Stephen Axthelm, Mark Baker, Christopher Bank, Bogdan Baraszkiewicz, Gary Barber, David Baron, Adam Barth, Aaron Bassett, Adrian Bateman, Matthias Bauer, Johannes Behr, John-Mark Bell, Robin Berjon, Arve Bersvendsen, Levent Besik, David Bills, Mark Birbeck, David Bolter, Anders Bondehagen, Marco Bonetti, Glenn Bookout, Sierk Bornemann, Denis Boudreau, Ben Boyle, River Brandon, Judy Brewer, Dan Brickley, Per-Erik Brodin, Thomas Broyer, Don Brutzman, Craig Buckler, Dick Bulterman, Daniel Burnett, Noel Bush, Andrew Buzzell, Craig Cadwallader, Sally Cain, Ben Caldwell, Brian Campbell, Carlos Cardona, Maurice Carey, Eric Carlson, Laura Carlson, Gavin Carothers, Wayne Carr, Tomas Caspers, James Cassell, Tantek Çelik, Namachivayam Chelladurai, David Child, Wendy Chisholm, David Choi, wu chou, Edward Cianci, Michaeljohn Clement, Richard Conyard, Michael Cooper, Paul Cotton (chair), Chris Cressman, Brendan Cullen, Joseph D'Andrea, Mohammed DADAS, Deborah Dahl, Erik Dahlström, David Dailey, Will Daniels, Ivan De Marino, Tommaso Donnarumma, Chris Double, John Drinkwater, Marc Drumm, Mark DuBois, Karl Dubost, Andrew Duck, Clair Dunn, Henrik Dvergsdal, Dean Edridge, Anand Samuel Edwin, Eric Eggert, S Emerson, Ivan Enderlin, Rob Ennals, Jean-Pierre EVAIN, Steve Faulkner, Andrew Fedoniouk, Alexey Feldgendler, Alejandro Fernandez, Ian Fette, Roy Fielding, Markus Fischer, David Fisher, Nick Fitzsimons, Mark Foladare, John Foliot, Kelly Ford, Jason Fowler, Geoff Freed, Matthew Freels, Steve Gabrio, Mike Ganner, Patrick Garies, Olivier Gendrin, Giovanni Gentili, Dragos Georgita, Dimitri Glazkov, Daniel Glazman, Eliot Graff, James Graham, Aryeh Gregor, Chris Griego, Jonathan Griffin, Guillaume Guérin, Jon Gunderson, Lars Gunther, Raghavan Gurumurthy, Markku Hakkinen, Marcin Hanclik, Matt Harris, Chris Hay, Sean Hayes, Ian Hickson, Thomas Higginbotham, Krijn Hoetmer, Laurens Holst, Mikko Honkala, Tobias Horvath, Peter Howkins, Raul Hudea, Dale Hudjik, Jon Hughes, Lachlan Hunt, David Hyatt, David Håsäther, Eihab Ibrahim, Kunter Ilalan, Toby Inkster, Patrick D F Ion, Erik Isaksen, Richard Ishida, Moto Ishizawa, Yudai Iwasaki, Dean Jackson, Justin James, Arthur Jennings, Arne Johannessen, Kenny Johar, Sam Johnston, Sam Johnston, Doug Jones, Wilhelm Joys Andersen, Philip Jägenstedt, Susanne Jäger, Yehuda Katz, Jeremy Keith, Serge K. Keller, John Kemp, Kazuhito Kidachi, Don Kiely, Dowan Kim, Sebastian Kippe, Martin Kliehm, Egor Kloos, Graham Klyne, Justin Anthony Knapp, Masatomo Kobayashi, Marcel Koeppen, Jirka Kosek, Anssi Kostiainen, Lee Kowalkowski, Michael Kozakewich, Maxim Kozhuh, Peter Krantz, Keith Krieger, Kris Krueger, Mayank Kumar, Michael Köller, Jonatan Lander, Lucas Larson, Bruce Lawson, Josh Lawton, Nicolas LE GALL, Chasen Le Hara, Philippe Le Hégaret, Jane Lee, Kangchan Lee, WonSuk Lee, Niels Leenheer, Dean Leigh, Travis Leithead, Gez Lemon, Kornel Lesinski, aurélien levy, Scott Lewis, Li Li, Danny Liang, Jake Liddell, Håkon Wium Lie, Jedi Lin, Andy Lintner, Feng Liu, Jianjun Liu, Robert Love, Guillaume Ludwig, Andrew Maben, Shefik Macauley, Matthew MacKenzie, Krzysztof Maczynski, Vilem Malek, Murray Maloney, Jatinder Mann, Gabriel Mansour, Zhihong Mao, Bilgehan Maras, Chris Marrin, Robert Marshall, Andrew Martin, Alfonso Martínez de Lizarrondo, Luca Mascaro, Larry Masinter, Bill Mason, Matthew May, Cena Mayo, Charles McCathieNevile, Cameron McCormack, Martin McEvoy, Benjamin Meadowcroft, Shawn Medero, Reinier Meenhorst, Jens Meiert, Jakob Melander, Markus Mielke, Ben Millard, Mark Miller, Ryan Mitchell, Katsuhiko Momoi, Stefan More, Terry Morris, Thomas Morris, Daniel Morrison, Simon Myers, Stuart Myles, Marco Neumann, Sharon Newman, Tom Nguyen, Andrey Nikanorov, Jer Noble, Andrew Norman, Joshue O Connor, Robert O'Callahan, Edward O'Connor, Matt Obee, Frank Olivier, Ryan Orr, Debi Orton, Kulanthaivel Palanichamy, Frank Palinkas, Soohong Daniel Park, Sylvain Pasche, Chris Pearce, Brian Peppler, Ariel Pérez, Adele Peterson, Silvia Pfeiffer, Simon Pieters, Benoit Piette, Thomas Pike, Gabriel Pizzorno, Andrew Polk, Andrei Polushin, Pasquale Popolizio, Harri Porten, Alexey Proskuryakov, Michael Puls II, Juan Quemada, T.V. Raman, Andrew Ramsden, Arun Ranganathan, Marco Ranon, Matthew Ratzloff, Matthew Raymond, Ron Reisor, Daniel Renfer, Julian Reschke, Cyra Richardson, Ole Riesenberg, Anders Ringqvist, Adam Roben, Alex Robinson, Jude Robinson, Leonard Rosenthol, Gregory Rosmaita, Tony Ross, Steven Roussey, Sam Ruby (chair), Pietro Russo, Weston Ruter, Monikandan S, Lucas Sa, Rene Saarsoo, Sajid Saiyed, Janina Sajka, joaquin Salvachua, satish sangaru, Samuel Santos, Sorin Sbarnea, Daniel Schattenkirchner, Doug Schepers, Kai Scheppe, Christian Schmidt, Sebastian Schnitzenbaumer, Christopher Schroeder, Richard Schwerdtfeger, Gavin Sharp, Cynthia Shelly, Jonas Sicking, Andrew Sidwell, Leif Halvard Silli, David Singer, Henri Sivonen, Brian Skahan, Kenneth Sklander, Dan Smith, Dylan Smith, Michael(tm) Smith (staff contact), Sam Sneddon, Gnanasekar S Somanathan, Manu Sporny, Elliott Sprehn, Maciej Stachowiak (chair), Vicki Stanton, Hallvord Steen, Johnny Stenback, Robert Stern, Peter Stewart, Stephen Stewart, Andrew Stibbard, Bruce Stockwell, Motti Strom, Oli Studholme, Mihai Sucan, Bryan Sullivan, Marat Tanalin, Mike Taylor, Philip Taylor, Sander Tekelenburg, Shane Thacker, Nik Thierry, Morten Tollefsen, Dominik Tomaszuk, Dzung Tran, Monika Trebo, Mark Turnage, Jason Turnbull, Scott Turner, Michael Turnwall, Matthew Turvey, Asbjørn Ulsberg, Wesley Upchurch, Ojan Vafai, Erik van Kempen, Anne van Kesteren, Sander van Lambalgen, Charl van Niekerk, Tim van Oostrom, Christopher Varley, Jean-Charles Verdié, John Vernaleo, Scott Vesey, Sigbjørn Vik, Laurent Vilday, Kent Villard, Jace Voracek, David Voth, Vladimir Vukicevic, Johnson Wang, Martijn Wargers, Jonathan Watt, Kyle Weems, Samuel Weinig, Ian Wessman, Ben West, Jason White, Michael Whitley, Joe Williams, Andrew Wilson, Chris Wilson, Doug Wright, Han Xu, Mateo Yadarola, Masataka Yakura, Channy Yun, Michael Zajac, Boris Zbarsky, Milan Zoufal, Michael zur Muehlen