java/sql-dk/src/info/globalcode/sql/dk/formatting/XhtmlFormatter.java
branchv_0
changeset 136 c0f9521900bf
parent 135 ef432015fdee
child 137 3a24be5d8dac
equal deleted inserted replaced
135:ef432015fdee 136:c0f9521900bf
    37  * @author Ing. František Kučera (frantovo.cz)
    37  * @author Ing. František Kučera (frantovo.cz)
    38  */
    38  */
    39 public class XhtmlFormatter extends AbstractXmlFormatter {
    39 public class XhtmlFormatter extends AbstractXmlFormatter {
    40 
    40 
    41 	public static final String NAME = "xhtml"; // bash-completion:formatter
    41 	public static final String NAME = "xhtml"; // bash-completion:formatter
       
    42 	private static final String DOCTYPE = "html PUBLIC \"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN\" \"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd\"";
    42 	private static final String CSS_FILE = "info/globalcode/sql/dk/formatter/XhtmlFormatter.css";
    43 	private static final String CSS_FILE = "info/globalcode/sql/dk/formatter/XhtmlFormatter.css";
    43 	private int resultSetCounter = 0;
    44 	private int resultSetCounter = 0;
    44 	private int updatesResultCounter = 0;
    45 	private int updatesResultCounter = 0;
    45 
    46 
    46 	public XhtmlFormatter(FormatterContext formatterContext) {
    47 	public XhtmlFormatter(FormatterContext formatterContext) {
    59 
    60 
    60 	@Override
    61 	@Override
    61 	public void writeStartBatch() {
    62 	public void writeStartBatch() {
    62 		super.writeStartBatch();
    63 		super.writeStartBatch();
    63 		printStartDocument();
    64 		printStartDocument();
       
    65 		printDoctype(DOCTYPE);
    64 		Map<QName, String> attributes = new HashMap<>(1);
    66 		Map<QName, String> attributes = new HashMap<>(1);
    65 		attributes.put(qname("xmlns"), Xmlns.XHTML);
    67 		attributes.put(qname("xmlns"), Xmlns.XHTML);
    66 		printStartElement(qname("html"), attributes);
    68 		printStartElement(qname("html"), attributes);
    67 
    69 
    68 		printStartElement(qname("head"));
    70 		printStartElement(qname("head"));