<commit_before><?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:gml="http://www.opengis.net/gml"
           xmlns:nrml="http://openquake.org/xmlns/nrml/0.4"
           xmlns="http://openquake.org/xmlns/nrml/0.4"
           targetNamespace="http://openquake.org/xmlns/nrml/0.4"
           elementFormDefault="qualified"
           xml:lang="en">

    <xs:import namespace="http://www.opengis.net/gml" schemaLocation="./gml/gmlsf.xsd"/>

    <xs:complexType name="Config">
        <xs:sequence>
            <xs:element name="hazardProcessing" type="HazardProcessing" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

    <xs:complexType name="IMLType">
        <xs:simpleContent>
            <xs:extension base="gml:doubleList">
                <xs:attribute name="IMT" type="xs:string" use="required"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:simpleType name="IMTType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="PGA"/> <!-- peak ground acceleration -->
            <xs:enumeration value="SA"/> <!-- spectral acceleration -->
            <xs:enumeration value="PGV"/> <!-- peak ground velocity -->
            <xs:enumeration value="PGD"/> <!-- peak ground displacement -->
            <xs:enumeration value="IA"/> <!-- arias intensity -->
            <xs:enumeration value="RSD"/> <!-- relative significant duration -->
            <xs:enumeration value="MMI"/> <!-- modified mercalli intensity -->
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="Magnitude">
        <xs:simpleContent>
            <xs:extension base="PositiveDoubleType">
                <xs:attribute name="type" type="MagnitudeType"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:simpleType name="MagnitudeType"><commit_msg>Added comment on nrml_common schema<commit_after><?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:gml="http://www.opengis.net/gml"
           xmlns:nrml="http://openquake.org/xmlns/nrml/0.4"
           xmlns="http://openquake.org/xmlns/nrml/0.4"
           targetNamespace="http://openquake.org/xmlns/nrml/0.4"
           elementFormDefault="qualified"
           xml:lang="en">

    <xs:import namespace="http://www.opengis.net/gml" schemaLocation="./gml/gmlsf.xsd"/>

    <xs:complexType name="Config">
        <xs:sequence>
            <xs:element name="hazardProcessing" type="HazardProcessing" minOccurs="0" maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

<!-- TODO <xs:attribute name="IMT" type="xs:string" use="required"/>
     should be replaced with <xs:attribute name="IMT" type="IMTType" use="required"/>
     once we define a IMTType general enough to manage SA types with a parameter
-->

    <xs:complexType name="IMLType">
        <xs:simpleContent>
            <xs:extension base="gml:doubleList">
                <xs:attribute name="IMT" type="xs:string" use="required"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:simpleType name="IMTType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="PGA"/> <!-- peak ground acceleration -->
            <xs:enumeration value="SA"/> <!-- spectral acceleration -->
            <xs:enumeration value="PGV"/> <!-- peak ground velocity -->
            <xs:enumeration value="PGD"/> <!-- peak ground displacement -->
            <xs:enumeration value="IA"/> <!-- arias intensity -->
            <xs:enumeration value="RSD"/> <!-- relative significant duration -->
            <xs:enumeration value="MMI"/> <!-- modified mercalli intensity -->
        </xs:restriction>
    </xs:simpleType>

    <xs:complexType name="Magnitude">
        <xs:simpleContent>
            <xs:extension base="PositiveDoubleType">
                <xs:attribute name="type" type="MagnitudeType"/>
            </xs:extension>
        </xs:simpleContent>
    </xs:complexType>

    <xs:simpleType name="MagnitudeType">
{'fraction_non_alphanumeric': 0.17171962163473198, 'fraction_numerical': 0.007761338830948338, 'mean_word_length': 2.614373356704645, 'pattern_counts': {'":': 0, '<': 88, '<?xml version=': 2, '>': 88, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 18}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7473986', 'n_tokens_mistral': 1287, 'n_tokens_neox': 1229, 'n_words': 206}