summaryrefslogtreecommitdiff
path: root/xsd/documentation/custom-literals.xsd
diff options
context:
space:
mode:
authorJörg Frings-Fürst <jff@merkur>2014-05-18 16:08:14 +0200
committerJörg Frings-Fürst <jff@merkur>2014-05-18 16:08:14 +0200
commita15cf65c44d5c224169c32ef5495b68c758134b7 (patch)
tree3419f58fc8e1b315ba8171910ee044c5d467c162 /xsd/documentation/custom-literals.xsd
Imported Upstream version 3.3.0.2upstream/3.3.0.2
Diffstat (limited to 'xsd/documentation/custom-literals.xsd')
-rw-r--r--xsd/documentation/custom-literals.xsd49
1 files changed, 49 insertions, 0 deletions
diff --git a/xsd/documentation/custom-literals.xsd b/xsd/documentation/custom-literals.xsd
new file mode 100644
index 0000000..ab2d649
--- /dev/null
+++ b/xsd/documentation/custom-literals.xsd
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+
+<!--
+
+file : documentation/custom-literals.xsd
+author : Boris Kolpackov <boris@codesynthesis.com>
+copyright : not copyrighted - public domain
+
+This schema describes the XML format used to provide the custom string
+to C++ string literal mapping with the -custom-literals XSD compiler
+command line option. Here is a sample instance:
+
+<string-literal-map>
+ <entry>
+ <string>hello</string>
+ <literal>"hello"</literal>
+ </entry>
+ <entry>
+ <string>greeting</string>
+ <literal>"greeting"</literal>
+ </entry>
+</string-literal-map>
+
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:simpleType name="literal_t">
+ <xsd:restriction base="xsd:string">
+ <xsd:pattern value='".+"'/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="entry_t">
+ <xsd:sequence>
+ <xsd:element name="string" type="xsd:string"/>
+ <xsd:element name="literal" type="literal_t"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="string_literal_map_t">
+ <xsd:sequence>
+ <xsd:element name="entry" type="entry_t" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:element name="string-literal-map" type="string_literal_map_t"/>
+
+</xsd:schema>