<?xml version="1.0" encoding="ISO-8859-1">

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
	<!--

	Copyright (C), ocProducts Ltd, 2010

	This is the schema for version 4.2 of Comcode-XML.
	The verbatim URL of this document if:
	  http://ocportal.com/data/comcode4.xsd

	Comcode is intended as a server-side processed language, converted to XHTML+CSS+Javascript, and inserted into an HTML stream at an apt-position.
	It is designed to run at the core of a web content management system (WCMS). Comcode is standardised by ocProducts Ltd, but may be used by any organisation so long as we are attributed as the core standardisers for the language.
	This schema is for the XML form of Comcode (Comcode-XML): the more common form is Comcode-Text, which is written in a style intentionally similar to (but not originally based upon) 'bbcode' and 'wikicode'. Comcode-Text differs from Comcode-XML in a number of ways (mainly Comcode-Text is terser), but a conversion is possible.
	The semantics of Comcode are explained in http://ocportal.com/docs/tut_comcode.htm, and ocPortal (http://ocportal.com/) can be considered the authoritative reference implementation. Together the documentation, reference implementation, Comcode-Text to Comcode-XML converter, and this schema, form the Comcode-Text and Comcode-XML specifications.

	Comcode can be used for both 'documents' and 'snippets', and the usage patterns are identical. A Comcode document is not equivalent to a full XHTML page, as it does not specify and form of document wrapper; a parser could, however, be developed to generate such wrappers under the assumption that that parser was only being fed "Documents".
	This distinction is left to the implementation. In ocPortal, this distinction is created by virtue of 'Comcode pages' which are a special place to put Comcode such that it forms it's own full page.
	The distinction is irrelevant for the Comcode specification, however, as it is purely the domain of what Comcode is encapsulated in and not the Comcode itself.

	ocPortal will put errors into the output stream if Comcode is misused. The intent in this is that errors may be made during content management or importing, or only become apparent between upgrades, and these errors should not cause a complete failure for the Comcode to render.
	Comcode-Text is designed to be particularly flexible when it comes to syntax, but Comcode-XML must be XML that will validate to this schema.

	Comcode has been intentionally designed to not separate out concerns such as style from structure (although some consideration of semantics has been done, for accessibility reasons).
	Comcode is also not designed to give fine-grained control, but rather to capture common needs.
	The reason for this is Comcode is designed as a simple, highly expressive (dynamic and programmattic, rather than statically renderable), and terse, language - it is not intended for designing whole web pages, and when fine-grained control is needed, XHTML can be deferred to via the htmlWrap tag.

	Certain aspects of Comcode are incompatible between implementations ("implementation-incompatible") and websites ("website-incompatible").
	These are the incompatibilities:
	 - CEDI; CEDI is essentially an extended WIKI system, and this tag can be considered as a link to a named WIKI-page. If no WIKI-like system is presented, this tag could be considered a link to a named page or article. Thus this tag is website-incompatible.
	 - topic and post; this requires a forum system to be present, and links to content within that system by ID - thus this is website-incompatible.
	 - block; this calls up and embeds the output of a named dynamic block of code - the names available are not considered a part of the Comcode specification and are thus website-incompatible. Therefore, the 'block' tag is not considered portable across implementations unless implementations choose to support the same blocks as provided in ocPortal.
	 - directive; directives are based on the directive functionality present in ocPortal's 'tempcode'. This functionality is not considered a core part of Comcode, but there is no reason that it cannot, in majority, be replicated in other implementations as the number of directives is small.
	 - language; as with directives, language codes are based on functionality from 'tempcode'. Whilst this functionality could be replicated, there are many 1000's of language codes available in ocPortal - thus this functionality should be considered implementation-incompatible.
	 - symbol; as with directives, symbols are based on functionality from 'tempcode'. This functionality could be given with partial compatibility if select symbols are supported between implementations, and the ocPortal collection should be considered the core collection of symbols that might be made available.
	 - box; boxes are a full part of the standard, although the actual named box might not be present between implementations; thus, the 'type' parameter should be considered website-incompatible.
	 - upload; the upload 'type' is implementation-incompatible, as it refers to a directory on the WCMS that may or may not be present.
	 - include; the 'include' tag will include a document, which is specified by a 'page name' and 'zone' (a section of pages) - thus, this is website-incompatible.
	 - attachment; Comcode requires the presence of an attachment system that is stored as a part of the backend WCMS - as the IDs of the system relate to the website, this is website-incompatible.
	 - ifInGroup; as with 'attachment', this tag refers to IDs of the system, and is thus website-incompatible.
	 - page; this tag ties in with the URL parametrisation of the WCMS, and is thus both website-incompatible and implementation-incompatible (depending on whether incompatible parametrisations source from the website, or from the implementing product/service).
	 - expThumb and expRef; these refer to image files present on the server, and thus are both website-incompatible and implementation-incompatible (depending on whether incompatible parameterisations source from the website, or from the implementing product/service).
	If a Comcode renderer does not support any of this behaviour, it may choose to handle the tag at it's discretion. The majority of Comcode documents/snippets are fully portable, however, and most incompatibilities relate to relationships between the Comcode and whatever underlying website is used (website-incompatible), and thus inherently aren't portable.

	We are happy for others to extend Comcode using namespaced extensions, but would appreciate it if extensions intended for use in widely available products or services are done in consultation with us so that we can consider standardisation of them.
	Any installation of ocPortal will infact allow arbitrary unnamespaced new elements, via the 'Custom Comcode' feature. The Comcode created using Custom Comcode is not considered standard Comcode, however.

	Comcode-XML can wrap XHTML, using the htmlWrap tag whilst simultaneously using xmlns - when this is done, Comcode and XHTML can be intermingled as with a Comcode-text [semihtml] tag.
	In actuality, the 'htmlWrap' tag isn't needed at all, but for clarity it is used when converting Comcode-text to Comcode-XML.
	The Comcode tags that differ in semantics from XHTML have been designed to use their own naming so as not to conflict (which would require ugly prefixing and a more complex Comcode-Text->Comcode-XML converter).
	No foreign namespaces other than XHTML should be used, because the parser will not read in the grammars for other namespaces in order to resolve conflicts - it will assume any tag named as a Comcode tag is one, if it's not an XHTML one.

	-->

	<xs:simpleType name="listType">
		<xs:restriction base="xs:string">
			<xs:pattern value="1|a|i" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="commaSeparatedListNumberingType">
		<xs:restriction base="xs:string">
			<xs:pattern value="((decimal|lower-alpha|lower-roman|upper-alpha|upper-roman|disc),)*(decimal|lower-alpha|lower-roman|upper-alpha|upper-roman|disc)" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="terseDimensions">
		<xs:restriction base="xs:string">
			<xs:pattern value="\d+x\d+" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="titleType">
		<xs:restriction base="xs:string">
			<xs:pattern value="1|2|3" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="colorType">
		<xs:restriction base="xs:string">
			<xs:pattern value="black|silver|gray|white|maroon|purple|fuchsia|green|lime|olive|yellow|navy|blue|teal|aqua|orange|red|(\#[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f])|(\#[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f])" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="fontFaceType">
		<xs:restriction base="xs:string">
			<xs:pattern value="cursive|fantasy|monospace|serif|sans-serif|Georgia|Times|Trebuchet|Tahoma|Geneva|Verdana|Arial|Helvetica|Courier|Courier New|Impact" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="floatType">
		<xs:restriction base="xs:string">
			<xs:pattern value="left|right" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="boxType">
		<xs:restriction base="xs:string">
			<xs:pattern value="classic|panel|med|curved|light|invisible" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="boxDimensionsType">
		<xs:restriction base="xs:string">
			<xs:pattern value="(\d+(px|em|pt|ex|in|cm|mm|pc))(\|(\d+(px|em|pt|ex|in|cm|mm|pc))?)" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="alignType">
		<xs:restriction base="xs:string">
			<xs:pattern value="left|right|center|justify" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="targetType">
		<xs:restriction base="xs:string">
			<xs:pattern value="_blank|_self" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="urlType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[^\s]+" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="emailAddressType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[A-Za-z0-9_\-]+@[A-Za-z0-9_\-]+" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="referenceType">
		<xs:restriction base="xs:string">
			<xs:pattern value="url" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="relativeURLType">
		<xs:restriction base="xs:string">
			<xs:pattern value="[^\s]+" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="attachmentType">
		<xs:restriction base="xs:string">
			<xs:pattern value="right|left|right_island|left_island|auto|island|inline|download|code" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="binaryType">
		<xs:restriction base="xs:integer">
			<xs:pattern value="0|1" />
		</xs:restriction>
	</xs:simpleType>

	<!-- The following is our top-level tag -->
	<xs:element name="comcode">
		<xs:complexType>
			<xs:group ref="comcodeTags"/>
		</xs:complexType>
	</xs:element>

	<xs:group name="comcodeTags">
		<!-- The following elements would be handled in bbcode/wikicode-style Comcode via implicit syntaxes -->

		<xs:choice>
			<xs:element name="directive">
				<xs:complexType mixed="true">
					<xs:choice>
						<xs:group ref="comcodeTags" />
						<xs:element name="directiveParam" />
					</xs:choice>
					<xs:attribute name="type" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="language">
				<xs:complexType mixed="true">
					<xs:choice>
						<xs:element name="languageParam" />
					</xs:choice>
				</xs:complexType>
			</xs:element>

			<xs:element name="symbol">
				<xs:complexType mixed="true">
					<xs:choice>
						<xs:element name="symbolParam" />
					</xs:choice>
				</xs:complexType>
			</xs:element>

			<xs:element name="br">
				<xs:complexType />
			</xs:element>

			<xs:element name="hr">
				<xs:complexType />
			</xs:element>
	
			<xs:element name="emoticon">
				<xs:complexType mixed="true" />
			</xs:element>

			<xs:element name="member">
				<xs:complexType mixed="true">
					<xs:attribute name="boxed" type="binaryType" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="cedi">
				<xs:complexType mixed="true">
					<xs:attribute name="anchor" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="list">
				<xs:complexType>
					<xs:choice>
						<xs:element name="listElement" />
					</xs:choice>
					<xs:attribute name="type" type="listType" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="table">
				<xs:complexType>
					<xs:choice>
						<xs:element name="tr">
							<xs:complexType>
								<xs:choice>
									<xs:element name="th">
										<xs:complexType mixed="true">
											<xs:group ref="comcodeTags" />
										</xs:complexType>
									</xs:element>
									<xs:element name="td">
										<xs:complexType mixed="true">
											<xs:group ref="comcodeTags" />
										</xs:complexType>
									</xs:element>
								</xs:choice>
							</xs:complexType>
						</xs:element>
					</xs:choice>
					<xs:attribute name="summary" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="float">
				<xs:complexType>
					<xs:choice>
						<xs:element name="fh">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
							</xs:complexType>
						</xs:element>
						<xs:element name="fd">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
							</xs:complexType>
						</xs:element>
					</xs:choice>
					<xs:attribute name="summary" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<!-- The following elements are just XML equivalents to the normal Comcode tags -->

			<xs:element name="contents">
				<xs:complexType mixed="true">
					<!-- <xs:restriction base="commaSeparatedListNumberingType"> Impossible :( -->
					<xs:attribute name="files" type="xs:string" use="optional" />
					<xs:attribute name="zone" type="xs:string" use="optional" />
					<xs:attribute name="levels" type="xs:positiveInteger" use="optional" />
					<xs:attribute name="base" type="xs:positiveInteger" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="concepts">
				<xs:complexType mixed="true">
					<xs:choice minOccurs="1">
						<xs:group ref="comcodeTags" />
						<xs:element name="showConcept">
							<xs:complexType>
								<xs:attribute name="key" type="xs:string" use="required" />
								<xs:attribute name="value" type="xs:string" use="required" />
							</xs:complexType>
							<xs:key name="conceptKey">
								<xs:selector xpath="showContent" />
								<xs:field xpath="key" />
							</xs:key>
						</xs:element>
					</xs:choice>
				</xs:complexType>
			</xs:element>

			<xs:element name="concept">
				<xs:complexType mixed="true">
					<xs:attribute name="param" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="currency">
				<xs:complexType mixed="true">
					<xs:attribute name="param" type="xs:string" use="optional" />
					<xs:attribute name="bracket" type="binaryType" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="surround">
				<xs:complexType mixed="true">
					<xs:attribute name="param" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="overlay">
				<xs:complexType mixed="true">
					<xs:attribute name="param" type="xs:string" use="optional" />
					<xs:attribute name="x" type="xs:nonNegativeInteger" use="optional" />
					<xs:attribute name="y" type="xs:nonNegativeInteger" use="optional" />
					<xs:attribute name="width" type="xs:nonNegativeInteger" use="optional" />
					<xs:attribute name="height" type="xs:nonNegativeInteger" use="optional" />
					<xs:attribute name="timein" type="xs:nonNegativeInteger" use="optional" />
					<xs:attribute name="timeout" type="xs:nonNegativeInteger" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="flash">
				<xs:complexType mixed="true">
					<xs:attribute name="dimensions" type="terseDimensions" use="optional" /> <!-- They are lumped together because they must occur together or not at all -->
				</xs:complexType>
			</xs:element>

			<xs:element name="indent">
				<xs:complexType mixed="true">
					<xs:attribute name="offset" type="xs:positiveInteger" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="staffNote">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>
	
			<xs:element name="menu">
				<xs:complexType mixed="true">
					<xs:attribute name="codename" type="xs:string" use="required" />
					<xs:attribute name="type" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="cite">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="ins">
				<xs:complexType mixed="true">
					<xs:attribute name="cite" type="xs:string" use="optional" />
					<xs:attribute name="datetime" type="xs:date" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="del">
				<xs:complexType mixed="true">
					<xs:attribute name="cite" type="xs:string" use="optional" />
					<xs:attribute name="datetime" type="xs:date" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="pulse">
				<xs:complexType mixed="true">
					<xs:attribute name="param" type="xs:string" use="optional" />
					<xs:attribute name="min" type="xs:string" use="optional" />
					<xs:attribute name="max" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="dfn">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>
	
			<xs:element name="address">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>
	
			<xs:element name="abbr">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="b">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>
	
			<xs:element name="u">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="i">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>
	
			<xs:element name="s">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="sup">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="sub">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="title">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="level" type="titleType" use="optional" />
					<xs:attribute name="sub" type="xs:string" use="optional" />
					<xs:attribute name="number" type="commaSeparatedListNumberingType" use="optional" />
					<xs:attribute name="base" type="xs:positiveInteger" use="optional" />
				</xs:complexType>
			</xs:element>
	
			<xs:element name="size">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="param" type="xs:integer" use="required" />
				</xs:complexType>
			</xs:element>

			<xs:element name="color">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="param" type="colorType" use="required" />
				</xs:complexType>
			</xs:element>

			<xs:element name="highlight">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="font">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="param" type="fontFaceType" use="optional" />
					<xs:attribute name="color" type="colorType" use="optional" />
					<xs:attribute name="size" type="xs:integer" use="optional" />
				</xs:complexType>
			</xs:element>
	
			<xs:element name="tt">
				<xs:complexType mixed="true" />
			</xs:element>

			<xs:element name="samp">
				<xs:complexType mixed="true" />
			</xs:element>

			<xs:element name="q">
				<xs:complexType mixed="true" />
			</xs:element>

			<xs:element name="var">
				<xs:complexType mixed="true" />
			</xs:element>

			<xs:element name="box">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="float" type="floatType" use="optional" />
					<xs:attribute name="dimensions" type="boxDimensionsType" use="optional" />
					<xs:attribute name="type" type="boxType" use="optional" />
					<xs:attribute name="options" type="xs:string" use="optional" />
					<xs:attribute name="title" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>
	
			<xs:element name="carousel">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="param" type="xs:integer" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="surround">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="param" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="img">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="align" type="alignType" use="optional" />
					<xs:attribute name="url" type="xs:string" use="optional" />
					<xs:attribute name="refresh_time" type="xs:integer" use="optional" />
					<xs:attribute name="title" type="xs:string" use="optional" />
					<xs:attribute name="rollover" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="thumb">
				<xs:complexType mixed="true">
					<xs:attribute name="align" type="alignType" use="optional" />
					<xs:attribute name="storeAs" type="relativeURLType" use="optional" />
					<xs:attribute name="caption" type="xs:string" use="optional" />
					<xs:attribute name="float" type="floatType" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="url">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="align" type="targetType" use="optional" />
					<xs:attribute name="param" type="urlType" use="required" />
				</xs:complexType>
			</xs:element>

			<xs:element name="email">
				<xs:complexType mixed="true">
					<xs:attribute name="address" use="required" type="emailAddressType" />
				</xs:complexType>
			</xs:element>

			<xs:element name="reference">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="type" type="referenceType" use="required" />
					<xs:attribute name="refId" type="xs:string" use="required" />
				</xs:complexType>
			</xs:element>

			<xs:element name="upload">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="type" type="xs:string" use="required" />
					<xs:attribute name="filename" type="xs:string" use="required" />
				</xs:complexType>
			</xs:element>

			<xs:element name="page">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="pageLink" type="xs:string" use="required" />
				</xs:complexType>
			</xs:element>

			<xs:element name="code">
				<xs:complexType mixed="true">
					<xs:attribute name="language" type="xs:string" use="optional" />
					<xs:attribute name="scroll" type="binaryType" use="optional" />
					<xs:attribute name="numbers" type="binaryType" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="hide">
				<xs:complexType mixed="true">
					<xs:choice>
						<xs:group ref="comcodeTags" />
						<xs:element maxOccurs="1" name="hideTitle">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
							</xs:complexType>
						</xs:element>
					</xs:choice>
				</xs:complexType>
			</xs:element>

			<xs:element name="quote">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="cite" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="block">
				<xs:complexType mixed="true">
					<xs:choice>
						<xs:element name="blockParam">
							<xs:complexType>
								<xs:attribute name="key" type="xs:string" use="required" />
								<xs:attribute name="value" type="xs:string" use="required" />
							</xs:complexType>
							<xs:key name="blockKey">
								<xs:selector xpath="showContent" />
								<xs:field xpath="key" />
							</xs:key>
						</xs:element>
						<!-- <xs:restriction base="xs:string"> Not possible :(
							<xs:pattern value="\w+" />
						</xs:restriction> -->
					</xs:choice>
				</xs:complexType>
			</xs:element>
	
			<xs:element name="htmlWrap">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="ifInGroup">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="groupList" type="xs:string" use="required" />
				</xs:complexType>
			</xs:element>

			<xs:element name="expThumb">
				<xs:complexType mixed="true">
					<xs:attribute name="float" type="floatType" use="optional" />
					<!-- <xs:restriction base="relativeURLType" /> Not possible :( -->
				</xs:complexType>
			</xs:element>

			<xs:element name="expRef">
				<xs:complexType mixed="true">
					<xs:attribute name="caption" type="xs:string" use="optional" />
					<!-- <xs:restriction base="relativeURLType" /> Not possible :( -->
				</xs:complexType>
			</xs:element>

			<xs:element name="attachment">
				<xs:complexType mixed="true">
					<xs:annotation>
						<xs:documentation>
							The attachment has an embeddment that has a form that determines what the attachment is (e.g. embedded mime, or, reference ID)
						</xs:documentation>
					</xs:annotation>
					<xs:choice>
						<xs:element maxOccurs="1" name="attachmentDescription">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
							</xs:complexType>
						</xs:element>
					</xs:choice>
					<xs:attribute name="filename" type="xs:string" use="optional" />
					<xs:attribute name="type" type="attachmentType" use="optional" />
					<xs:attribute name="width" type="xs:positiveInteger" use="optional" />
					<xs:attribute name="height" type="xs:positiveInteger" use="optional" />
					<xs:attribute name="align" type="alignType" use="optional" />
					<xs:attribute name="float" type="floatType" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="attachment_safe">
				<xs:complexType mixed="true">
					<xs:annotation>
						<xs:documentation>
							As with 'attachment', but this is an indicator that the attachment should not be reference-counted for auto-deletion.
						</xs:documentation>
					</xs:annotation>
					<xs:choice>
						<xs:element maxOccurs="1" name="attachmentDescription">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
							</xs:complexType>
						</xs:element>
					</xs:choice>
					<xs:attribute name="filename" type="xs:string" use="optional" />
					<xs:attribute name="type" type="attachmentType" use="optional" />
					<xs:attribute name="width" type="xs:positiveInteger" use="optional" />
					<xs:attribute name="height" type="xs:positiveInteger" use="optional" />
					<xs:attribute name="align" type="alignType" use="optional" />
					<xs:attribute name="float" type="floatType" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="align">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="type" type="alignType" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="left">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="center">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="right">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
				</xs:complexType>
			</xs:element>

			<xs:element name="tooltip">
				<xs:complexType mixed="true">
					<xs:choice>
						<xs:element maxOccurs="1" name="tooltipMessage">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
							</xs:complexType>
						</xs:element>
						<xs:group ref="comcodeTags" />
					</xs:choice>
				</xs:complexType>
			</xs:element>

			<xs:element name="post">
				<xs:complexType mixed="true">
					<xs:attribute name="caption" type="xs:string" use="optional" />
					<xs:attribute name="forum" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="topic">
				<xs:complexType mixed="true">
					<xs:attribute name="caption" type="xs:string" use="optional" />
					<xs:attribute name="forum" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>
	
			<xs:element name="include">
				<xs:complexType mixed="true">
					<xs:attribute name="zone" type="xs:string" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="random">
				<xs:complexType>
					<xs:choice minOccurs="1">
						<xs:element name="randomTarget">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
								<xs:attribute name="pickIfAbove" type="xs:nonNegativeInteger" use="required" />
							</xs:complexType>
						</xs:element>
					</xs:choice>
				</xs:complexType>
			</xs:element>

			<xs:element name="ticker">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="width" type="xs:positiveInteger" use="optional" />
					<xs:attribute name="speed" type="xs:decimal" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="tabs">
				<xs:complexType>
					<xs:choice minOccurs="1">
						<xs:element name="tab">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
								<xs:attribute name="default" type="binaryType" use="optional" />
								<xs:attribute name="title" type="xs:string" use="required" />
							</xs:complexType>
						</xs:element>
					</xs:choice>
				</xs:complexType>
			</xs:element>

			<xs:element name="jumping">
				<xs:complexType>
					<xs:choice minOccurs="1">
						<xs:element name="jumpingTarget">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
							</xs:complexType>
						</xs:element>
					</xs:choice>
				</xs:complexType>
			</xs:element>

			<xs:element name="shocker">
				<xs:complexType>
					<xs:choice minOccurs="1">
						<xs:element name="messageLeft">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
							</xs:complexType>
						</xs:element>
					</xs:choice>
					<xs:choice minOccurs="1">
						<xs:element name="messageRight">
							<xs:complexType mixed="true">
								<xs:group ref="comcodeTags" />
							</xs:complexType>
						</xs:element>
					</xs:choice>
				</xs:complexType>
			</xs:element>

			<xs:element name="section">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="name" type="xs:string" use="optional" />
					<xs:attribute name="default" type="binaryType" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="sectionController">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="children" type="xs:string" use="required" />
				</xs:complexType>
			</xs:element>

			<xs:element name="bigTab">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="title" type="xs:string" use="optional" />
					<xs:attribute name="default" type="binaryType" use="optional" />
				</xs:complexType>
			</xs:element>

			<xs:element name="bigTabController">
				<xs:complexType mixed="true">
					<xs:group ref="comcodeTags" />
					<xs:attribute name="children" type="xs:string" use="required" />
					<xs:attribute name="switchTime" type="xs:nonNegativeInteger" use="optional" />
				</xs:complexType>
			</xs:element>

		</xs:choice>

	</xs:group>

</xs:schema>


