问题
The XHTML 1.1 modular DTD at https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd defines the style module like this:
<!-- Style Sheets Module ......................................... -->
<!ENTITY % xhtml-style.module "INCLUDE" >
<![%xhtml-style.module;[
<!ENTITY % 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;]]>
But the actual file at http://www.w3.org/MarkUp/DTD/xhtml-style-1.mod defines the public identifier differently in its comments:
This DTD module is identified by the PUBLIC and SYSTEM identifiers:
PUBLIC "-//W3C//DTD XHTML Style Sheets 1.0//EN"
SYSTEM "http://www.w3.org/MarkUp/DTD/xhtml-style-1.mod"
As -//W3C//DTD XHTML Style Sheets 1.0//EN
isn't consistent with all the other module public identifiers, I wonder if it's a typo.
Interestingly an old version I have of the XHTML 1.1 DTD includes the header from xhtml-style-1.mod
in a comment, actually indicates the consistent public identifier when referencing the file:
<!-- Style Sheets Module ......................................... -->
<!ENTITY % xhtml-style.module "INCLUDE" >
<![%xhtml-style.module;[
<!ENTITY % xhtml-style.mod
PUBLIC "-//W3C//ELEMENTS XHTML Style Sheets 1.0//EN"
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-style-1.mod" >
<!-- ...................................................................... -->
<!-- XHTML Document Style Sheet Module .................................... -->
<!-- file: xhtml-style-1.mod
This is XHTML, a reformulation of HTML as a modular XML application.
Copyright 1998-2001 W3C (MIT, INRIA, Keio), All Rights Reserved.
Revision: $Id: xhtml-style-1.mod,v 4.0 2001/04/02 22:42:49 altheim Exp $ SMI
This DTD module is identified by the PUBLIC and SYSTEM identifiers:
PUBLIC "-//W3C//DTD XHTML Style Sheets 1.0//EN"
SYSTEM "http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-style-1.mod"
Revisions:
(none)
....................................................................... -->
<!-- Style Sheets
style
This module declares the style element type and its attributes,
used to embed stylesheet information in the document head element.
-->
The most recent version of the XHTML 1.1 DTD at https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd doesn't even include the module header comments.
<!-- Style Sheets Module ......................................... -->
<!ENTITY % xhtml-style.module "INCLUDE" >
<![%xhtml-style.module;[
<!ENTITY % 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;]]>
So is -//W3C//DTD XHTML Style Sheets 1.0//EN
a typo, and can this public identifier safely be ignored?
来源:https://stackoverflow.com/questions/60568097/typo-in-xhtml-1-1-style-sheets-module