Edgewall Software

Opened 16 years ago

Last modified 8 years ago

#248 new enhancement

Genshi does not support the XHTML 1.1 + RDFa DOCTYPE

Reported by: Hugo Dworak Owned by: cmlenz
Priority: major Milestone: 0.9
Component: Serialization Version: 0.5
Keywords: xhtml, doctype, declaration Cc:

Description

Please add the support for XHTML 1.1 + RDFa documents.

<!DOCTYPE html PUBLIC "-W3CDTD XHTML+RDFa 1.0EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">

Change History (4)

comment:1 Changed 15 years ago by cmlenz

  • Milestone changed from 0.6 to 0.7

comment:2 Changed 15 years ago by Carsten Klein <carsten.klein@…>

Here is a small patch that would add the requested doc type to the list of known doc types.

However, I wonder if that could not be externalized so that administrators can add new doc types on the fly...

  • genshi/output.py

     
    131131    )
    132132    SVG = SVG_FULL
    133133
     134    XHTML_RTFa_1_0 = (
     135        'xhtml+rtfa_1_0', '-//W3C//DTD XHTML+RDFa 1.0//EN',
     136        'http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd'
     137    )
     138    XHTMLRTFa = XHTML_RTFa_1_0
     139
    134140    @classmethod
    135141    def get(cls, name):
    136142        """Return the ``(name, pubid, sysid)`` tuple of the ``DOCTYPE``
     
    148154         * "svg" or "svg-full" for the SVG 1.1 DTD
    149155         * "svg-basic" for the SVG Basic 1.1 DTD
    150156         * "svg-tiny" for the SVG Tiny 1.1 DTD
     157         * "xhtml+rtfa_1_0" for the XHTML + RTFa 1.0 DTD
    151158
    152159        :param name: the name of the ``DOCTYPE``
    153160        :return: the ``(name, pubid, sysid)`` tuple for the requested
     
    165172            'xhtml11': cls.XHTML11,
    166173            'svg': cls.SVG, 'svg-full': cls.SVG_FULL,
    167174            'svg-basic': cls.SVG_BASIC,
    168             'svg-tiny': cls.SVG_TINY
     175            'svg-tiny': cls.SVG_TINY,
     176            'xhtml+rtfa_1_0': cls.XHTML_RTFa_1_0
    169177        }.get(name.lower())

comment:3 Changed 14 years ago by anonymous

In the patch it should say RDF not RTF.

comment:4 Changed 8 years ago by hodgestar

  • Milestone changed from 0.7 to 0.9

Moved to milestone 0.9.

Note: See TracTickets for help on using tickets.