<!--
XML Schema for the NCL modules

This is NCL
Copyright: 2005 LABORATORIO TELEMIDIA, All Rights Reserved.
See http://www.telemidia.puc-rio.br

Public URI: http://www.ncl.org.br/NCL3.1/modules/NCL31CausalConnectorFunctionality.xsd
Author: TeleMidia Laboratory
Revision: 30/06/2013

Schema for the NCL CausalConnectorFunctionality module namespace.
-->

<schema xmlns="http://www.w3.org/2001/XMLSchema" 
        xmlns:connectorCommonPart="http://www.ncl.org.br/NCL3.1/ConnectorCommonPart"
        xmlns:connectorAssessmentExpression="http://www.ncl.org.br/NCL3.1/ConnectorAssessmentExpression"
        xmlns:connectorCausalExpression="http://www.ncl.org.br/NCL3.1/ConnectorCausalExpression"
        xmlns:causalConnector="http://www.ncl.org.br/NCL3.1/CausalConnector"
        xmlns:causalConnectorFunctionality="http://www.ncl.org.br/NCL3.1/CausalConnectorFunctionality"
        targetNamespace="http://www.ncl.org.br/NCL3.1/CausalConnectorFunctionality"
        elementFormDefault="qualified" attributeFormDefault="unqualified">
    
    <!-- import the definitions in the modules namespaces -->

    <import namespace="http://www.ncl.org.br/NCL3.1/ConnectorCommonPart" 
    schemaLocation="http://www.ncl.org.br/NCL3.1/modules/NCL31ConnectorCommonPart.xsd"/>
    <import namespace="http://www.ncl.org.br/NCL3.1/ConnectorAssessmentExpression" 
    schemaLocation="http://www.ncl.org.br/NCL3.1/modules/NCL31ConnectorAssessmentExpression.xsd"/>
    <import namespace="http://www.ncl.org.br/NCL3.1/ConnectorCausalExpression" 
    schemaLocation="http://www.ncl.org.br/NCL3.1/modules/NCL31ConnectorCausalExpression.xsd"/>
    <import namespace="http://www.ncl.org.br/NCL3.1/CausalConnector" 
    schemaLocation="http://www.ncl.org.br/NCL3.1/modules/NCL31CausalConnector.xsd"/>

  <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
  <!-- CausalConnectorFunctionality                                -->
  <!-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -->
  <element name="connectorParam" type="connectorCommonPart:parameterPrototype"/>

    <!-- extends causalConnector element -->

    <complexType name="causalConnectorType">
      <complexContent>
        <extension base="causalConnector:causalConnectorPrototype">
          <sequence>
            <element ref="causalConnectorFunctionality:connectorParam" minOccurs="0" maxOccurs="unbounded"/>
            <choice>
              <element ref="causalConnectorFunctionality:simpleCondition" />
              <element ref="causalConnectorFunctionality:compoundCondition" />
            </choice>
            <choice>
              <element ref="causalConnectorFunctionality:simpleAction" />
              <element ref="causalConnectorFunctionality:compoundAction" />
            </choice>
          </sequence>
        </extension>
      </complexContent>
    </complexType>

    <!-- extends compoundCondition element -->

    <complexType name="compoundConditionType">
      <complexContent>
        <extension base="connectorCausalExpression:compoundConditionPrototype">
          <sequence>
            <choice>
              <element ref="causalConnectorFunctionality:simpleCondition" />
              <element ref="causalConnectorFunctionality:compoundCondition" />
            </choice>
            <choice minOccurs="1" maxOccurs="unbounded">
              <element ref="causalConnectorFunctionality:simpleCondition" />
              <element ref="causalConnectorFunctionality:compoundCondition" />
              <element ref="causalConnectorFunctionality:assessmentStatement" />
              <element ref="causalConnectorFunctionality:compoundStatement" />
            </choice>
          </sequence>
        </extension>
      </complexContent>
    </complexType>

  <element name="causalConnector" type="causalConnectorFunctionality:causalConnectorType" substitutionGroup="causalConnector:causalConnector"/>

  <element name="simpleCondition" substitutionGroup="connectorCausalExpression:simpleCondition"/>

  <element name="compoundCondition" type="causalConnectorFunctionality:compoundConditionType" substitutionGroup="connectorCausalExpression:compoundCondition"/>

  <element name="simpleAction" substitutionGroup="connectorCausalExpression:simpleAction"/>

  <element name="compoundAction" substitutionGroup="connectorCausalExpression:compoundAction"/>

  <element name="assessmentStatement" substitutionGroup="connectorAssessmentExpression:assessmentStatement"/>

  <element name="attributeAssessment" substitutionGroup="connectorAssessmentExpression:attributeAssessment"/>

  <element name="valueAssessment" substitutionGroup="connectorAssessmentExpression:valueAssessment"/>

  <element name="compoundStatement" substitutionGroup="connectorAssessmentExpression:compoundStatement"/>

</schema>