<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2006, Inversoft LLC, All Rights Reserved -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.inversoft.com/schemas/profanity-2.0/database"
           xmlns="http://www.inversoft.com/schemas/profanity-2.0/database"
           elementFormDefault="qualified">
  <xs:simpleType name="profanityType">
    <xs:annotation>
      <xs:documentation>
        This enumeration lists out the different types of words to include in the filter or
        replace operation. The types can help to make the filter more or less strict as well
        as can increase performance if fewer types are included.

        Briefly each type is:

        Alcohol - Any alcohol related words that some applications might want to filter such as
        beer, ale, wine, etc.

        Drug - Any drug related words/slang that some applications might want to filter such as
        pot, weed, bong, etc.

        Religion - Currently this category is rather small, but includes words that might offend
        certain users who have strong religious beliefs. This includes words and phrases
        such as "god damnit", "anti-christ", etc.

        Slang - Slang is a very broad category and includes most words that are not considered
        direct swears. The slang category includes words such as airhead, bang, bimbo, etc.

        Swear - Swear is a very broad category and includes all words that are only considered
        direct swears. These words usually have no other meaning than profanity. The Swear
        category includes words such as shit, ass, fuck, etc.

        Youth - This category contains all the words that are dictionary words and have no slang
        meanings but might be deemed inappropriate for younger users. This includes words
        such as beastiality, bisexual, homosexual, etc.
      </xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:NMTOKEN">
      <xs:enumeration value="Alcohol"/>
      <xs:enumeration value="Drug"/>
      <xs:enumeration value="Religion"/>
      <xs:enumeration value="Racial"/>
      <xs:enumeration value="Slang"/>
      <xs:enumeration value="Superlative"/>
      <xs:enumeration value="Swear"/>
      <xs:enumeration value="Youth"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="lang_code">
    <xs:restriction base="xs:string">
      <xs:pattern value="[a-z]{2}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="country_code">
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z]{2}"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="entryType">
    <xs:annotation>
      <xs:documentation>
        The body of this element is the description and everything else is on attributes.
      </xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="phrase" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="rating" type="xs:int" minOccurs="1" maxOccurs="1"/>
      <xs:element name="type" type="profanityType" minOccurs="1" maxOccurs="1"/>
      <xs:element name="alternatives" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="regex_list" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="excludes" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="definition" type="xs:string" minOccurs="1" maxOccurs="1"/>
      <xs:element name="langauge_code" type="lang_code" minOccurs="1" maxOccurs="1"/>
      <xs:element name="country_code" type="country_code" minOccurs="1" maxOccurs="1"/>
      <xs:element name="is_embeddable" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="is_word" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="is_noun" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="is_verb" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="is_adverb" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="is_adjective" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="is_command" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="is_phrase" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
      <xs:element name="is_exclamation" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
  </xs:complexType>
  <xs:element name="entries">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="entry" type="entryType" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>