<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->

<!-- $Rev$ $Date$ -->

<xsd:schema xmlns="http://gshell.org/schema/wisdom-gshell"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:beans="http://www.springframework.org/schema/beans"
        targetNamespace="http://gshell.org/schema/wisdom-gshell"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.springframework.org/schema/beans"/>

    <xsd:annotation>
        <xsd:documentation>
            Defines the configuration elements for GShell Wisdom application context support.
        </xsd:documentation>
    </xsd:annotation>

    <xsd:element name="plugin">
        <xsd:complexType>
            <xsd:annotation>
                <xsd:documentation>
                    Defines a plugin.
                </xsd:documentation>
            </xsd:annotation>
            <xsd:sequence>
                <xsd:element ref="beans:description" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="command-bundle" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="command-bundle">
        <xsd:complexType>
            <xsd:annotation>
                <xsd:documentation>
                    Defines a command bundle.
                </xsd:documentation>
            </xsd:annotation>
            <xsd:sequence>
                <xsd:element ref="beans:description" minOccurs="0" maxOccurs="1"/>
                <xsd:choice minOccurs="0" maxOccurs="unbounded">
					<xsd:element ref="command"/>
					<xsd:element ref="alias"/>
				</xsd:choice>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="command">
        <xsd:complexType>
            <xsd:annotation>
                <xsd:documentation>
                    Defines a command.
                </xsd:documentation>
            </xsd:annotation>
            <xsd:sequence>
                <xsd:element ref="beans:description" minOccurs="0" maxOccurs="1"/>
                <!--
                NOTE: Not using an xsd:choice here, as I can't seem to figure out how to get it to properly
                      validate the min/max of the containted elements.  W/o the xsd:choice the validation
                      works, though have to define elements in order :-(
                -->
                <xsd:element ref="action" minOccurs="1" maxOccurs="1"/>
                <xsd:element ref="documenter" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="completer" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="message-source" minOccurs="0" maxOccurs="1"/>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
            <xsd:attribute name="type" use="optional" default="stateful">
                <xsd:annotation>
                    <xsd:documentation>
                        The command type.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:string">
                        <xsd:enumeration value="stateless"/>
                        <xsd:enumeration value="stateful"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:attribute>
        </xsd:complexType>
    </xsd:element>

    <xsd:attributeGroup name="commandComponentAttributes">
        <xsd:annotation>
            <xsd:documentation>
                Defines the valid attributes for command components.  This is based on beans:beanAttributes,
                stripping off the bits which are not valid in the command component context.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:attribute name="name" type="xsd:string"/>
		<xsd:attribute name="class" type="xsd:string"/>
		<xsd:attribute name="parent" type="xsd:string"/>
		<xsd:attribute name="autowire" default="default">
			<xsd:simpleType>
				<xsd:restriction base="xsd:NMTOKEN">
					<xsd:enumeration value="default"/>
					<xsd:enumeration value="no"/>
					<xsd:enumeration value="byName"/>
					<xsd:enumeration value="byType"/>
					<xsd:enumeration value="constructor"/>
					<xsd:enumeration value="autodetect"/>
				</xsd:restriction><commit_msg>Attr "name" is not valid for command components<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->

<!-- $Rev$ $Date$ -->

<xsd:schema xmlns="http://gshell.org/schema/wisdom-gshell"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:beans="http://www.springframework.org/schema/beans"
        targetNamespace="http://gshell.org/schema/wisdom-gshell"
        elementFormDefault="qualified"
        attributeFormDefault="unqualified">

    <xsd:import namespace="http://www.springframework.org/schema/beans"/>

    <xsd:annotation>
        <xsd:documentation>
            Defines the configuration elements for GShell Wisdom application context support.
        </xsd:documentation>
    </xsd:annotation>

    <xsd:element name="plugin">
        <xsd:complexType>
            <xsd:annotation>
                <xsd:documentation>
                    Defines a plugin.
                </xsd:documentation>
            </xsd:annotation>
            <xsd:sequence>
                <xsd:element ref="beans:description" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="command-bundle" minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="command-bundle">
        <xsd:complexType>
            <xsd:annotation>
                <xsd:documentation>
                    Defines a command bundle.
                </xsd:documentation>
            </xsd:annotation>
            <xsd:sequence>
                <xsd:element ref="beans:description" minOccurs="0" maxOccurs="1"/>
                <xsd:choice minOccurs="0" maxOccurs="unbounded">
					<xsd:element ref="command"/>
					<xsd:element ref="alias"/>
				</xsd:choice>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
        </xsd:complexType>
    </xsd:element>

    <xsd:element name="command">
        <xsd:complexType>
            <xsd:annotation>
                <xsd:documentation>
                    Defines a command.
                </xsd:documentation>
            </xsd:annotation>
            <xsd:sequence>
                <xsd:element ref="beans:description" minOccurs="0" maxOccurs="1"/>
                <!--
                NOTE: Not using an xsd:choice here, as I can't seem to figure out how to get it to properly
                      validate the min/max of the containted elements.  W/o the xsd:choice the validation
                      works, though have to define elements in order :-(
                -->
                <xsd:element ref="action" minOccurs="1" maxOccurs="1"/>
                <xsd:element ref="documenter" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="completer" minOccurs="0" maxOccurs="1"/>
                <xsd:element ref="message-source" minOccurs="0" maxOccurs="1"/>
            </xsd:sequence>
            <xsd:attribute name="name" type="xsd:string" use="required"/>
            <xsd:attribute name="type" use="optional" default="stateful">
                <xsd:annotation>
                    <xsd:documentation>
                        The command type.
                    </xsd:documentation>
                </xsd:annotation>
                <xsd:simpleType>
                    <xsd:restriction base="xsd:string">
                        <xsd:enumeration value="stateless"/>
                        <xsd:enumeration value="stateful"/>
                    </xsd:restriction>
                </xsd:simpleType>
            </xsd:attribute>
        </xsd:complexType>
    </xsd:element>

    <xsd:attributeGroup name="commandComponentAttributes">
        <xsd:annotation>
            <xsd:documentation>
                Defines the valid attributes for command components.  This is based on beans:beanAttributes,
                stripping off the bits which are not valid in the command component context.
            </xsd:documentation>
        </xsd:annotation>
		<xsd:attribute name="class" type="xsd:string"/>
		<xsd:attribute name="parent" type="xsd:string"/>
		<xsd:attribute name="autowire" default="default">
			<xsd:simpleType>
				<xsd:restriction base="xsd:NMTOKEN">
					<xsd:enumeration value="default"/>
					<xsd:enumeration value="no"/>
					<xsd:enumeration value="byName"/>
					<xsd:enumeration value="byType"/>
					<xsd:enumeration value="constructor"/>
					<xsd:enumeration value="autodetect"/>
				</xsd:restriction>
{'fraction_non_alphanumeric': 0.11956419648727341, 'fraction_numerical': 0.005259697567389875, 'mean_word_length': 2.207228915662651, 'pattern_counts': {'":': 0, '<': 172, '<?xml version=': 2, '>': 172, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 8}, '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': '2899097', 'n_tokens_mistral': 3140, 'n_tokens_neox': 2718, 'n_words': 711}