00001 /* -*-mode:c++; c-file-style: "gnu";-*- */ 00002 /* 00003 * $Id: XHTMLDoctype.h,v 1.2 2014/04/23 20:55:10 sebdiaz Exp $ 00004 * 00005 * Copyright (C) 1996 - 2004 Stephen F. Booth <sbooth@gnu.org> 00006 * 2007 David Roberts 00007 2007 Sebastien DIAZ <sebastien.diaz@gmail.com> 00008 * Part of the GNU cgicc library, http://www.gnu.org/software/cgicc 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 3 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with this library; if not, write to the Free Software 00022 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 00023 */ 00024 #ifndef XXHTMLDoctype_H 00025 #define XXHTMLDoctype_H 00026 00033 #include <string> 00034 00035 #include <MStreamable.h> 00036 00037 namespace cgicc { 00038 00044 class CGICC_API XHTMLDoctype : public MStreamable { 00045 public: 00046 enum EDocumentType { 00047 eStrict, 00048 eTransitional, 00049 eFrames, 00050 eHTML5 // 11.30.14 t.o. 00051 }; 00052 // ============================================================ 00053 00056 00063 XHTMLDoctype(EDocumentType type = eStrict); 00069 virtual ~XHTMLDoctype(); 00070 00072 00073 virtual void render(std::ostream& out) const; 00074 00075 private: 00076 EDocumentType fType; 00077 }; 00078 }// namespace cgicc 00079 00081 #define xmlnsXHTML() set("xmlns", "http://www.w3.org/1999/xhtml") 00082 00083 #endif