how to disable dtd at runtime in java’s xpath?

You should be able to specify your own EntityResolver, or use specific features of your parser? See here for some approaches. A more complete example: <?xml version=”1.0″?> <!DOCTYPE foo PUBLIC “//FOO//” “foo.dtd”> <foo> <bar>Value</bar> </foo> And xpath usage: import java.io.File; import java.io.IOException; import java.io.StringReader; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathFactory; import org.w3c.dom.Document; import … Read more

How to get “position:fixed” css to work in IE 7+ with TRANSITIONAL doctype?

You don’t need a Strict DOCTYPE for fixed support. You only need a DOCTYPE that triggers Standards Mode (or ‘almost standards’). That can be a transitional doctype such as: <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> or XHTML: <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”> as long as the system ID (the URI … Read more

Uppercase or lowercase doctype?

In HTML, the DOCTYPE is case insensitive. The following DOCTYPEs are all valid: <!doctype html> <!DOCTYPE html> <!DOCTYPE HTML> <!DoCtYpE hTmL> In XML serializations (i.e. XHTML) the DOCTYPE is not required, but if you use it, DOCTYPE should be uppercase: <!DOCTYPE html> See The XML serialization of HTML5, aka ‘XHTML5’: Note that if you don’t … Read more