Abstract

RDFa Core 1.1 [RDFA-CORE] defines attributes and syntax for embedding semantic markup in Host Languages. This document defines one such Host Language. This language is a superset of XHTML 1.1 [XHTML11-2e], integrating the attributes as defined in RDFa Core 1.1. This document is intended for authors who want to create XHTML Family documents that embed rich semantic markup.

Status of This Document

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/.

This is an Editorial Revision of the Recommendation published on the 22nd of August, 2013. That document was a revision of Sections 8 and 9 and Appendix A of RDFa Syntax 1.0 [RDFA-SYNTAX], superseding those sections. There are a number of substantive differences between this version and the 2008 version, including:

  1. Inheritance of basic processing rules from [RDFA-CORE].
  2. The inclusion of an implementation of the markup language using XML Schema.
  3. The addition of @lang to be consistent with recent changes in [XHTML11-2e].
  4. Removal of the collection of TERMs from this document - instead deferring the definitions in an RDFa Initial Context document.

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.

The implementation report used by the director to transition to Recommendation has been made available. There have been no formal objections to the publication of this document.

This document was published by the RDFa Working Group as a Recommendation. If you wish to make comments regarding this document, please send them to [email protected] (subscribe, archives). All comments are welcome.

Please see the Working Group's implementation report.

This document has been reviewed by W3C Members, by software developers, and by other W3C groups and interested parties, and is endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

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.

This document is governed by the 14 October 2005 W3C Process Document.

Table of Contents

1. Introduction

XHTML+RDFa 1.1 is an XHTML Family markup language. It extends the XHTML 1.1 markup language with the attributes defined in RDFa Core 1.1. The document also defines an XHTML Modularization-compatible [XHTML-MODULARIZATION11-2e] module for the RDFa Core attributes in both XML DTD and XML Schema formats.

2. Conformance

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 MAY, MUST, and SHOULD are to be interpreted as described in [RFC2119].

2.1 Document Conformance

A strictly conforming XHTML+RDFa document is a document that requires only the facilities described as mandatory in this specification. Such a document satisfies the following criteria:

  1. The document MUST conform to the constraints expressed in the schemas in Appendix A - XHTML+RDFa XML Schema and Appendix B - XHTML+RDFa Document Type Definition.

  2. The local part of the root element of the document MUST be html.

  3. The start tag of the root element of the document MUST explicitly contain a default namespace declaration for the XHTML namespace [XML-NAMES11]. The namespace URI for XHTML is defined to be http://www.w3.org/1999/xhtml.

    The start tag MAY also contain the declaration of the XML Schema Instance Namespace and an XML Schema Instance schemaLocation attribute [XMLSCHEMA11-2]. Such an attribute would associate the XHTML namespace http://www.w3.org/1999/xhtml with the XML Schema at the URI http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-2.xsd.

  4. There MAY Be a @version attribute on the html element with the value "XHTML+RDFa 1.1".
Example 1: Example of an XHTML+RDFa 1.1 document

<html xmlns="http://www.w3.org/1999/xhtml" 
    version="XHTML+RDFa 1.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.w3.org/1999/xhtml
                        http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-2.xsd"
    lang="en"
    xml:lang="en">
  
    Virtual Library
  
  
    

Moved to example.org.

Note that in this example, the XML declaration is included. An XML declaration like the one above is not required in all XML documents. XHTML document authors SHOULD use XML declarations in all their documents. XHTML document authors MUST use an XML declaration when the character encoding of the document is other than the default UTF-8 or UTF-16 and no encoding is specified by a higher-level protocol.

XHTML+RDFa documents SHOULD be labeled with the Internet Media Type "application/xhtml+xml" as defined in [RFC3236]. For further information on using media types with XHTML Family markup languages, see the informative note [XHTML-MEDIA-TYPES].

2.2 User Agent Conformance

A conforming user agent MUST support all of the features required in this specification. A conforming user agent must also support the User Agent conformance requirements as defined in XHTML Modularization [XHTML-MODULARIZATION11-2e] section on "XHTML Family User Agent Conformance".

3. Additional RDFa Processing Rules

Documents conforming to the rules in this specification are processed according to [RDFA-CORE] with the following extensions:

When an XHTML+RDFa document uses @version on the html element, a conforming RDFa Processor MUST examine the value of this attribute. If the value matches that of a defined version of XHTML+RDFa, then the processing rules for that version MUST be used. If the value does not match a defined version, or there is no @version attribute, then the processing rules for the most recent version of XHTML+RDFa must be used.

4. XHTML+RDFa 1.1 Definition

The XHTML+RDFa 1.1 document type is a fully functional document type with rich semantics. It is a superset of [XHTML11-2e].

The XHTML+RDFa 1.1 document type is made up of the following XHTML modules. The elements, attributes, and content models associated with these modules are defined in "XHTML Modularization" [XHTML-MODULARIZATION11-2e]. The elements are listed here for information purposes, but the definitions in XHTML Modularization should be considered authoritative.

Structure Module
body, head, html, title.
Text Module
abbr, acronym, address, blockquote, br, cite, code, dfn, div, em, h1, h2, h3, h4, h5, h6, kbd, p, pre, q, samp, span, strong, var
Hypertext Module
a. @href is available on all elements.
List Module
dl, dt, dd, ol, ul, li
Object Module
object, param
Presentation Module
b, big, hr, i, small, sub, sup, tt
Edit Module
del, ins
Bidirectional Text Module
bdo
Forms Module
button, fieldset, form, input, label, legend, select, optgroup, option, textarea
Table Module
caption, col, colgroup, table, tbody, td, tfoot, th, thead, tr
Image Module
img
Client-side Image Map Module
area, map
Server-side Image Map Module
Attribute ismap on img
Intrinsic Events Module
Events attributes
Metainformation Module
meta
Scripting Module
noscript, script
Stylesheet Module
style element
Style Attribute Module Deprecated
@style
Target Module
@target
Link Module
link
Base Module
base
Metainformation Attributes Module
@about, @content, @datatype, @inlist, @typeof, @prefix, @property, @rel, @resource, @rev, @vocab are available on all elements.
Ruby Annotation Module from [RUBY]
ruby, rbc, rtc, rb, rt, rp

This specification also adds the lang attribute to the I18N attribute collection as defined in [XHTML-MODULARIZATION11-2e]. The lang attribute is defined in [HTML5]. When this attribute and the xml:lang attribute are specified on the same element, the xml:lang attribute takes precedence. When both lang and xml:lang are specified on the same element, they MUST have the same value.

There are no additional definitions required by this document type. An implementation of this document type as an XML Schema is defined in Appendix A, and as an XML DTD is defined in Appendix B.

5. Metainformation Attributes Module

The Metainformation Attributes Module defines the Metainformation attribute collection in the format required by [XHTML-MODULARIZATION11-2e]. This collection allows elements to be annotated with metadata throughout an XHTML Family document. When this module is included in a markup language, this collection is added to the Common attribute collection as defined in [XHTML-MODULARIZATION11-2e].

5.1 Metainformation Attributes Collection

The following attributes are included in the attribute collection, and take values in the associated datatype:

Metainformation Attribute Collection
Attributes Notes
about (SafeCURIEorCURIEorIRI)  
content (CDATA)  
datatype (TERMorCURIEorAbsIRI) If not specified, then the default value is string as defined in [XMLSCHEMA11-2].
inlist (CDATA)  
prefix ( NCName ': ' IRI )+  
property (TERMorCURIEorAbsIRIs)  
rel (TERMorCURIEorAbsIRIs)
resource (SafeCURIEorCURIEorIRI)  
rev (TERMorCURIEorAbsIRIs)
typeof (TERMorCURIEorAbsIRIs)  
vocab (IRI) An IRI that defines the prefix to use when a CURIE is specified with no prefix and no colon.

An implementation of this module in XML Schema can be found in Appendix A and in XML DTD in Appendix B.

5.2 XHTML RDFa Initial Context

This section is non-normative.

This specification defines an RDFa Initial Context. It is available at http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1.

A. XHTML+RDFa XML Schema

This appendix is normative.

This appendix includes an implementation of the XHTML+RDFa 1.1 language using XML Schema. It is implemented by combining the XHTML 1.1 Schema with the XHTML Metainformation Attribute Module. This is done by using a content model module, and then a driver module. There are direct links to the various files for download purposes. Please note that the files targeted by the "latest version" links may change slowly over time. See the W3C XHTML2 Working Group home page for more information.

A.1 XHTML Metainformation Attributes Module

You can download this version of this file from SCHEMA/xhtml-metaAttributes-2.xsd. The latest version is available at http://www.w3.org/MarkUp/SCHEMA/xhtml-metaAttributes-2.xsd.



  
  
    
      This is the XML Schema Metainformation Attributes module for XHTML

      $Id: Overview.html,v 1.3 2018/01/23 15:25:37 denis Exp $
    
    
  

  
    
      XHTML Metainformation Attributes
    
  

  
  
  
  
  
  
  
  
  
  
  

  
    
    
    
    
    
    
    
    
    
    
    
  


A.2 XHTML+RDFa Schema Content Model Module

You can download this version of this file from SCHEMA/xhtml-rdfa-model-2.xsd. The latest version is available at http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-model-2.xsd.



    
    
         
            This is the XML Schema module of common content models for XHTML11 
            
            $Id: Overview.html,v 1.3 2018/01/23 15:25:37 denis Exp $ 
        
        
    
    
         
            XHTML Document Model 
            This module describes the groupings of elements/attributes 
            that make up common content models for XHTML elements. 
            XHTML has following basic content models: 
               xhtml.Inline.mix; character-level elements
               xhtml.Block.mix; block-like elements, e.g., paragraphs and lists
               xhtml.Flow.mix; any block or inline elements 
               xhtml.HeadOpts.mix; Head Elements 
               xhtml.InlinePre.mix; Special class for pre content model 
               xhtml.InlineNoAnchor.mix; Content model for Anchor 
            
            Any groups declared in this module may be used to create 
            element content models, but the above are considered 'global' 
            (insofar as that term applies here). XHTML has the
            following Attribute Groups 
               xhtml.Core.extra.attrib 
               xhtml.I18n.extra.attrib
               xhtml.Common.extra 
            
            The above attribute Groups are considered Global 
        
    
    
        
            
        XHTML Metainformation Modules

        Attributes defined here:
          XHTML RDFa attribtues
      
            
        
    
    
        
             Extended I18n attribute 
        
        
            
                 
                "dir" Attribute from Bi Directional Text (bdo) Module
                
            
        
    
    
        
             Extended Common Attributes 
        
        
            
                 
                "style" attribute from Inline Style Module 
                
            
        
    	
			
				 
				Attributes from Events Module
				
			
		
    	
			
				 
				Attributes from Metainformation Module
				
			
		
	
    
        
             Extend Core Attributes 
        
    
    
        
             Extended Global Core Attributes 
        
    
    
        
             Extended Global I18n attributes 
        
    
    
        
             Extended Global Common Attributes 
        
    
    
        
    
    
        
            script"
                type="xhtml.script.type"/>
            style"
                type="xhtml.style.type"/>
            meta"
                type="xhtml.meta.type"/>
            link"
                type="xhtml.link.type"/>
            object"
                type="xhtml.object.type"/>
            
        
    
    
        
            
            
                
                    title"
                        minOccurs="1"
                        maxOccurs="1"
                        type="xhtml.title.type"/>
                    
                    
                        base"
                            type="xhtml.base.type"/>
                        
                    
                
                
                    base"
                        type="xhtml.base.type"
                        minOccurs="1"
                        maxOccurs="1"/>
                    
                    title"
                        minOccurs="1"
                        maxOccurs="1"
                        type="xhtml.title.type"/>
                    
                
            
        
    
    
    
        
            ins"
                type="xhtml.edit.type"/>
            del"
                type="xhtml.edit.type"/>
        
    
    
    
        
            script"
                type="xhtml.script.type"/>
            noscript"
                type="xhtml.noscript.type"/>
        
    
    
        
    
    
    
        
            
            
            
        
    
    
    
        
            br"
                type="xhtml.br.type"/>
            span"
                type="xhtml.span.type"/>
        
    
    
        
            em"
                type="xhtml.em.type"/>
            strong"
                type="xhtml.strong.type"/>
            dfn"
                type="xhtml.dfn.type"/>
            code"
                type="xhtml.code.type"/>
            samp"
                type="xhtml.samp.type"/>
            kbd"
                type="xhtml.kbd.type"/>
            var"
                type="xhtml.var.type"/>
            cite"
                type="xhtml.cite.type"/>
            abbr"
                type="xhtml.abbr.type"/>
            acronym"
                type="xhtml.acronym.type"/>
            q"
                type="xhtml.q.type"/>
        
    
    
        
            tt"
                type="xhtml.InlPres.type"/>
            i"
                type="xhtml.InlPres.type"/>
            b"
                type="xhtml.InlPres.type"/>
            big"
                type="xhtml.InlPres.type"/>
            small"
                type="xhtml.InlPres.type"/>
            sub"
                type="xhtml.InlPres.type"/>
            sup"
                type="xhtml.InlPres.type"/>
        
    
    
        
            bdo"
                type="xhtml.bdo.type"/>
        
    
    
        
            a"
                type="xhtml.a.type"/>
        
    
    
        
            img"
                type="xhtml.img.type"/>
            map"
                type="xhtml.map.type"/>
            object"
                type="xhtml.object.type"/>
        
    
    
        
            input"
                type="xhtml.input.type"/>
            select"
                type="xhtml.select.type"/>
            textarea"
                type="xhtml.textarea.type"/>
            label"
                type="xhtml.label.type"/>
            button"
                type="xhtml.button.type"/>
        
    
    
        
    
    
        
            ruby"
                type="xhtml.ruby.type"/>
        
    
    
    
        
            
            
            
            
            
            
            
            
            
        
    
    
    
        
            
            
            
            
            
            
            
            
        
    
    
    
        
            
            
            tt"
                type="xhtml.InlPres.type"/>
            i"
                type="xhtml.InlPres.type"/>
            b"
                type="xhtml.InlPres.type"/>
            
            
            
            map"
                type="xhtml.map.type"/>
            
        
    
    
    
        
            
            
            
            
            
            
            
            
        
    
    
    
        
            
            
        
    
    
    
        
            
            
        
    
    
    
        
            
            
        
    
    
    
        
            h1"
                type="xhtml.h1.type"/>
            h2"
                type="xhtml.h2.type"/>
            h3"
                type="xhtml.h3.type"/>
            h4"
                type="xhtml.h4.type"/>
            h5"
                type="xhtml.h5.type"/>
            h6"
                type="xhtml.h6.type"/>
        
    
    
        
            ul"
                type="xhtml.ul.type"/>
            ol"
                type="xhtml.ol.type"/>
            dl"
                type="xhtml.dl.type"/>
        
    
    
        
            table"
                type="xhtml.table.type"/>
        
    
    
        
            form"
                type="xhtml.form.type"/>
        
    
    
        
            fieldset"
                type="xhtml.fieldset.type"/>
        
    
    
        
            p"
                type="xhtml.p.type"/>
            div"
                type="xhtml.div.type"/>
        
    
    
        
            pre"
                type="xhtml.pre.type"/>
            blockquote"
                type="xhtml.blockquote.type"/>
            address"
                type="xhtml.address.type"/>
        
    
    
        
            hr"
                type="xhtml.hr.type"/>
        
    
    
        
            
            
            
        
    
    
        
    
    
    
        
            
            
            
            
            
        
    
    
    
        
            
            
            
            
        
    
    
    
        
            
            
            
            
            
        
    
    
    
        
            
            
            
            
            
            
            
            
        
    
    html"
        type="xhtml.html.type"/>

A.3 XHTML+RDFa Schema Modules

You can download this version of this file from SCHEMA/xhtml-rdfa-modules-2.xsd. The latest version is available at http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-modules-2.xsd.



    
    
    
        
      This schema includes all modules for XHTML1.1 Document Type.
      $Id: Overview.html,v 1.3 2018/01/23 15:25:37 denis Exp $
    
        
    
    
        
     This schema includes all modules (and redefinitions)
     for XHTML1.1 Document Type.
     XHTML1.1 Document Type includes the following Modules

       XHTML Core modules (Required for XHTML Family Conformance)
            +  text
            +  hypertext
            +  lists
            +  structure

       Other XHTML modules
            +  Edit
            +  Bdo
            +  Presentational
            +  Link
            +  Meta
            +  Base
            +  Scripting
            +  Style
            +  Image
            +  Applet
            +  Object
            +  Param (Applet/Object modules require Param Module)
            +  Tables
            +  Target
            +  Forms
            +  Client side image maps
            +  Server side image maps

    
    
    
        
            
        Schema Framework Component Modules:
            +  notations
            +  datatypes
            +  common attributes
            +  character entities
      
            
        
    
    
        
            
        Text module

        The Text module includes declarations for all core
        text container elements and their attributes.

            +  block phrasal
            +  block structural
            +  inline phrasal
            +  inline structural

        Elements defined here:
          * address, blockquote, pre, h1, h2, h3, h4, h5, h6
          * div, p
          * abbr, acronym, cite, code, dfn, em, kbd, q, samp, strong, var
          * br, span
      
            
        
    

    
        
            
        Lists module

        Elements defined here:
          * dt, dd, dl, ol, ul, li
      
            
        
    
    
        
            
        Structural module

        Elements defined here:
          * title, head, body, html
      
            
        
        
            
                
            Redefinition by the XHTML11 Markup (for value of version attr)
         
            
            
        
        
            
                
                    
              Original Body Attlist
            
                
            
            
                
                    
              Redefinition by XHTML Event Attribute Module
            
                
            
        
          
            
            
            
            
             
        
		
		    
		    
		    
		    
		
    
    
        
            
        Edit module

        Elements defined here:
          * ins, del
      
            
        
    
    
        
            
        Bidirectional element module

        Elements defined here:
          * bdo
      
            
        
    
    
        
            
        Presentational module

         Elements defined here:
           * hr, b, big, i, small,sub, sup, tt
      
            
        
    
    
        
            
        Base module

        Elements defined here:
          * base
      
            
        
        
            
                
            Changes to XHTML base Attlist
          
            
            
                
                    
                Original Base Attributes (declared in Base Module)
             
                
            
            
                
                    
                XHTML Target Module - Attribute additions
             
                
            
        
    
    
        
            
        Scripting module

        Elements defined here:
          * script, noscript
      
            
        
    
    
        
            
        Style module

        Elements defined here:
          * style
      
            
        
    
    
        
            
        Style attribute module

        Attribute defined here:
          * style
      
            
        
    
    
        
            
        Image module

        Elements defined here:
          * img
      
            
        
        
            
                
                    
                Original Image Attributes (in Image Module)
             
                
            
            
                
                    
                Redefinition by Client Side Image Map Module
             
                
            
            
                
                    
                Redefinition by Server Side Image Module
             
                
            
        
    
    
        
            
        Client-side mage maps module

        Elements defined here:
          * area, map
      
            
        
        
            
                
                    
                Original Area Attributes (in CSI Module)
             
                
            
            
                
                    
                Redefinition by Events Attribute Module
             
                
            
            
                
                    
                Target Module - Area Attribute Additions
             
                
            
        
    
    
        
            
       Server-side image maps module

        Attributes defined here:
          * ismap on img
      
            
        
    
    
        
            
        Object module

        Elements defined here:
          * object
      
            
        
        
            
                
                    
                Original Object Attlist
              
                
            
            
                
                    
                Redefinition by Client Image Map Module
              
                
            
        
    
    
        
            
        Param module

        Elements defined here:
          * param
      
        
    
    
        
            
        Tables module

        Elements defined here:
          * table, caption, thead, tfoot, tbody, colgroup, col, tr, th, td
      
            
        
    
    
        
            
            Forms module

            Elements defined here:
              * form, label, input, select, optgroup, option,
              * textarea, fieldset, legend, button
          
            
        
        
            
                
            Changes to XHTML Form Attlist
          
            
            
                
                    
                Original Form Attributes (declared in Forms Module)
             
                
            
            
                
                    
                XHTML Events Module - Attribute additions
             
                
            
            
                
                    
                      XHTML Target Module - Attribute additions
                     
                
            
        
        
            
                
            Changes to XHTML Form Input Element
          
            
            
                
                    
                Original Input Attributes (in Forms Module)
             
                
            
            
                
                    
                Redefinition by Client Side Image Map Module
             
                
            
            
                
                    
                Redefinition by Server Side Image Map Module
             
                
            
            
                
                    
               Redefinition by Event Attribute Module
             
                
            
        
        
            
                
                    
                Original Label Attributes (in Forms Module)
             
                
            
            
                
                    
               Redefinition by Event Attribute Module
             
                
            
        
        
            
                
                    
                Original Select Attributes (in Forms Module)
             
                
            
            
                
                    
               Redefinition by Event Attribute Module
             
                
            
        
        
            
                
                    
                Original TextArea Attributes (in Forms Module)
             
                
            
            
                
                    
               Redefinition by Event Attribute Module
             
                
            
        
        
            
                
                    
                Original Button Attributes (in Forms Module)
             
                
            
            
                
                    
               Redefinition by Event Attribute Module
             
                
            
        
    
    
        
            
        Ruby module

        Elements defined here:
          * ruby, rbc, rtc, rb, rt, rp

        Note that either Ruby or Basic Ruby should be used but not both
      
            
        
    
    
        
            
        XHTML Events Modules

        Attributes defined here:
          XHTML Event Types
      
            
        
    
    
        
            
                XHTML Metainformation Modules
                
                Attributes defined here:
                XHTML RDFa attribtues
            
            
        
    
    
        
            
        XHTML Target Attribute Module

        Attributes defined here:
          target
      
            
        
    

A.4 XHTML+RDFa XML Schema Driver Module

You can download this version of this file from SCHEMA/xhtml-rdfa-2.xsd. The latest version is available at http://www.w3.org/MarkUp/SCHEMA/xhtml-rdfa-2.xsd.



    
         This is the XML Schema driver for XHTML + RDFa Please use this namespace
            for XHTML elements: "http://www.w3.org/1999/xhtml" $Id: xhtml-rdfa-1.xsd,v 1.2
            2008/07/02 13:26:46 ahby Exp $ 
        
    
    
         This is the Schema Driver file for XHTML + RDFa Document Type This schema
            + imports external schemas (xml.xsd) + refedines (and include)s schema modules for
            XHTML1.1 Document Type. + includes Schema for Named content model for the XHTML1.1
            Document Type XHTML1.1 Document Type includes the following Modules XHTML Core modules
            (Required for XHTML Family Conformance) + text + hypertext + lists + structure Other
            XHTML modules + Edit + Bdo + Presentational + Link + Meta + Base + Scripting + Style +
            Image + Applet + Object + Param (Applet/Object modules require Param Module) + Tables +
            Forms + Client side image maps + Server side image maps + Ruby 
    
    
        
             This import brings in the XML namespace attributes The XML attributes
                are used by various modules. 
        
    
    
    
        
             Document Model module for the XHTML+RDFa Document Type. This schema
                file defines all named models used by XHTML Modularization Framework for XHTML+RDFa
                Document Type 
        
    
    
        
             Schema that includes all modules (and redefinitions) for XHTML1.1
                Document Type. 
        
    
    
    
        
        
        
        
        
        
        
        
            
                
                    Redefinition by Client Side Image Map Module
                
            
        
        
            
                
                    Redefinition by XHTML Event Attribute Module
                
            
        
        
            
                
                    Target Module - A Attribute Additions
                
            
        
    
    
        
            
        
    
    
        
        
    
    
        
        
        
        
        
        
    
    
        
    
    
        
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
    
    
        
    
    
        
        
    

B. XHTML+RDFa Document Type Definition

This appendix includes an implementation of the XHTML+RDFa 1.1 language as an XML DTD. It is implemented by combining the XHTML 1.1 DTD with the XHTML Metainformation Attribute Module. This is done by using a content model module, and then a driver module. There are direct links to the various files for download purposes. Please note that the files targeted by the "latest version" links may change slowly over time. See the W3C XHTML2 Working Group home page for more information.

B.1 XHTML Metainformation Attributes Module

You can download this version of this file from DTD/xhtml-metaAttributes-2.mod. The latest version is available at http://www.w3.org/MarkUp/DTD/xhtml-metaAttributes-2.mod.





% XHTML.global.attrs.prefixed "IGNORE" >


% CURIE.datatype "CDATA" >
% CURIEs.datatype "CDATA" >
% CURIEorIRI.datatype "CDATA" >
% CURIEorIRIs.datatype "CDATA" >
% IRI.datatype "CDATA" >
% IRIs.datatype "CDATA" >
% PREFIX.datatype "CDATA" >
% SafeCURIEorCURIEorIRI.datatype "CDATA" >
% SafeCURIEorCURIEorIRIs.datatype "CDATA" >
% TERMorCURIEorAbsIRI.datatype "CDATA" >
% TERMorCURIEorAbsIRIs.datatype "CDATA" >




% about.attrib
     "about        %SafeCURIEorCURIEorIRI.datatype;             #IMPLIED"
>

% XHTML.global.about.attrib
     "%XHTML.prefix;:about   %SafeCURIEorCURIEorIRI.datatype;    #IMPLIED"
>
]]>

% typeof.attrib
     "typeof        %TERMorCURIEorAbsIRIs.datatype;             #IMPLIED"
>

% XHTML.global.typeof.attrib
     "%XHTML.prefix;:typeof           %TERMorCURIEorAbsIRIs.datatype;        #IMPLIED"
>
]]>

% property.attrib
     "property        %TERMorCURIEorAbsIRIs.datatype;             #IMPLIED"
>

% XHTML.global.property.attrib
     "%XHTML.prefix;:property           %TERMorCURIEorAbsIRIs.datatype;        #IMPLIED"
>
]]>

% resource.attrib
     "resource        %SafeCURIEorCURIEorIRI.datatype;             #IMPLIED"
>

% XHTML.global.resource.attrib
     "%XHTML.prefix;:resource           %SafeCURIEorCURIEorIRI.datatype;        #IMPLIED"
>
]]>

% content.attrib
     "content        CDATA             #IMPLIED"
>

% XHTML.global.content.attrib
     "%XHTML.prefix;:content           CDATA        #IMPLIED"
>
]]>

% datatype.attrib
     "datatype        %TERMorCURIEorAbsIRI.datatype;             #IMPLIED"
>

% XHTML.global.datatype.attrib
     "%XHTML.prefix;:datatype           %TERMorCURIEorAbsIRI.datatype;        #IMPLIED"
>
]]>

% inlist.attrib
     "inlist        CDATA             #IMPLIED"
>

% XHTML.global.inlist.attrib
     "%XHTML.prefix;:inlist           CDATA        #IMPLIED"
>
]]>

% rel.attrib
     "rel        %TERMorCURIEorAbsIRIs.datatype;             #IMPLIED"
>

% XHTML.global.rel.attrib
     "%XHTML.prefix;:rel           %TERMorCURIEorAbsIRIs.datatype;        #IMPLIED"
>
]]>

% rev.attrib
     "rev        %TERMorCURIEorAbsIRIs.datatype;             #IMPLIED"
>

% XHTML.global.rev.attrib
     "%XHTML.prefix;:rev           %TERMorCURIEorAbsIRIs.datatype;        #IMPLIED"
>
]]>

% prefix.attrib
     "prefix        %PREFIX.datatype;             #IMPLIED"
>

% XHTML.global.prefix.attrib
     "%XHTML.prefix;:prefix           %PREFIX.datatype;        #IMPLIED"
>
]]>

% vocab.attrib
     "vocab        %IRI.datatype;             #IMPLIED"
>

% XHTML.global.vocab.attrib
     "%XHTML.prefix;:vocab           %IRI.datatype;        #IMPLIED"
>
]]>

% Metainformation.extra.attrib "" >

% Metainformation.attrib
     "%about.attrib;
      %content.attrib;
      %datatype.attrib;
	  %inlist.attrib;
      %typeof.attrib;
      %prefix.attrib;
      %property.attrib;
      %rel.attrib;
      %resource.attrib;
      %rev.attrib;
      %vocab.attrib;
      %Metainformation.extra.attrib;"
>

% XHTML.global.metainformation.extra.attrib "" >

% XHTML.global.metainformation.attrib
     "%XHTML.global.about.attrib;
      %XHTML.global.content.attrib;
      %XHTML.global.datatype.attrib;
      %XHTML.global.inlist.attrib;
      %XHTML.global.typeof.attrib;
      %XHTML.global.prefix.attrib;
      %XHTML.global.property.attrib;
      %XHTML.global.rel.attrib;
      %XHTML.global.resource.attrib;
      %XHTML.global.rev.attrib;
      %XHTML.global.vocab.attrib;
      %XHTML.global.metainformation.extra.attrib;"
>
]]>

% XHTML.global.metainformation.attrib "" >



B.2 XHTML+RDFa Content Model Module

You can download this version of this file from DTD/xhtml-rdfa-model-2.mod. The latest version is available at http://www.w3.org/MarkUp/DTD/xhtml-rdfa-model-2.mod.










% HeadOpts.mix
     "( %script.qname; | %style.qname; | %meta.qname;
      | %link.qname; | %object.qname; )*"
>




% Edit.class "| %ins.qname; | %del.qname;" >


% Script.class "| %script.qname; | %noscript.qname;" >

% Misc.extra "" >


% Misc.class
     "%Edit.class;
      %Script.class;
      %Misc.extra;"
>



% InlStruct.class "%br.qname; | %span.qname;" >

% InlPhras.class
     "| %em.qname; | %strong.qname; | %dfn.qname; | %code.qname;
      | %samp.qname; | %kbd.qname; | %var.qname; | %cite.qname;
      | %abbr.qname; | %acronym.qname; | %q.qname;" >

% InlPres.class
     "| %tt.qname; | %i.qname; | %b.qname; | %big.qname;
      | %small.qname; | %sub.qname; | %sup.qname;" >

% I18n.class "| %bdo.qname;" >

% Anchor.class "| %a.qname;" >

% InlSpecial.class
     "| %img.qname; | %map.qname;
      | %object.qname;" >

% InlForm.class
     "| %input.qname; | %select.qname; | %textarea.qname;
      | %label.qname; | %button.qname;" >

% Inline.extra "" >

% Ruby.class "| %ruby.qname;" >


% Inline.class
     "%InlStruct.class;
      %InlPhras.class;
      %InlPres.class;
      %I18n.class;
      %Anchor.class;
      %InlSpecial.class;
      %InlForm.class;
      %Ruby.class;
      %Inline.extra;"
>


% InlNoRuby.class
     "%InlStruct.class;
      %InlPhras.class;
      %InlPres.class;
      %I18n.class;
      %Anchor.class;
      %InlSpecial.class;
      %InlForm.class;
      %Inline.extra;"
>


% NoRuby.content
     "( #PCDATA
      | %InlNoRuby.class;
      %Misc.class; )*"
>


% InlNoAnchor.class
     "%InlStruct.class;
      %InlPhras.class;
      %InlPres.class;
      %I18n.class;
      %InlSpecial.class;
      %InlForm.class;
      %Ruby.class;
      %Inline.extra;"
>


% InlNoAnchor.mix
     "%InlNoAnchor.class;
      %Misc.class;"
>


% Inline.mix
     "%Inline.class;
      %Misc.class;"
>





% Heading.class
     "%h1.qname; | %h2.qname; | %h3.qname;
      | %h4.qname; | %h5.qname; | %h6.qname;" >

% List.class "%ul.qname; | %ol.qname; | %dl.qname;" >

% Table.class "| %table.qname;" >

% Form.class  "| %form.qname;" >

% Fieldset.class  "| %fieldset.qname;" >

% BlkStruct.class "%p.qname; | %div.qname;" >

% BlkPhras.class
     "| %pre.qname; | %blockquote.qname; | %address.qname;" >

% BlkPres.class "| %hr.qname; " >

% BlkSpecial.class
     "%Table.class;
      %Form.class;
      %Fieldset.class;"
>

% Block.extra "" >


% Block.class
     "%BlkStruct.class;
      %BlkPhras.class;
      %BlkPres.class;
      %BlkSpecial.class;
      %Block.extra;"
>


% Block.mix
     "%Heading.class;
      | %List.class;
      | %Block.class;
      %Misc.class;"
>




% Flow.mix
     "%Heading.class;
      | %List.class;
      | %Block.class;
      | %Inline.class;
      %Misc.class;"
>

B.3 XHTML+RDFa Driver Module

You can download this version of this file from DTD/xhtml-rdfa-2.dtd. The latest version is available at http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd.







% XHTML.version  "XHTML+RDFa 1.1" >


% NS.prefixed "IGNORE" >
% XHTML.prefix "xhtml" >


% XHTML.global.attrs.prefixed "INCLUDE" >


% XLINK.xmlns "" >
% XLINK.xmlns.attrib "" >




% XHTML.profile  "" >


% xhtml-notations.module "IGNORE" >


% XHTML.bidi  "INCLUDE" >





% xhtml-prefw-redecl.module "IGNORE" >
% xhtml-prefw-redecl.mod "" >
]]>


% xhtml-datatypes.module "INCLUDE" >
% xhtml-datatypes.mod
     PUBLIC "-//W3C//ENTITIES XHTML Datatypes 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-datatypes-1.mod" >
%xhtml-datatypes.mod;]]>


% xhtml-metaAttributes.module "INCLUDE" >
% xhtml-metaAttributes.mod
     PUBLIC "-//W3C//ENTITIES XHTML MetaAttributes 1.1//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-metaAttributes-2.mod" >
%xhtml-metaAttributes.mod;]]>

% xhtml-events.module "INCLUDE" >

% Common.extra.attrib
   "href         %URI.datatype;           #IMPLIED
    %Metainformation.attrib;"
>


% lang.attrib
     "xml:lang     %LanguageCode.datatype;  #IMPLIED
      lang         %LanguageCode.datatype;  #IMPLIED"
>


% xhtml-inlstyle.module "INCLUDE" >
% xhtml-inlstyle.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Inline Style 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-inlstyle-1.mod" >
%xhtml-inlstyle.mod;]]>


% xhtml-model.mod
     PUBLIC "-//W3C//ENTITIES XHTML+RDFa Document Model 1.1//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-model-2.mod" >


% xhtml-framework.module "INCLUDE" >
% xhtml-framework.mod
     PUBLIC "-//W3C//ENTITIES XHTML Modular Framework 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-framework-1.mod" >
%xhtml-framework.mod;]]>



% xhtml-postfw-redecl.module "IGNORE" >
% xhtml-postfw-redecl.mod "">
]]>




% xhtml-text.module "INCLUDE" >
% xhtml-text.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Text 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-text-1.mod" >
%xhtml-text.mod;]]>


% a.attlist  "IGNORE" >
% xhtml-hypertext.module "INCLUDE" >
% xhtml-hypertext.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Hypertext 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-hypertext-1.mod" >
%xhtml-hypertext.mod;]]>



% xhtml-list.module "INCLUDE" >
% xhtml-list.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Lists 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-list-1.mod" >
%xhtml-list.mod;]]>




% xhtml-edit.module "INCLUDE" >
% xhtml-edit.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Editing Elements 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-edit-1.mod" >
%xhtml-edit.mod;]]>


% xhtml-bdo.module "%XHTML.bidi;" >
% xhtml-bdo.mod
     PUBLIC "-//W3C//ELEMENTS XHTML BIDI Override Element 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-bdo-1.mod" >
%xhtml-bdo.mod;]]>


% Ruby.common.attlists "INCLUDE" >
% Ruby.common.attrib "%Common.attrib;" >
% xhtml-ruby.module "INCLUDE" >
% xhtml-ruby.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Ruby 1.0//EN"
            "http://www.w3.org/TR/ruby/xhtml-ruby-1.mod" >
%xhtml-ruby.mod;]]>


% xhtml-pres.module "INCLUDE" >
% xhtml-pres.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Presentation 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-pres-1.mod" >
%xhtml-pres.mod;]]>

% link.attlist  "IGNORE" >

% xhtml-link.module "INCLUDE" >
% xhtml-link.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Link Element 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-link-1.mod" >
%xhtml-link.mod;]]>




% meta.attlist  "IGNORE" >
% xhtml-meta.module "INCLUDE" >
% xhtml-meta.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Metainformation 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-meta-1.mod" >
%xhtml-meta.mod;]]>



% xhtml-base.module "INCLUDE" >
% xhtml-base.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Base Element 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-base-1.mod" >
%xhtml-base.mod;]]>


% script.attlist  "IGNORE" >
% xhtml-script.module "INCLUDE" >
% xhtml-script.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Scripting 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-script-1.mod" >
%xhtml-script.mod;]]>




% style.attlist  "IGNORE" >
% xhtml-style.module "INCLUDE" >
% xhtml-style.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Style Sheets 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-style-1.mod" >
%xhtml-style.mod;]]>



% xhtml-image.module "INCLUDE" >
% xhtml-image.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Images 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-image-1.mod" >
%xhtml-image.mod;]]>


% area.attlist  "IGNORE" >

% xhtml-csismap.module "INCLUDE" >
% xhtml-csismap.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Client-side Image Maps 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-csismap-1.mod" >
%xhtml-csismap.mod;]]>




% xhtml-ssismap.module "INCLUDE" >
% xhtml-ssismap.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Server-side Image Maps 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-ssismap-1.mod" >
%xhtml-ssismap.mod;]]>


% param.attlist  "IGNORE" >
% xhtml-param.module "INCLUDE" >
% xhtml-param.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Param Element 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-param-1.mod" >
%xhtml-param.mod;]]>



% xhtml-object.module "INCLUDE" >
% xhtml-object.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Embedded Object 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-object-1.mod" >
%xhtml-object.mod;]]>


% xhtml-table.module "INCLUDE" >
% xhtml-table.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Tables 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-table-1.mod" >
%xhtml-table.mod;]]>


% xhtml-form.module "INCLUDE" >
% xhtml-form.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Forms 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-form-1.mod" >
%xhtml-form.mod;]]>


% xhtml-target.module "INCLUDE" >
% xhtml-target.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Target 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-target-1.mod" >
%xhtml-target.mod;]]>


% xhtml-legacy.module "IGNORE" >
% xhtml-legacy.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Legacy Markup 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-legacy-1.mod" >
%xhtml-legacy.mod;]]>


% html.attlist  "IGNORE" >
% head.attlist  "IGNORE" >
% title.attlist  "IGNORE" >
% xhtml-struct.module "INCLUDE" >
% xhtml-struct.mod
     PUBLIC "-//W3C//ELEMENTS XHTML Document Structure 1.0//EN"
            "http://www.w3.org/MarkUp/DTD/xhtml-struct-1.mod" >
%xhtml-struct.mod;]]>
% XHTML.version.attrib
     "version      %FPI.datatype;           #FIXED '%XHTML.version;'"
>






B.4 SGML Open Catalog Entry for XHTML+RDFa

This section contains the SGML Open Catalog-format definition [SGML-CATALOG] of the public identifiers for XHTML+RDFa 1.1.

You can download this version of this file from DTD/xhtml-rdfa.cat. The latest version is available at http://www.w3.org/MarkUp/DTD/xhtml-rdfa.cat.

-- .......................................................................... --
-- File catalog  ............................................................ --

--  XHTML+RDFa Catalog Data File

    Revision:  $Revision: 1.3 $

    See "Entity Management", SGML Open Technical Resolution 9401 for detailed
    information on supplying and using catalog data. This document is available
    from OASIS at URL:

        
--

-- .......................................................................... --
-- SGML declaration associated with XHTML  .................................. --

OVERRIDE YES

SGMLDECL "xml1.dcl"

-- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: --

-- XHTML+RDFa modules          .............................................. --


PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN"       "xhtml-rdfa-2.dtd"


PUBLIC "-//W3C//ENTITIES XHTML+RDFa Document Model 1.1//EN"      "xhtml-rdfa-model-2.mod"

PUBLIC "-//W3C//ENTITIES XHTML MetaAttributes 1.1//EN"           "xhtml-metaAttributes-2.mod"

-- End of catalog data  ..................................................... --
-- .......................................................................... --

C. Deployment Advice

This section is non-normative.

Documents written using the markup language defined in this specification can be validated using the DTD defined in Appendix B. If a document author wants to facilitate such validation, they may include the following declaration at the top of their document:

Example 2

The XML Namespace document associated with the XHTML Family of markup languages uses the mechanism for transforming XHTML+RDFa documents into RDF as defined by [GRDDL]. Authors who want to be certain their documents are transformable by all [GRDDL] processors may also include a profile attribute on the head element that includes a reference to the RDFa Initial Context IRI http://www.w3.org/2011/rdfa-context/xhtml-rdfa-1.1.

D. Change History

This section is non-normative.

2010-02-25: First version of the split-out XHTML specialization.

E. Acknowledgments

This section is non-normative.

At the time of publication, the members of the RDFa Working Group were:

F. References

F.1 Normative references

[HTML5]
Ian Hickson; Robin Berjon; Steve Faulkner; Travis Leithead; Erika Doyle Navara; Theresa O'Connor; Silvia Pfeiffer. HTML5. 28 October 2014. W3C Recommendation. URL: http://www.w3.org/TR/html5/
[RDFA-CORE]
Shane McCarron et al. RDFa Core 1.1 - Third Edition: Syntax and processing rules for embedding RDF through attributes. 17 March 2015. W3C Recommendation. URL: http://www.w3.org/TR/rdfa-core/
[RFC2119]
S. Bradner. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://tools.ietf.org/html/rfc2119
[RFC3236]
M. Baker; P. Stark. The 'application/xhtml+xml' Media Type. January 2002. Informational. URL: https://tools.ietf.org/html/rfc3236
[RUBY]
Marcin Sawicki; Michel Suignard; Masayasu Ishikawa; Martin Dürst; Tex Texin et al. Ruby Annotation. 31 May 2001. W3C Recommendation. URL: http://www.w3.org/TR/ruby/
[XHTML-MODULARIZATION11-2e]
Shane McCarron et al. XHTML™ Modularization 1.1 - Second Edition. 29 July 2010. W3C Recommendation. URL: http://www.w3.org/TR/2010/REC-xhtml-modularization-20100729
[XHTML11-2e]
Shane McCarron; Masayasu Ishikawa. XHTML™ 1.1 - Module-based XHTML - Second Edition. 23 November 2010. W3C Recommendation. URL: http://www.w3.org/TR/2010/REC-xhtml11-20101123
[XML-NAMES11]
Tim Bray; Dave Hollander; Andrew Layman; Richard Tobin et al. Namespaces in XML 1.1 (Second Edition). 16 August 2006. W3C Recommendation. URL: http://www.w3.org/TR/xml-names11/
[XMLSCHEMA11-2]
David Peterson; Sandy Gao; Ashok Malhotra; Michael Sperberg-McQueen; Henry Thompson; Paul V. Biron et al. W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes. 5 April 2012. W3C Recommendation. URL: http://www.w3.org/TR/xmlschema11-2/

F.2 Informative references

[GRDDL]
Dan Connolly. Gleaning Resource Descriptions from Dialects of Languages (GRDDL). 11 September 2007. W3C Recommendation. URL: http://www.w3.org/TR/grddl/
[RDFA-SYNTAX]
Ben Adida; Mark Birbeck; Shane McCarron; Steven Pemberton et al. RDFa in XHTML: Syntax and Processing. 14 October 2008. W3C Recommendation. URL: http://www.w3.org/TR/2008/REC-rdfa-syntax-20081014
[SGML-CATALOG]
Paul Grosso. Entity Management: OASIS Technical Resolution 9401:1997 (Amendment 2 to TR 9401) 10 september 1007. Entity Management Subcommittee, SGML Open. URL: https://www.oasis-open.org/html/a401.htm
[XHTML-MEDIA-TYPES]
Shane McCarron. XHTML Media Types - Second Edition. 16 January 2009. W3C Note. URL: http://www.w3.org/TR/xhtml-media-types