Metadata windows
Installer Metadata FilesIntroductionIn order to help Citrix Receiver (and Citrix Receiver admins) configure the system for unattended install & ensure the appropriate set of installs (ie no unnecessary or conflicting installs) extra information is needed about the actual installers. To achieve this, every plug-in installer requires an associated XML metadata file which contains the information below. Schema for the MetaData can be found below. Words in monospace below are references to schema element or attribute names. Note that schema element & attribute names are case sensitive. It is strongly recommended that when preparing or changing a Metadata file that you validate it against the schema document. A file that is not valid, according to the schema, will not successfully upload into Citrix Receiver. There are many schema validation tools available for download. All metadata files start with a header section that references the XML standards & schema used. This will be as follows: <?xml version="1.0" ?> <metadata xmlns="http://www.citrix.com/AppReceiver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.citrix.com/AppReceiver MetaData.xsd"> This is followed by one or more plug-in entries. An installer can potentially contain multiple plug-ins. If this is the case then there should be multiple plug-in elements in the metadata file. Ideally the plug-ins will install separately. Attributes and Elements
Each plug-in entry needs the following two mandatory attributes to be specified:
Each plug-in element contains the following further elements:
Example Metadata. Note that if min is ommitted then the range is defined as ver 0 to the max value. If max is omitted then the range is defined as all versions greater than that min value. <deinstallPredecessor> <range min="10.9" max="11.0"></range> <range max="6.3"></range> </deinstallPredecessor>
Install ElementsInformation elements for Install (autoInstall), Upgrade (autoUpgrade) and Uninstall (autoUninstall) all share the following details. The autoInstall element is mandatory, the autoUpgrade & autoUninstall elements are optional but it is best practice to provide them.
From CR 1.1, multiple autoStart entries can be configured for a plug-in. As an example: <autoStart> <startupMenu>Citrix XenApp.lnk</startupMenu> </autoStart> Optional Elements
Example: <!-- Informed Consent / Plug-in Description --> <pluginDescriptions> <descriptions language="en" > <description>Citrix XenApp plug-in for Hosted Applications integrates hosted applications into your desktop. </description> <shortdescription>XenApp Client for accessing Hosted Applications.</shortdescription> </descriptions> </pluginDescriptions>
Plug-in Dependencies
"Find Previous" Elements
Note that the first two forms are preferred as they will normally guide Citrix Receiver to appropriate areas of the Windows Installer database where information beyond the installed version can be found. This is particularly important if the Uninstall string for the product is difficult to predict in the metadata file.
As many of these as are necessary can be specified. Examples: <detectRule>UPGRADECODE:{C6F601FC-380A-4399-B1E9-7B881F70D1D2}</detectRule> <detectRule>UPGRADECODE:{07900A90-0794-46F5-AE12-24D86B365CA3}</detectRule> and <detectRule>REG:hklm\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CitrixVpn\DisplayVersion</detectRule> <detectRule>DISPLAYNAME:Citrix Secure Access Client</detectRule> <detectRule>EXE:%programfiles%\Citrix\Receiver\Receiver.exe</detectRule> Plug-in ConfigurationIn CR 1.0 only the installerOptGUI element was available to specify the UI for supplying the information that is to be subsituted into the commandParameters section. These values could only be applied at install time. In CR 1.1 dynamic config updates were introduced such that if a plug-in subscribes to config updates via the SDK ARRegisterConfigurationHandler() API then any changes made to the configuration in the admin console are passed to the plug-in. The UI that supports this feature is specified by the configuration section. This is richer than that for installerOptGUI element and can be considered to supercede it. The configuration section can be used to create substitutions for the commandParameters section equivalently to the installerOptGUI element.
As an example: <installerOptGUI> <config varname="ServerLoc"> <InstallerOpt language="en"> <description>Address of the Broadcast Server</description> </InstallerOpt> <InstallerOpt language="fr"> <description>Adresse du serveur de Broadcast Serveur </description> </InstallerOpt> </config> </installerOptGUI>
As well as the values, you can also include a introText element that contains text that describes the configuration section helping the admin understand how to fill out the fields. An example config section follows: <configuration> <value name="SampleBool"> <bool initialValue="false"> <prompt lang="en">True or false</prompt> <prompt lang="fr">Vrai ou faux</prompt> </bool> </value> <value name="SampleString"> <string enforce="true" enforceType="http" example="http://showcasesample.citrite.net" > <prompt>Please enter http URL</prompt> </string> </value> <value name="secondBool"> <bool initialValue="true"> <prompt>Enable very important feature</prompt> <prompt lang="de">Aktivieren Sie die Anweisungen auf irritierende Bell</prompt> </bool> </value> <value name="AdvancedSettingsFileUpload"> <upload required="true"> <prompt lang="en">Enter File Location</prompt> <prompt lang="it">Entri nella posizione della lima</prompt> </upload> </value> <value name="SampleList"> <list enforce="true" blankIsValid="true" enforceType="https"> <prompt lang="en">Enter a set of https URLs</prompt> <prompt lang="fr">Entrez ensemble URL de https</prompt> </list> </value> <introText> <intro>Let me tell you here about the plugins and about these config settings and give some context that will help admins fill in the info correctly.</intro> </introText> </configuration> Note that at the client end, this would result in data being passed to <configuration> <bool name="SampleBool">true</bool> <string name="SampleString">the string entry</string> <bool name="secondBool">true</bool> <upload name="AdvancedSettingsFileUpload"> base 64 encoded file contents</upload> <list name="SampleList"> <entry>list entry 1</entry> <entry>list entry 2</entry> <entry>list entry 3</entry> <list> </configuration> Citrix Receiver 1.1 Localisation Element Additions
Example section: <autoInstall reboot="false"> <command>msiexec /I $INSTALLERFILENAME $SILENTSWITCH $PARAMETERS</command> <command lang="fr">msiexec /I $INSTALLERFILENAME /leplumedematant</command> <commandParameters>ENABLE_SSON=Yes ALLOW_REBOOT=No SERVER_LOCATION=$ServerLo c REBOOT=ReallySuppress</commandParameters> <commandParameters lang="de"> MeineHoseIstAbgereist=TRUE ALLOW_REBOOT=NO</commandParameters> <silentSwitch>/qn</silentSwitch> <startAfterInstall>false</startAfterInstall> <autoStart> <startupMenu>Citrix XenApp.lnk</startupMenu> <startupMenu lang="fr">Citrix XenFrappe.lnk</startupMenu> </autoStart> <lessSilentSwitch>/qb</lessSilentSwitch> </autoInstall> Sample Metadata fileThe following is an example Citrix Receiver Metadata file <?xml version="1.0"?> <metadata xmlns="http://www.citrix.com/AppReceiver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.citrix.com/AppReceiver MetaData.xsd" version="1.1" > <plugin product="61D54625-40B5-4175-A7E4-0CD657817445" productName="Test Plugin" > <platforms>XP XP64 Vista64 Win7 Win764</platforms> <version>1.3.5</version> <installerFilename>MyPlugin.msi</installerFilename> <fullPlugin>true</fullPlugin> <!-- Install string & Attributes --> <autoInstall reboot="false"> <command>msiexec /i $INSTALLERFILENAME $PARAMETERS $SILENTSWITCH</command> <commandParameters>SERVER_LOCATION=$ServerLoc REBOOT=ReallySuppress</commandParameters> <silentSwitch>/qn</silentSwitch> <lessSilentSwitch>/qb</lessSilentSwitch> </autoInstall> <!-- Uninstall string & Attributes --> <autoUninstall reboot="false"> <command>MsiExec.exe /X{0A920DF0-DF9E-4908-891D-716BC40C8F8E} $SILENTSWITCH</command> <silentSwitch>/qn</silentSwitch> </autoUninstall> <adminOptions>demand</adminOptions> <!-- Informed Consent / Plugin Description --> <pluginDescriptions> <descriptions language="en" > <description> My Plug-in. I want to give the user an outline of what this plug-in does and what service it connects to. </description> <shortdescription>My Plug-in: Provides access to something</shortdescription> </descriptions> </pluginDescriptions> <!-- Admin console GUI generating information --> <configuration> <value name="ServerLoc"> <string enforceType="http" required="true" defaultValue="http://demoacme.com/demoserver"> <prompt lang="en">Enter Server Contact URL</prompt> </string> </value> <value name="EnableFeature"> <bool initialValue="false"> <prompt>Enable feature for user community</prompt> </bool> </value> <introText><intro>This text would inform the admin about appropriate usage for the Server Contact URL and Feature Enabling entries. It gets displayed in the admin console.</intro></introText> </configuration> <!-- List of Languages the plugin supports --> <pluginLanguages>en de fr ja es ru zh-cn zh-tw</pluginLanguages> <!-- Rules use to detect currently installed version of plugin - see CR Client SDK doc for more details --> <detectCurrentVersionRulesList> <detectRule>UPGRADECODE:C6E61359CF3D481CBD839809DC25A058</detectRule> </detectCurrentVersionRulesList> <installOnce>false</installOnce> </plugin> </metadata> Metadata SchemaThis is the schema for the CR 2.0 release. It is also available here. <?xml version="1.0" encoding="utf-8"?> <xs:schema xmlns="http://www.citrix.com/AppReceiver" elementFormDefault="qualified" targetNamespace="http://www.citrix.com/AppReceiver" id="metadata" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <annotation xmlns="http://www.w3.org/2001/XMLSchema"> <documentation> Copyright 2008-2010 Citrix Systems, Inc. All Rights Reserved. </documentation> </annotation> <xs:element name="metadata"> <xs:complexType> <xs:sequence> <xs:element minOccurs="1" maxOccurs="100" name="plugin" type="pluginListType" /> </xs:sequence> <!-- This attribute is listed as optional for backward compatibility, but plugins adopting 2.0 schema elements *MUST* set this to "2.0" to ensure correct operation --> <xs:attribute default="1.0" name="version" type="xs:token" use="optional" /> </xs:complexType> </xs:element> <xs:complexType name="pluginListType"> <xs:all> <!-- Supported platforms --> <xs:element name="platforms" type="platformTypeList" minOccurs="1" /> <!-- Released Version of Plugin (Installer) --> <xs:element name="version" type="versionType" /> <!-- URL to EULA text (if available) --> <xs:element name="EULAlocation" type="xs:anyURI" minOccurs="0" /> <!-- Install string & Attributes --> <xs:element name="autoInstall" type="arUpdatingInstallType" /> <!-- Uninstall string & Attributes --> <xs:element name="autoUninstall" type="arInstallType" minOccurs="0" /> <!-- Upgrade string & Attributes --> <!-- If the upgrade string is omitted the install string will be used for upgrades. --> <xs:element name="autoUpgrade" type="arUpdatingInstallType" minOccurs="0" /> <!-- Admin requirements --> <xs:element name="adminOptions" type="installationAdminPrivsType" default="none" /> <!-- This plugin normally deployed if not present, it will be updated by itself in communication with its server component --> <xs:element name="installOnce" type="xs:boolean" default="false" minOccurs="0" /> <!-- Should it be important to maintain the filename of the installer, provide this element --> <xs:element name="installerFilename" type="xs:string" /> <!-- Admin console GUI generating information --> <xs:element name="installerOptGUI" type="commonInstallerOptGUIListType" minOccurs="0" /> <!-- Informed Consent / Plugin Description --> <xs:element name="pluginDescriptions" type="pluginDescriptionListType" /> <!-- List of Languages the plugin supports --> <xs:element name="pluginLanguages" type="languageTypeList" minOccurs="1" /> <!-- Rules use to detect currently installed version of plugin - see Receiever Client SDK doc for more details --> <xs:element name="detectCurrentVersionRulesList" type="detectCurrentVersionType" minOccurs="0" /> <!-- Other plugins on which this plugin depends at run time --> <xs:element name="functionalDependencies" type="dependencyList" minOccurs="0" /> <!-- Other plugins on which this plugin depends at install time --> <xs:element name="installationDependencies" type="dependencyList" minOccurs="0" /> <!-- Is this plugin a fully fledged, product level 'plugin' or a component associated with --> <!-- a plugin that we might want to represent at a different (lesser) level --> <xs:element name="fullPlugin" type="xs:boolean" default="true" minOccurs="0" /> <!-- Elements introduced in version 1.1 --> <xs:element name="configuration" type="configType" minOccurs="0" /> <!-- URL to README file (if available) --> <xs:element name="READMElocation" type="xs:anyURI" minOccurs="0" /> <!-- Sequence of Localised product names --> <xs:element name="localisedProductNames" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element minOccurs="1" maxOccurs="50" name="productName" type="localisedStringType" /> </xs:sequence> </xs:complexType> </xs:element> <!-- Installer True Exit Code location. If set Receiver will look at a reg DWORD value of this path for the true exit code of the installer. Copes with MetaInstaller wrappers that throw away exit codes. HKLM paths only supported. --> <xs:element name="installerTrueExitCodePath" type="xs:string" minOccurs="0" /> <!-- Installer Failure Details Message location. If set, Receiver will look at a reg string value of this path for any extra detail on the cause of an installer exiting with the opaque 'Fatal Installer Error' code. HKLM paths only supported. --> <xs:element name="installerDetailExitMessagePath" type="xs:string" minOccurs="0" /> <!-- pluginSupportsAdvancedMenuOptions: this plugin will mark some menu entries as being suitable for optional 'advanced' display. Option to enable such entries will only be shown in admin console if this is set. --> <xs:element name="pluginSupportsAdvancedMenuOptions" type="xs:boolean" default="false" minOccurs="0" /> <!-- DeInstallPredecessor ranges: to meet the conditions like the Desktop Receiver upgrade failure case: Specify version ranges over which upgrade will not work & deinstallation prior to applying the new version is required. If a detected version does not fall into one of the specified ranges then it is assumed that upgrade will work. --> <xs:element name="deinstallPredecessor" minOccurs="0"> <xs:complexType > <xs:sequence> <xs:element name="range" minOccurs="1" maxOccurs="100" > <xs:complexType> <xs:attribute name="min" type="xs:string" use="optional" /> <xs:attribute name="max" type="xs:string" use="optional" /> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <!-- Running all the time: is it normal that a plug-in is active & able to report status (as say online / offline normally are) or is it OK that it may not be active all the time (eg ICA Engine). --> <xs:element name="runningAllTheTime" type="xs:boolean" minOccurs="0" /> <!-- Incompatible Plugin: To cope with the case where multiple plugins perform the same role (eg PNA and Anthem). Would stop them being deployed together in same Delivery, or at least generate a warning. Does this need to be a list??? --> <xs:element name="incompatiblePlugin" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="plugin" type="guid" minOccurs="1" maxOccurs="50" /> </xs:sequence> </xs:complexType> </xs:element> <!-- Does this plug-in support Receiver communication links e.g., AG / Repeater? --> <xs:element name="supportsReceiverComms" type="xs:boolean" default="false" minOccurs="0" /> <!-- Is this plug-in Dazzle? --> <xs:element name="isDazzle" type="xs:boolean" default="false" minOccurs="0" /> <!-- Launch this plug-in after the completion dialog has been shown, on first time use. --> <xs:element name="launchAfterCompletionDialog" type="xs:boolean" default="false" minOccurs="0" /> <!-- Elements new in CR 2.0 --> <!-- This plugin is critical and should be installed before any other plugins --> <xs:element name="isCritical" type="xs:boolean" default="false" minOccurs="0" /> <!-- Does this plug-in disrupt the desktop on install/upgrade? --> <xs:element name="disruptsDesktop" type="xs:boolean" default="false" minOccurs="0" /> </xs:all> <xs:attribute name="product" use="required" type="guid" /> <xs:attribute name="productName" use="required" type="xs:string" /> <!-- If this is true then this is part of the Citrix Receiver itself (both main client or UE component) --> <xs:attribute name="appReceiverComponent" type="xs:boolean" default="false" use="optional" /> </xs:complexType> <!-- Every plugin has a unique GUID. This is release invariant --> <xs:simpleType name="guid"> <xs:restriction base="xs:string" > <!-- This is the way it often appears in Windows. --> <xs:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" /> <!-- And this is a plain 32 character hex string. --> <xs:pattern value="[0-9a-fA-F]{32}" /> </xs:restriction> </xs:simpleType> <!-- Version is normally a dotted string Major.Minor.BUild.Custom as applicable --> <xs:simpleType name="versionType"> <xs:restriction base="xs:token"/> </xs:simpleType> <!-- The relationship between the installer (action) and admin privilege --> <xs:simpleType name="installationAdminPrivsType"> <xs:restriction base="xs:normalizedString"> <!-- Installation requires admin privs and should fail if they are not available. --> <xs:enumeration value="demand" /> <!-- Installation should be done with admin privs if available. If not available then proceed as non-admin user. --> <xs:enumeration value="prefer" /> <!-- Install with non-privileged account. Does not prevent installation if current user happens to be an admin. --> <xs:enumeration value="none" /> </xs:restriction> </xs:simpleType> <!-- Possible Platforms for which this installer is valid (& platformType below) --> <xs:simpleType name="platformTypeList" > <xs:list> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="XP"/> <xs:enumeration value="XP64"/> <xs:enumeration value="Vista"/> <xs:enumeration value="Vista64"/> <xs:enumeration value="2K3"/> <xs:enumeration value="2K364"/> <xs:enumeration value="WS08"/> <xs:enumeration value="WS08_64"/> <xs:enumeration value="Win7"/> <xs:enumeration value="Win764"/> <xs:enumeration value="WS08R2" /> <xs:enumeration value="MacOS10.5"/> <xs:enumeration value="MacOS10.6"/> </xs:restriction> </xs:simpleType> </xs:list> </xs:simpleType> <!-- Possible Languages for which this installer is valid (& platformType below) --> <xs:simpleType name="languageTypeList" > <xs:list itemType="xs:language" /> </xs:simpleType> <!-- Details needed to perform an uninstall (& forms the basis of installs) --> <xs:complexType name="arInstallType" > <xs:sequence minOccurs="1" maxOccurs="1"> <!-- Basic structure of Command eg INSTALLERFILENAME $SILENTSWITCH $PARAMETERS --> <xs:element name="command" type="localisedStringType" minOccurs="1" maxOccurs="50" /> <!-- Name=$param(Param GUI Name) pairs --> <xs:element name="commandParameters" type="localisedStringType" minOccurs="0" maxOccurs="50" /> <!-- Switch needed to make the install run silently eg /qn --> <xs:element name="silentSwitch" type="xs:string" minOccurs="1" maxOccurs="1"/> </xs:sequence> <xs:attribute name="reboot" type="xs:boolean" use="optional" /> </xs:complexType> <!-- Type that supports Installs & Upgrades --> <xs:complexType name="arUpdatingInstallType" > <xs:complexContent > <xs:extension base="arInstallType" > <xs:sequence> <xs:element name="installer" type="xs:anyURI" minOccurs="0"> <xs:annotation> <xs:documentation> Optional location of the installer. There may be a list of these, although only the first may be used. </xs:documentation> </xs:annotation> </xs:element> <!-- Does AR need to start the plugin after install? (We prefer the installer not to do so itself.) --> <xs:element name="startAfterInstall" type="xs:boolean" minOccurs="0" /> <!-- Information on how the plugin (auto) starts on login --> <xs:element name="autoStart" type="autoStartType" minOccurs="0" maxOccurs="50" /> <!-- Switch needed to make the install run with basic ui eg /qb --> <xs:element name="lessSilentSwitch" type="xs:string" minOccurs="0" maxOccurs="1" /> </xs:sequence> <!-- In some cases an update (or an 'installation' that effects an update) require any earlier versions to be removed beforehand. I.e. they can't handle it themselves. --> <xs:attribute name="deinstallPredecessors" type="xs:boolean" default="false" use="optional"/> <!-- Set this if the installer can detect & handle a running instance --> <xs:attribute name="canUpgradeWhilePluginRunning" type="xs:boolean" default="false"/> </xs:extension> </xs:complexContent> </xs:complexType> <!-- If a plugin autostarts on login then it does so (on Windows!) via either a registry Run key or via a Startup menu entry --> <!-- Let the Receiver have that information so it can steal the info & use it to start the plugin at it's own convenience --> <!-- Receiver will look in both per user & machine wide locations so this entry should be relative to these roots --> <xs:complexType name="autoStartType" > <xs:sequence> <xs:choice minOccurs="1" maxOccurs="1" > <xs:element name="startupMenu" type="localisedStringType" minOccurs="1" maxOccurs="50" /> <xs:element name="startupRunKey" type="localisedStringType" minOccurs="1" maxOccurs="50" /> </xs:choice> </xs:sequence> </xs:complexType> <!-- The Receiver admin console will want to prompt the admin for common install time params & fill them in on the installer --> <!-- command lines. This can be achieved by adding something of the form PARAM=$(VarName) to the command line; --> <!-- then below pass that variable name & it's description. --> <!-- e.g. Description="The Server URL for PNA" varname="PNAURL" --> <xs:complexType name="commonInstallerOptGUIListType" > <xs:sequence> <xs:element name="config" type="commonInstallerOptGUIConfigEntry" minOccurs="1" maxOccurs="100" /> </xs:sequence> </xs:complexType> <xs:complexType name="commonInstallerOptGUIConfigEntry" > <xs:sequence> <xs:element name="InstallerOpt" type="commonInstallerOptGUIType" minOccurs="1" maxOccurs="100" /> </xs:sequence> <xs:attribute name="varname" type="xs:string" use="required"/> </xs:complexType> <xs:complexType name="commonInstallerOptGUIType" > <xs:sequence> <xs:element name="description" type="xs:string"/> </xs:sequence> <xs:attribute name="language" type="xs:language" use="required"/> </xs:complexType> <!-- Include a description of the plugins function & any information pertinent to its activity (eg installs kernel --> <!-- components, such that a user can used that information for informed consent to an install --> <xs:complexType name="pluginDescriptionListType" > <xs:sequence> <xs:element name="descriptions" type="pluginDescriptionType" minOccurs="1" maxOccurs="100" /> </xs:sequence> </xs:complexType> <!-- Note that the description is required in all relevant languages --> <xs:complexType name="pluginDescriptionType" > <xs:sequence> <xs:element name="description" type="xs:string"/> <xs:element name="shortdescription" type="xs:string"/> </xs:sequence> <xs:attribute name="language" type="xs:language" use="required"/> </xs:complexType> <!-- GUID sequence for package & install dependencies --> <xs:complexType name="dependencyList" > <xs:sequence> <xs:element name="dependency" type="dependencyType" minOccurs="1" maxOccurs="100" /> </xs:sequence> </xs:complexType> <xs:complexType name="dependencyType"> <xs:attribute name="id" type="guid" use="required" /> </xs:complexType> <!-- Rules use to detect currently installed version of plugin - see Receiver Client SDK doc for more details --> <xs:complexType name="detectCurrentVersionType" > <xs:sequence> <xs:element minOccurs="1" maxOccurs="100" name="detectRule"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="ignoreAfterVer" type="xs:string" use="optional" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <!-- Config types introduced in version 1.1. --> <!-- Core type for L10N --> <xs:complexType name="localisedStringType"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute default="en" name="lang" type="xs:language" use="optional" /> </xs:extension> </xs:simpleContent> </xs:complexType> <!-- List of config elements --> <xs:complexType name="configType"> <xs:sequence> <xs:element minOccurs="1" maxOccurs="100" name="value" type="configElementType" /> <xs:element name="introText" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element minOccurs="1" maxOccurs="50" name="intro" type="localisedStringType" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> <!-- Construct as choice so the entries can be in any order --> <xs:complexType name="configElementType"> <xs:choice minOccurs="1" maxOccurs="1"> <xs:element name="string" type="valueStringType" /> <xs:element name="bool" type="valueBoolType" /> <xs:element name="list" type="valueListType" /> <xs:element name="upload" type="valueFileUploadType" /> </xs:choice> <xs:attribute name="name" type="xs:string" use="required" /> </xs:complexType> <!-- Ensure enforcement types are correctly formed --> <xs:simpleType name="enforceTypesSet"> <xs:list> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="http" /> <xs:enumeration value="https" /> </xs:restriction> </xs:simpleType> </xs:list> </xs:simpleType> <!-- Specifier for a single string entry Attr: required - data must be entered Attr: enforceType - http or https (URL types) Attr: passwordField - don't echo output Attr: defaultValue - start with this string, use it if no modification or field cleared. --> <xs:complexType name="valueStringType"> <xs:sequence> <xs:element minOccurs="1" maxOccurs="50" name="prompt" type="localisedStringType" /> </xs:sequence> <xs:attribute name="required" type="xs:boolean" use="optional" default="false" /> <xs:attribute name="enforceType" type="enforceTypesSet" use="optional" /> <xs:attribute name="passwordField" type="xs:boolean" use="optional" /> <xs:attribute name="defaultValue" type="xs:string" use="optional" /> <xs:attribute name="example" type="xs:string" use="optional" /> </xs:complexType> <!-- Specifier for a boolean config entry Attr initialValue: is the value 'true' by default or not --> <xs:complexType name="valueBoolType"> <xs:sequence> <xs:element minOccurs="1" maxOccurs="50" name="prompt" type="localisedStringType" /> </xs:sequence> <xs:attribute name="initialValue" type="xs:boolean" use="optional" /> </xs:complexType> <!-- Specifier for a list of config entries. Attr: required - data must be entered Attr: enforceType - http or https (URL types) --> <xs:complexType name="valueListType"> <xs:sequence> <xs:element minOccurs="1" maxOccurs="50" name="prompt" type="localisedStringType" /> </xs:sequence> <xs:attribute name="required" type="xs:boolean" use="optional" default="false" /> <xs:attribute name="enforceType" type="enforceTypesSet" use="optional" /> <xs:attribute name="example" type="xs:string" use="optional" /> </xs:complexType> <!-- Specifier for an 'advanced settings' file upload entry Attr: required - data must be entered --> <xs:complexType name="valueFileUploadType"> <xs:sequence> <xs:element minOccurs="1" maxOccurs="50" name="prompt" type="localisedStringType" /> </xs:sequence> <xs:attribute name="required" type="xs:boolean" use="optional" default="false" /> </xs:complexType> </xs:schema> |