• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

OXMLi_Namespace_Common.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiSource
00004  *
00005  * Copyright (C) 2009 Firat Kiyak <firatkiyak@gmail.com>
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00020  * 02110-1301 USA.
00021  */
00022 
00023 #ifndef _OXMLI_NAMESPACE_COMMON_H_
00024 #define _OXMLI_NAMESPACE_COMMON_H_
00025 
00026 // Internal includes
00027 #include <OXML_Types.h>
00028 
00029 //abiword includes
00030 #include <ut_hash.h>
00031 
00032 
00033 //defines
00034 #define NS_R_URI "http://schemas.openxmlformats.org/officeDocument/2006/relationships"
00035 #define NS_V_URI "urn:schemas-microsoft-com:vml"
00036 #define NS_WX_URI "http://schemas.microsoft.com/office/word/2003/auxHint"
00037 #define NS_WP_URI "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"
00038 #define NS_A_URI "http://schemas.openxmlformats.org/drawingml/2006/main"
00039 #define NS_W_URI "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
00040 #define NS_VE_URI "http://schemas.openxmlformats.org/markup-compatibility/2006"
00041 #define NS_O_URI "urn:schemas-microsoft-com:office:office"
00042 #define NS_M_URI "http://schemas.openxmlformats.org/officeDocument/2006/math"
00043 #define NS_W10_URI "urn:schemas-microsoft-com:office:word"
00044 #define NS_WNE_URI "http://schemas.microsoft.com/office/word/2006/wordml"
00045 #define NS_PIC_URI "http://schemas.openxmlformats.org/drawingml/2006/picture"
00046 #define NS_XML_URI "NO_URI_FOR_XML_NAMESPACE"
00047 //more to come here
00048 
00049 #define NS_R_KEY "R"
00050 #define NS_V_KEY "V"
00051 #define NS_WX_KEY "WX"
00052 #define NS_WP_KEY "WP"
00053 #define NS_A_KEY "A"
00054 #define NS_W_KEY "W"
00055 #define NS_VE_KEY "VE"
00056 #define NS_O_KEY "O"
00057 #define NS_M_KEY "M"
00058 #define NS_W10_KEY "W10"
00059 #define NS_WNE_KEY "WNE"
00060 #define NS_PIC_KEY "PIC"
00061 #define NS_XML_KEY "xml"
00062 //more to come here
00063 
00064 
00065 class OXMLi_Namespace_Common
00066 {
00067 public:
00068     OXMLi_Namespace_Common();
00069     virtual ~OXMLi_Namespace_Common();
00070     void reset(); //should be called when we start parsing a new xml file
00071     void addNamespace(const char* ns, char* uri);
00072     std::string processName(const char* name);
00073     std::map<std::string, std::string>* processAttributes(const char* tag, const char** attributes);
00074 
00075 
00076 private:
00077     std::map<std::string, std::string> m_nsToURI;
00078     std::map<std::string, std::string> m_uriToKey;
00079     std::map<std::string, std::string> m_attsMap;
00080 
00081 };
00082 
00083 #endif //_OXMLI_NAMESPACE_COMMON_H_
00084 

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1