Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 752498

Summary: app-text/xhtml11-20101123: always use xhtml11.dtd, not xhtml11-flat.dtd
Product: Gentoo Linux Reporter: Dmitry A. Bakshaev <dab1818>
Component: Current packagesAssignee: Michał Górny <mgorny>
Status: UNCONFIRMED ---    
Severity: normal CC: jstein
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: always use xhtml11-flat.dtd

Description Dmitry A. Bakshaev 2020-11-03 11:57:06 UTC
systemId="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
must be also point to /usr/share/sgml/xhtml11/xhtml11-flat.dtd
like for publicId="-//W3C//DTD XHTML 1.1//EN"

Reproducible: Always

Steps to Reproduce:
1. create xhtml file empty.xhtml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>test</title>
 </head>
 <body/>
</html>

2. run: xmllint --valid empty.xhtml

Actual Results:  
$ time xmllint --valid empty.xhtml 
file:///usr/share/sgml/xhtml11/xhtml11.dtd:126: warning: failed to load external entity "file:///usr/share/sgml/xhtml11/xhtml-datatypes-1.mod"
%xhtml-datatypes.mod;]]>
                     ^
file:///usr/share/sgml/xhtml11/xhtml11.dtd:130: parser warning : PEReference: %LanguageCode.datatype; not found
      lang         %LanguageCode.datatype;  #IMPLIED"
                                                     ^
file:///usr/share/sgml/xhtml11/xhtml11.dtd:130: parser warning : PEReference: %LanguageCode.datatype; not found
      lang         %LanguageCode.datatype;  #IMPLIED"
                                                     ^
file:///usr/share/sgml/xhtml11/xhtml11.dtd:194: parser warning : PEReference: %Common.attrib; not found
<!ENTITY % Ruby.common.attrib "%Common.attrib;" >
                                               ^
empty.xhtml:3: element html: validity error : No declaration for attribute xmlns of element html
<html xmlns="http://www.w3.org/1999/xhtml">
                                          ^
empty.xhtml:4: element html: validity error : No declaration for element html
</html>
       ^

real	44m5,604s
user	0m0,000s
sys	0m0,010s


Expected Results:  
validated content of empty.xhtml

$ strace xmllint --valid empty.xhtml
connect(7, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("128.30.52.100")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=7, events=POLLOUT}], 1, 60000) = 1 ([{fd=7, revents=POLLOUT}])
getsockopt(7, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
send(7, "GET /MarkUp/DTD/xhtml-inlstyle-1"..., 90, 0) = 90
brk(0x887f000)                          = 0x887f000
recv(7, 0x884ed90, 4096, 0)             = -1 EAGAIN (Resource temporarily unavailable)
Comment 1 Dmitry A. Bakshaev 2020-11-03 11:59:45 UTC
Created attachment 669878 [details, diff]
always use xhtml11-flat.dtd