<?xml version="1.0"?>
<syntax name="language-root.xml.xsl">
	<zones>
		<!-- Embed HTML inside of the xsl:template tags -->
		<zone name="embedded-html.xml">
			<starts-with>
				<expression>(?=&lt;(?i:xsl:template))</expression>
			</starts-with>
			<ends-with>
				<expression>(&lt;/)((?i:xsl:template))(>)</expression>
				<capture number="0" name="tag.close.xml"/>
				<capture number="1" name="punctuation.definition.begin"/>
				<capture number="2" name="name">
					<subzones>
						<zone>
							<expression>([^:]+)(:)(.*)</expression>
							<capture number="1" name="namespace"/>
							<capture number="2" name="punctuation.separator"/>
							<capture number="3" name="localname"/>
						</zone>
					</subzones>
				</capture>
				<capture number="3" name="punctuation.definition.end"/>
			</ends-with>
			<subzones>
				<zone name="tag.open.xml">
				    <starts-with>
				        <expression>(&lt;)((?i:xsl:template))</expression>
				        <capture number="1" name="punctuation.definition.begin"/>
				        <capture number="2" name="name">
							<subzones>
								<zone>
									<expression>([^:]+)(:)(.*)</expression>
									<capture number="1" name="namespace"/>
									<capture number="2" name="punctuation.separator"/>
									<capture number="3" name="localname"/>
								</zone>
							</subzones>
						</capture>
				    </starts-with>
				    <ends-with>
				        <expression>(/?)(>)</expression>
				        <capture number="1" name="punctuation.definition.self-closing"/>
				        <capture number="2" name="punctuation.definition.end"/>
				    </ends-with>
				    <subzones>
				        <include syntax="language-root.xml" collection="tag-attributes"/>
				    </subzones>
				</zone>
				<zone name="embedded.language-root.html">
					<starts-with>
						<expression>(?&lt;=>)</expression>
					</starts-with>
					<ends-with>
						<expression>(?=&lt;/(?i:xsl:template)>)</expression>
					</ends-with>
					<subzones>
						<include syntax="language-root.html"/>
					</subzones>
				</zone>
			</subzones>
		</zone>
		<!-- Everything else is identical to normal XML -->
		<include syntax="language-root.xml"/>
	</zones>
</syntax>
