<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sch="http://www.ascc.net/xml/schematron" version="1.0">
	<xsl:template match="*|@*" mode="schematron-get-full-path">
		<xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>
		<xsl:text>/</xsl:text>
		<xsl:if test="count(. | ../@*) = count(../@*)">@</xsl:if>
		<xsl:value-of select="name()"/>
		<xsl:text>[</xsl:text>
		<xsl:value-of select="1+count(preceding-sibling::*[name()=name(current())])"/>
		<xsl:text>]</xsl:text>
	</xsl:template>
	<xsl:template match="/">
		<xsl:apply-templates select="/" mode="M1"/>
	</xsl:template>
	<xsl:template match="address" priority="4000" mode="M1">
		<xsl:choose>
			<xsl:when test="(count(phone[@type = 'voice']) &gt; 0) and (count(phone[@type = 'fax']) &gt;  0)"/>
			<xsl:otherwise>there must be at least one voice and one fax number</xsl:otherwise>
		</xsl:choose>
		<xsl:apply-templates mode="M1"/>
	</xsl:template>
	<xsl:template match="text()" priority="-1" mode="M1"/>
	<xsl:template match="text()" priority="-1"/>
</xsl:stylesheet>