DocType (String elementName) { // This can contain a colon, so we use checkXMLName() // instead of checkElementName() String reason = Verifier.checkXMLName(elementName); if (reason != null) { throw new IllegalNameException(elementName, "DocType", reason); } this.elementName = elementName; return this; }