Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBoss, Home of Professional Open Source
Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
as indicated by the @authors tag. All rights reserved.
See the copyright.txt in the distribution for a
full listing of individual contributors.

This copyrighted material is made available to anyone wishing to use,
modify, copy, or redistribute it subject to the terms and conditions
of the GNU Lesser General Public License, v. 2.1.
This program is distributed in the hope that it will be useful, but WITHOUT A
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License,
v.2.1 along with this distribution; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA  02110-1301, USA.
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
        xmlns:swyd="urn:switchyard-config:switchyard:1.0"
        xmlns:common.rules="urn:switchyard-component-common-rules:config:1.0"
        xmlns:rules="urn:switchyard-component-rules:config:1.0"
        targetNamespace="urn:switchyard-component-rules:config:1.0"
        elementFormDefault="qualified">

    <import namespace="urn:switchyard-config:switchyard:1.0"/>
    <import namespace="urn:switchyard-component-common-rules:config:1.0"/>
    <import namespace="http://docs.oasis-open.org/ns/opencsa/sca/200912"/>

    <element name="implementation.rules" type="rules:RulesImplementationType" substitutionGroup="common.rules:implementation.common.rules"/>
    <complexType name="RulesImplementationType">
        <complexContent>
            <extension base="common.rules:CommonImplementationType">
                <sequence>
                    <element ref="rules:action" minOccurs="0" maxOccurs="unbounded"/>
                    <element ref="rules:audit" minOccurs="0" maxOccurs="1"/>
                    <element ref="rules:eventListener" minOccurs="0" maxOccurs="unbounded"/>
                    <element ref="rules:channel" minOccurs="0" maxOccurs="unbounded"/>
                    <element ref="rules:resource" minOccurs="0" maxOccurs="unbounded"/>
                    <element ref="rules:globals" minOccurs="0" maxOccurs="1"/>
                    <element ref="rules:facts" minOccurs="0" maxOccurs="1"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <element name="action" type="rules:ActionType"/>
    <complexType name="ActionType">
        <complexContent>
            <extension base="sca:CommonExtensionBase">
                <attribute name="name" type="NCName" use="required"/>
                <attribute name="type" type="rules:actionType" use="required"/>
                <attribute name="entryPoint" type="string" use="optional"/>
            </extension>
        </complexContent>
    </complexType>

    <element name="audit" type="rules:AuditType" substitutionGroup="common.rules:audit"/>
    <complexType name="AuditType">
        <complexContent>
            <extension base="common.rules:AuditType"/>
        </complexContent>
    </complexType>

    <element name="eventListener" type="rules:EventListenerType" substitutionGroup="common.rules:eventListener"/>
    <complexType name="EventListenerType">
        <complexContent>
            <extension base="common.rules:EventListenerType"/>
        </complexContent>
    </complexType>

   <element name="channel" type="rules:ChannelType"/>
    <complexType name="ChannelType">
        <complexContent>
            <extension base="sca:CommonExtensionBase">
                <attribute name="class" type="string" use="required"/>
                <attribute name="input" type="string" use="optional"/>
                <attribute name="name" type="NCName" use="optional"/>
                <attribute name="operation" type="NCName" use="optional"/>
                <attribute name="reference" type="string" use="optional"/>
            </extension>
        </complexContent>
    </complexType>

    <element name="resource" type="rules:ResourceType" substitutionGroup="swyd:resource"/>
    <complexType name="ResourceType">
        <complexContent>
            <extension base="swyd:ResourceType"/>
        </complexContent>
    </complexType>

    <element name="globals" type="rules:GlobalsType"/>
    <complexType name="GlobalsType">
        <complexContent>
            <extension base="sca:CommonExtensionBase">
                <sequence>
                    <element ref="rules:mapping" minOccurs="0" maxOccurs="unbounded"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <element name="facts" type="rules:FactsType"/>
    <complexType name="FactsType">
        <complexContent>
            <extension base="sca:CommonExtensionBase">
                <sequence>
                    <element ref="rules:mapping" minOccurs="0" maxOccurs="unbounded"/>
                </sequence>
            </extension>
        </complexContent>
    </complexType>

    <element name="mapping" type="rules:MappingType" substitutionGroup="common.rules:mapping"/>
    <complexType name="MappingType">
        <complexContent>
            <extension base="common.rules:MappingType"/>
        </complexContent>
    </complexType>

    <simpleType name="actionType">
        <restriction base="string">
            <enumeration value="EXECUTE"/>
            <enumeration value="FIRE_ALL_RULES"/>
            <enumeration value="FIRE_UNTIL_HALT"/>
        </restriction>
    </simpleType>

</schema>
New to GrepCode? Check out our FAQ X