File indexing completed on 2024-05-12 15:59:59

0001 /* This file is part of the KDE project
0002    SPDX-FileCopyrightText: 2004 David Faure <faure@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "KoXmlNS.h"
0008 
0009 #include <string.h>
0010 
0011 const QString KoXmlNS::office("urn:oasis:names:tc:opendocument:xmlns:office:1.0");
0012 const QString KoXmlNS::meta("urn:oasis:names:tc:opendocument:xmlns:meta:1.0");
0013 const QString KoXmlNS::config("urn:oasis:names:tc:opendocument:xmlns:config:1.0");
0014 const QString KoXmlNS::text("urn:oasis:names:tc:opendocument:xmlns:text:1.0");
0015 const QString KoXmlNS::table("urn:oasis:names:tc:opendocument:xmlns:table:1.0");
0016 const QString KoXmlNS::draw("urn:oasis:names:tc:opendocument:xmlns:drawing:1.0");
0017 const QString KoXmlNS::presentation("urn:oasis:names:tc:opendocument:xmlns:presentation:1.0");
0018 const QString KoXmlNS::dr3d("urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0");
0019 const QString KoXmlNS::chart("urn:oasis:names:tc:opendocument:xmlns:chart:1.0");
0020 const QString KoXmlNS::form("urn:oasis:names:tc:opendocument:xmlns:form:1.0");
0021 const QString KoXmlNS::script("urn:oasis:names:tc:opendocument:xmlns:script:1.0");
0022 const QString KoXmlNS::style("urn:oasis:names:tc:opendocument:xmlns:style:1.0");
0023 const QString KoXmlNS::number("urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0");
0024 const QString KoXmlNS::manifest("urn:oasis:names:tc:opendocument:xmlns:manifest:1.0");
0025 const QString KoXmlNS::anim("urn:oasis:names:tc:opendocument:xmlns:animation:1.0");
0026 
0027 const QString KoXmlNS::math("http://www.w3.org/1998/Math/MathML");
0028 const QString KoXmlNS::svg("urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0");
0029 const QString KoXmlNS::fo("urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0");
0030 const QString KoXmlNS::dc("http://purl.org/dc/elements/1.1/");
0031 const QString KoXmlNS::xlink("http://www.w3.org/1999/xlink");
0032 const QString KoXmlNS::VL("http://openoffice.org/2001/versions-list");
0033 const QString KoXmlNS::smil("urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0");
0034 const QString KoXmlNS::xhtml("http://www.w3.org/1999/xhtml");
0035 const QString KoXmlNS::xml("http://www.w3.org/XML/1998/namespace");
0036 const QString KoXmlNS::sodipodi("http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd");
0037 const QString KoXmlNS::krita("http://krita.org/namespaces/svg/krita");
0038 
0039 const QString KoXmlNS::calligra = "http://www.calligra.org/2005/";
0040 const QString KoXmlNS::officeooo = "http://openoffice.org/2009/office";
0041 const QString KoXmlNS::ooo = "http://openoffice.org/2004/office";
0042 
0043 const QString KoXmlNS::delta("http://www.deltaxml.com/ns/track-changes/delta-namespace");
0044 const QString KoXmlNS::split("http://www.deltaxml.com/ns/track-changes/split-namespace");
0045 const QString KoXmlNS::ac("http://www.deltaxml.com/ns/track-changes/attribute-change-namespace");
0046 
0047 const char* KoXmlNS::nsURI2NS(const QString &nsURI)
0048 {
0049     if (nsURI == KoXmlNS::office)
0050         return "office";
0051     else if (nsURI == KoXmlNS::meta)
0052         return "meta";
0053     else if (nsURI == KoXmlNS::config)
0054         return "config";
0055     else if (nsURI == KoXmlNS::text)
0056         return "text";
0057     else if (nsURI == KoXmlNS::table)
0058         return "table";
0059     else if (nsURI == KoXmlNS::draw)
0060         return "draw";
0061     else if (nsURI == KoXmlNS::presentation)
0062         return "presentation";
0063     else if (nsURI == KoXmlNS::dr3d)
0064         return "dr3d";
0065     else if (nsURI == KoXmlNS::chart)
0066         return "chart";
0067     else if (nsURI == KoXmlNS::form)
0068         return "form";
0069     else if (nsURI == KoXmlNS::script)
0070         return "script";
0071     else if (nsURI == KoXmlNS::style)
0072         return "style";
0073     else if (nsURI == KoXmlNS::number)
0074         return "number";
0075     else if (nsURI == KoXmlNS::manifest)
0076         return "manifest";
0077     else if (nsURI == KoXmlNS::anim)
0078         return "anim";
0079     else if (nsURI == KoXmlNS::math)
0080         return "math";
0081     else if (nsURI == KoXmlNS::svg)
0082         return "svg";
0083     else if (nsURI == KoXmlNS::fo)
0084         return "fo";
0085     else if (nsURI == KoXmlNS::dc)
0086         return "dc";
0087     else if (nsURI == KoXmlNS::xlink)
0088         return "xlink";
0089     else if (nsURI == KoXmlNS::VL)
0090         return "VL";
0091     else if (nsURI == KoXmlNS::smil)
0092         return "smil";
0093     else if (nsURI == KoXmlNS::xhtml)
0094         return "xhtml";
0095     else if (nsURI == KoXmlNS::calligra)
0096         return "calligra";
0097     else if (nsURI == KoXmlNS::officeooo)
0098         return "officeooo";
0099     else if (nsURI == KoXmlNS::xml)
0100         return "xml";
0101 
0102     // Shouldn't happen.
0103     return "";
0104 }
0105