<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/ide_config" xmlns:tns="http://www.example.org/ide_config" elementFormDefault="qualified">
<!-- 
Description: XML Schema for Adobe CFBuilder 2 ide_config.xml 
Version: 1.4
Last Edited On: 31 December 2011

Created On: 26 December 2011 
Created By: Ernst van der Linden (evdlinden@gmail.com)

Version History:
1.0: Initial Release
1.1: Added child menu element
1.2: Added viewcontributions and related elements 
1.3: Added codeassistcontribution, startpagecontribution and related elements
1.4: Added Added keywords to input element default attribute 
-->
    <element name="application">
    	<complexType>
    		<sequence minOccurs="1">
    			<element name="menucontributions"
    				type="tns:menucontributions" maxOccurs="1" minOccurs="1">
    				<annotation>
    					<documentation>
    						Menu contributions to ProjectViewMenu,
    						RDSViewMenu, EditorMenu and OutlineMenu
    					</documentation>
    				</annotation>
    			</element>
    			<element name="handlers" type="tns:handlers"
    				maxOccurs="1" minOccurs="1">
    				<annotation>
    					<documentation>
    						Handlers which are linked to menu actions
    					</documentation>
    				</annotation>
    			</element>
    			<element name="install" type="tns:install" maxOccurs="1"
    				minOccurs="0">
    			</element>
    			<element name="events" type="tns:events"
    				minOccurs="0">
    			</element>
    			<element name="name" type="string" maxOccurs="1">
    				<annotation>
    					<documentation>
    						The name of the extension.
    					</documentation>
    				</annotation>
    			</element>
    			<element name="author" type="string" minOccurs="0">
    				<annotation>
    					<documentation>
    						The author's name.
    					</documentation>
    				</annotation>
    			</element>
    			<element name="version" type="string" minOccurs="0">
    				<annotation>
    					<documentation>The file version.</documentation>
    				</annotation>
    			</element>
    			<element name="email" type="string" minOccurs="0">
    				<annotation>
    					<documentation>
    						Specifies the e-mail address.
    					</documentation>
    				</annotation>
    			</element>
    			<element name="description" type="string"
    				minOccurs="0">
    				<annotation>
    					<documentation>
    						A brief description of the application. The
    						description can be in plain text or you
    						specify a path to an HTML file, which
    						contains the application description. If you
    						specify a path to an HTML file, store the
    						HTML file in the Install directory within
    						the extension.
    					</documentation>
    				</annotation>
    			</element>
    			<element name="license" type="string" minOccurs="0">
    				<annotation>
    					<documentation>
    						License agreement displayed when installing
    						the extension. The license agreement can be
    						displayed in plain text or you specify a
    						path to an HTML file, which contains the
    						license agreement. If you specify a path to
    						an HTML file, store the HTML file in the
    						Install directory within the extension.
    					</documentation>
    				</annotation>
    			</element>
    			<element name="viewcontributions"
    				type="tns:viewcontributions" minOccurs="0">
    			</element>
    			<element name="codeassistcontribution"
    				type="tns:codeassistcontribution" minOccurs="0">
    				<annotation>
    					<documentation>
    						Add proposals to Code Assist from extensions
    					</documentation>
    				</annotation>
    			</element>
    			<element name="startpagecontribution" type="tns:startpagecontribution"></element>
    		</sequence>
    	</complexType></element>


    <complexType name="menucontributions">
    	<sequence minOccurs="0">
    		<element name="contribution" type="tns:contribution" minOccurs="0"></element>
    	</sequence>
    </complexType>
    
    <complexType name="handlers">
        <annotation>
        	<documentation>The name of the CFM file</documentation></annotation>
        <sequence minOccurs="0" maxOccurs="unbounded">
    		<element name="handler" type="tns:handler" maxOccurs="unbounded"></element>
    	</sequence>
    </complexType>
    
    <complexType name="wizard">
    	<sequence minOccurs="1" maxOccurs="1">
    		<element name="page" type="tns:page"></element>
    	</sequence>
    	<attribute name="height" type="int"></attribute>
    	<attribute name="width" type="int"></attribute>
    	<attribute name="handlerid" type="string" use="required">
    		<annotation>
    			<documentation>The name of the handler which will be called on post install</documentation>
    		</annotation></attribute>
    </complexType>

    <complexType name="install">
    	<sequence minOccurs="1">
    		<element name="wizard" type="tns:wizard"></element>
    	</sequence>
    </complexType>

    <complexType name="page">
    	<sequence minOccurs="0" maxOccurs="unbounded">
    		<element name="input" type="tns:input" maxOccurs="unbounded" minOccurs="0"></element>
    	</sequence>
    	<attribute name="title" type="string">
    		<annotation>
    			<documentation>Title of the page</documentation>
    		</annotation></attribute>
    </complexType>
    
    <complexType name="input">
    	<attribute name="name" type="string" use="required">
    		<annotation>
    			<documentation>Input variable name</documentation></annotation></attribute>
    	<attribute name="label" type="string">
    		<annotation>
    			<documentation>The label of the input dialog box</documentation></annotation></attribute>
        <attribute name="tooltip" type="string">
    		<annotation>
    			<documentation>The tool tip that appears when the user moves 
the mouse over the input dialog box.</documentation>
    		</annotation></attribute>
        <attribute name="type" use="required">
            <annotation>
            	<documentation>The input variable can be any of the following data types:
• dir
• string
• boolean
• file
• password
• list
• projectdir
• projectfile</documentation>
            </annotation>
            <simpleType>
    			<restriction base="string">
    				<enumeration value="dir"></enumeration>
    				<enumeration value="string"></enumeration>
    				<enumeration value="boolean"></enumeration>
    				<enumeration value="file"></enumeration>
    				<enumeration value="password"></enumeration>
    				<enumeration value="list"></enumeration>
    				<enumeration value="projectdir"></enumeration>
    				<enumeration value="projectfile"></enumeration>
    			</restriction>
    		</simpleType>
    	</attribute>
    	<attribute name="required" use="required">
            <annotation>
            	<documentation>Specifies the input field as required.
When you specify an input field as required, 
the OK button is not enabled until the user enters a value 
in the required field.</documentation>
            </annotation>
            <simpleType>
    			<restriction base="string">
    				<enumeration value="true"></enumeration>
    				<enumeration value="false"></enumeration>
    				<enumeration value="yes"></enumeration>
    				<enumeration value="no"></enumeration>
    			</restriction>
    		</simpleType>
    	</attribute>
    	<attribute name="pattern" type="string">
    		<annotation>
    			<documentation>Specifies the regular expression against which user input is validated.
For a validation error, you can specify the error message that must appear. You use the
errormessage
attribute to specify the error message.</documentation></annotation></attribute>
    	<attribute name="errormessage" type="string">
    		<annotation>
    			<documentation>The error message that appears when validation fails for a given pattern.</documentation></annotation></attribute>
    	<attribute name="helpmessage" type="string">
    		<annotation>
    			<documentation>The Help tip that appears in the title area of the dialog for a given input field.</documentation></annotation></attribute>
    	<attribute name="default">
    		<annotation>
    			<documentation>
    				Specifies a default value for a given input type.
    				You cannot specify a default value for Boolean input
    				types. For lists, the default value is pre-selected.
    			</documentation>
    		</annotation>
    		<simpleType>
    			<restriction base="string">
    				<enumeration value="{$projectlocation}"></enumeration>
    				<enumeration value="{$projectname}"></enumeration>
    				<enumeration value="{$serverhome}"></enumeration>
    				<enumeration value="{$wwwroot}"></enumeration>
    			</restriction>
    		</simpleType>
    	</attribute>
    	<attribute name="checked">
            <annotation>
            	<documentation>A Boolean value that specifies if the check box field is selected or deselected, by default:
• true - check box is selected (default value).
• false - check box is deselected</documentation>
            </annotation>
            <simpleType>
    			<restriction base="string">
    				<enumeration value="true"></enumeration>
    				<enumeration value="false"></enumeration>
    				<enumeration value="yes"></enumeration>
    				<enumeration value="no"></enumeration>
    			</restriction>
    		</simpleType>
    	</attribute>
    </complexType>

    <complexType name="handler">
    	<sequence></sequence>
    	<attribute name="id" type="string" use="required">
    		<annotation>
    			<documentation>Handler ID</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="type" use="required">
    		<annotation>
    			<documentation>Specifies the handler type. 
The handler type you can specify is CFM
    			</documentation>
    		</annotation>
    		<simpleType>
    			<restriction base="string">
    				<enumeration value="CFM"></enumeration>
    			</restriction>
    		</simpleType>
    	</attribute>
        <attribute name="filename" type="string" use="required">
        	<annotation>
        		<documentation>The name of the CFM file</documentation></annotation></attribute>
    </complexType>

    <complexType name="contribution">
    	<sequence minOccurs="1" maxOccurs="unbounded">
    		<element name="menu" type="tns:menu" maxOccurs="unbounded"></element>
    	</sequence>
    	<attribute name="target" use="required">
    		<annotation>
    			<documentation>
    				The target view can be any of the following: •
    				rdsview • projectview • outlineview • editor
    			</documentation>
    		</annotation>
    		<simpleType>
    			<restriction base="string">
    				<enumeration value="rdsview"></enumeration>
    				<enumeration value="projectview"></enumeration>
    				<enumeration value="outlineview"></enumeration>
    				<enumeration value="editor"></enumeration>
    			</restriction>
    		</simpleType>
    	</attribute>
    </complexType>

    <complexType name="menu">
    	<sequence>
    		<element name="action" type="tns:action"
    			maxOccurs="unbounded">
    		</element>
    		<element name="filters" type="tns:filters"></element>
    		<element name="menu" type="tns:menu" minOccurs="0" maxOccurs="unbounded">
    			<annotation>
    				<documentation>Submenu</documentation>
    			</annotation></element>
    	</sequence>
    	<attribute name="name" type="string" use="required">
    		<annotation>
    			<documentation>
    				Specifies the name of the menu.
    			</documentation>
    		</annotation>
    	</attribute>
    </complexType>

    <complexType name="action">
    	<sequence minOccurs="0" maxOccurs="unbounded">
    		<element name="input" type="tns:input" maxOccurs="unbounded" minOccurs="0"></element>
    		<element name="dialog" type="tns:dialog" maxOccurs="unbounded" minOccurs="0"></element>
    	</sequence>
    	<attribute name="name" type="string" use="required">
    		<annotation>
    			<documentation>
    				Specifies the name of the action.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="handlerid" type="string" use="required">
    		<annotation>
    			<documentation>
    				Specifies the name of the action.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="showresponse">
    		<annotation>
    			<documentation>
    				A Boolean that value that specifies if the HTML
    				response that the handler receives must be shown to
    				the user: • yes • no The default value is false.
    			</documentation>
    		</annotation>
    		<simpleType>
    			<restriction base="string">
    				<enumeration value="true"></enumeration>
    				<enumeration value="false"></enumeration>
    				<enumeration value="yes"></enumeration>
    				<enumeration value="no"></enumeration>
    			</restriction>
    		</simpleType>
    	</attribute>
    </complexType>

    <complexType name="filters">
    	<sequence minOccurs="0" maxOccurs="unbounded">
    		<element name="filter" type="tns:filter" maxOccurs="unbounded" minOccurs="0"></element>
    	</sequence>
    </complexType>

    <complexType name="filter">
    	<attribute name="type" use="required">
            <annotation>
            	<documentation>You can specify following filter types:
• folder
• project
• file</documentation>
            </annotation>
            <simpleType>
    			<restriction base="string">
    				<enumeration value="folder"></enumeration>
    				<enumeration value="project"></enumeration>
    				<enumeration value="file"></enumeration>
    			</restriction>
    		</simpleType>
    	</attribute>
    	<attribute name="pattern" type="string">
    		<annotation>
    			<documentation>Regular expression to match folder, project, or filename</documentation>
    		</annotation></attribute>
    </complexType>



    <complexType name="dialog">
    	<sequence minOccurs="0" maxOccurs="unbounded">
    		<element name="input" type="tns:input" minOccurs="0" maxOccurs="unbounded"></element>
    	</sequence>
    	<attribute name="height" type="int">
    		<annotation>
    			<documentation>
    				Specifies the height of the dialog.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="width" type="int">
    		<annotation>
    			<documentation>
    				Specifies the width of the dialog.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="title" type="string">
    		<annotation>
    			<documentation>
    				Specifies the title for the dialog.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="image" type="string">
    		<annotation>
    			<documentation>
    				Specifies the path to the image that appears in the
    				title bar. The path that you specify must be
    				relative to the Extension folder.
    			</documentation>
    		</annotation>
    	</attribute>
    </complexType>

    <complexType name="events">
    	<sequence minOccurs="0" maxOccurs="unbounded">
    		<element name="event" type="tns:event" maxOccurs="unbounded" minOccurs="0"></element>
    	</sequence>
    </complexType>

    <complexType name="event">
    	<attribute name="type" use="required">
    		<annotation>
    			<documentation>Specifies the event for which the handler runs.
You can specify the event type=&quot;onprojectcreate&quot;</documentation>
    		</annotation>
    		<simpleType>
    			<restriction base="string">
    				<enumeration value="onprojectcreate"></enumeration>
    			</restriction>
    		</simpleType>
    	</attribute>
    	<attribute name="handlerid" type="string" use="required">
    		<annotation>
    			<documentation>Specifies the handler ID to pass.</documentation></annotation></attribute>
    </complexType>

    <complexType name="viewcontributions">
    	<sequence>
    		<element name="view" type="tns:view" maxOccurs="unbounded" minOccurs="0"></element>
    	</sequence>
    </complexType>

    <complexType name="view">
    	<sequence>
    		<element name="toolbarcontributions"
    			type="tns:toolbarcontributions">
                <annotation>
                	<documentation>Contains all toolbar items</documentation>
                </annotation>
    		</element>
    	</sequence>
    	<attribute name="id" type="string" use="required">
    		<annotation>
    			<documentation>
    				Identifies the view. Views contributed by an
    				extension must have unique IDs. id can be used to
    				update the content of a view from handler response.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="title" type="string" use="required">
    		<annotation>
    			<documentation>A title for the view.</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="icon" type="string">
    		<annotation>
    			<documentation>
    				Relative path to image file that resides in the
    				installation location of extensions. For example,
    				specifying images/icon.png (in the images folder of
    				extension installation location) displays icon.png
    				as the view icon. The standard sizes are 16x16
    				pixels or 20x20 pixels. All popular image formats
    				are supported.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="handlerid" type="string" use="required">
    		<annotation>
    			<documentation>
    				ID of the associated handler.
    			</documentation>
    		</annotation>
    	</attribute>
    </complexType>

    <complexType name="toolbarcontributions">
    	<sequence>
    		<element name="toolbaritem" type="tns:toolbaritem" minOccurs="0" maxOccurs="unbounded">
    			<annotation>
    				<documentation>Adds an item to the view toolbar.</documentation></annotation></element>
    	</sequence>
    </complexType>

    <complexType name="toolbaritem">
    	<attribute name="icon" type="string">
    		<annotation>
    			<documentation>
    				Relative path to image file that resides in the
    				installation location of extensions. For example,
    				specifying images/icon.png (in the images folder of
    				extension installation location) displays icon.png
    				as the view icon. The standard sizes are 16x16
    				pixels or 20x20 pixels. All popular image formats
    				are supported.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="handlerid" type="string" use="required">
    		<annotation>
    			<documentation>ID of the associated handler.</documentation></annotation></attribute>
    </complexType>

    <complexType name="codeassistcontribution">
    	<sequence>
    		<element name="functions" type="tns:functions"></element>
    		<element name="variables" type="tns:variables"></element>
    	</sequence>
    </complexType>

    <complexType name="functions">
    	<sequence>
    		<element name="function" type="tns:function"></element>
    	</sequence>
    </complexType>

    <complexType name="function">
    	<sequence>
    		<element name="parameter" type="tns:parameter" minOccurs="0" maxOccurs="unbounded"></element>
    	</sequence>
    	<attribute name="name" type="string" use="required">
    		<annotation>
    			<documentation>
    				Name of the function that has to be listed.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="variableName" type="string">
    		<annotation>
    			<documentation>
    				Name of the variable. If specified, then the handler
    				is called only if the name of the variable on which
    				the function is called matches the variable name.
    				For variables, when you specify variablename. ,in
    				the editor, Code Assist presents the contribution
    				for that variable.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="componentName" type="string">
    		<annotation>
    			<documentation>
    				If specified, the type of the variable on which the
    				function is called matches the component name you
    				specify.
    			</documentation>
    		</annotation>
    	</attribute>
    	<attribute name="handlerId" type="string" use="required">
    		<annotation>
    			<documentation>
    				ID of the associated handler.
    			</documentation>
    		</annotation>
    	</attribute>
    </complexType>

    <complexType name="parameter">
    	<attribute name="index" type="int" use="required">
    		<annotation>
    			<documentation>Specifies parameter indexes for which the handler can provide Code Assist. If not present, then the handler is called for all parameters in the function.</documentation></annotation></attribute>
    </complexType>

    <complexType name="variables">
    	<sequence>
    		<element name="variable" type="tns:variable" minOccurs="0" maxOccurs="unbounded"></element>
    	</sequence>
    </complexType>

    <complexType name="variable">
    	<sequence>
    		<element name="parameter" type="tns:parameter"></element>
    	</sequence>
    	<attribute name="name" type="string" use="required">
    		<annotation>
    			<documentation>Name of the variable that has to be listed.</documentation>
    		</annotation></attribute>
    	<attribute name="componentName" type="string">
    		<annotation>
    			<documentation>If specified, the type of the variable on which the function is called matches the component name you specify.</documentation></annotation></attribute>
    	<attribute name="handlerid" type="string" use="required">
    		<annotation>
    			<documentation>ID of the associated handler.</documentation></annotation></attribute>
    </complexType>

    <complexType name="startpagecontribution">
    	<sequence>
    		<element name="urlgenerator" type="tns:urlgenerator" minOccurs="0"></element>
    	</sequence>
    </complexType>

    <complexType name="urlgenerator">
    	<attribute name="handlerid" type="string" use="required">
    		<annotation>
    			<documentation>ID of the associated handler.</documentation></annotation></attribute>
    </complexType>
</schema>
