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