From f0510d2f90467de8e8f260b47d79a9baaf9bef17 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 17 Sep 2009 07:15:29 +0200 Subject: Start tracking XSD with git --- libxsd/xsd/cxx/xml/bits/literals.ixx | 261 +++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) create mode 100644 libxsd/xsd/cxx/xml/bits/literals.ixx (limited to 'libxsd/xsd/cxx/xml/bits/literals.ixx') diff --git a/libxsd/xsd/cxx/xml/bits/literals.ixx b/libxsd/xsd/cxx/xml/bits/literals.ixx new file mode 100644 index 0000000..827d922 --- /dev/null +++ b/libxsd/xsd/cxx/xml/bits/literals.ixx @@ -0,0 +1,261 @@ +// file : xsd/cxx/xml/bits/literals.ixx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2009 Code Synthesis Tools CC +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef XSD_CXX_XML_BITS_LITERALS_IXX +#define XSD_CXX_XML_BITS_LITERALS_IXX + +#endif // XSD_CXX_XML_BITS_LITERALS_IXX + + +#if defined(XSD_USE_CHAR) || !defined(XSD_USE_WCHAR) + +#ifndef XSD_CXX_XML_BITS_LITERALS_IXX_CHAR +#define XSD_CXX_XML_BITS_LITERALS_IXX_CHAR + +namespace xsd +{ + namespace cxx + { + namespace xml + { + namespace bits + { + template <> + inline const char* + xml_prefix () + { + return "xml"; + } + + template <> + inline const char* + xml_namespace () + { + return "http://www.w3.org/XML/1998/namespace"; + } + + template <> + inline const char* + xmlns_prefix () + { + return "xmlns"; + } + + template <> + inline const char* + xmlns_namespace () + { + return "http://www.w3.org/2000/xmlns/"; + } + + template <> + inline const char* + xsi_prefix () + { + return "xsi"; + } + + template <> + inline const char* + xsi_namespace () + { + return "http://www.w3.org/2001/XMLSchema-instance"; + } + + template <> + inline const char* + type () + { + return "type"; + } + + template <> + inline const char* + nil () + { + return "nil"; + } + + template <> + inline const char* + schema_location () + { + return "schemaLocation"; + } + + template <> + inline const char* + no_namespace_schema_location () + { + return "noNamespaceSchemaLocation"; + } + + template <> + inline const char* + first_prefix () + { + return "p1"; + } + + template <> + inline const char* + second_prefix () + { + return "p2"; + } + + template <> + inline const char* + third_prefix () + { + return "p3"; + } + + template <> + inline const char* + fourth_prefix () + { + return "p4"; + } + + template <> + inline const char* + fifth_prefix () + { + return "p5"; + } + } + } + } +} + +#endif // XSD_CXX_XML_BITS_LITERALS_IXX_CHAR +#endif // XSD_USE_CHAR + + +#if defined(XSD_USE_WCHAR) || !defined(XSD_USE_CHAR) + +#ifndef XSD_CXX_XML_BITS_LITERALS_IXX_WCHAR +#define XSD_CXX_XML_BITS_LITERALS_IXX_WCHAR + +namespace xsd +{ + namespace cxx + { + namespace xml + { + namespace bits + { + template <> + inline const wchar_t* + xml_prefix () + { + return L"xml"; + } + + template <> + inline const wchar_t* + xml_namespace () + { + return L"http://www.w3.org/XML/1998/namespace"; + } + + template <> + inline const wchar_t* + xmlns_prefix () + { + return L"xmlns"; + } + + template <> + inline const wchar_t* + xmlns_namespace () + { + return L"http://www.w3.org/2000/xmlns/"; + } + + template <> + inline const wchar_t* + xsi_prefix () + { + return L"xsi"; + } + + template <> + inline const wchar_t* + xsi_namespace () + { + return L"http://www.w3.org/2001/XMLSchema-instance"; + } + + template <> + inline const wchar_t* + type () + { + return L"type"; + } + + template <> + inline const wchar_t* + nil () + { + return L"nil"; + } + + template <> + inline const wchar_t* + schema_location () + { + return L"schemaLocation"; + } + + template <> + inline const wchar_t* + no_namespace_schema_location () + { + return L"noNamespaceSchemaLocation"; + } + + template <> + inline const wchar_t* + first_prefix () + { + return L"p1"; + } + + template <> + inline const wchar_t* + second_prefix () + { + return L"p2"; + } + + template <> + inline const wchar_t* + third_prefix () + { + return L"p3"; + } + + template <> + inline const wchar_t* + fourth_prefix () + { + return L"p4"; + } + + template <> + inline const wchar_t* + fifth_prefix () + { + return L"p5"; + } + } + } + } +} + +#endif // XSD_CXX_XML_BITS_LITERALS_IXX_WCHAR +#endif // XSD_USE_WCHAR -- cgit v1.1