Custom DTD should be reachable right?
I am working on auditing a client website and开发者_如何学JAVA they are using a custom DTD for their website and when I try to validate it fails. Then, when I try to hit the dtd directly it is not present.
Should it be?
In the HTML document, it is referenced like this:
<!DOCTYPE html SYSTEM "/web/Business/Resources/10/dtd/xhtml1-transitional-cust1.dtd">
It only needs to be accessible by the validator. It's the responsiblity of the user of the validator to ensure that it has a means to resolve the PUBLIC and/or SYSTEM parts to a DTD file. That might be at the URL of the SYSTEM part, or it might be via a local lookup table.
You are referring to a local file, because that's what the SYSTEM
part stands for. The validator has no means of finding and reading the custom DTD. What you need is PUBLIC
followed by a name and a URL.
For the sake of humanity, though. Don't use custom DTD files without good reason.
精彩评论