sysdeftools/validate/test-model.xsl
branchHighFidelityModel
changeset 338 d6135f9653cf
parent 334 18ee574c682a
equal deleted inserted replaced
336:fad9aea73cac 338:d6135f9653cf
    90 	<xsl:call-template name="Error"><xsl:with-param name="text">Attribute <xsl:value-of select="name()"/>="<xsl:value-of select="."/>" is not valid for <xsl:value-of select="name(..)"/></xsl:with-param></xsl:call-template>
    90 	<xsl:call-template name="Error"><xsl:with-param name="text">Attribute <xsl:value-of select="name()"/>="<xsl:value-of select="."/>" is not valid for <xsl:value-of select="name(..)"/></xsl:with-param></xsl:call-template>
    91 </xsl:template>
    91 </xsl:template>
    92 
    92 
    93 <xsl:template match="@before|@id|package/@span|layer/@span|collection/@level|package/@level|package/@levels|layer/@levels" mode="valid"/> <!-- really should check syntax -->
    93 <xsl:template match="@before|@id|package/@span|layer/@span|collection/@level|package/@level|package/@levels|layer/@levels" mode="valid"/> <!-- really should check syntax -->
    94 
    94 
    95 <xsl:template match="@name|@href|@filter|unit/@version|unit/@prebuilt" mode="valid"/> 
    95 <xsl:template match="@name|@href|@filter|package/@version|unit/@version|unit/@prebuilt" mode="valid"/> 
    96 
    96 
    97 <xsl:template match="component/@introduced|component/@deprecated" mode="valid"/> 
    97 <xsl:template match="component/@introduced|component/@deprecated" mode="valid"/> 
    98 
    98 
    99 <xsl:template match="component/@origin-model" mode="valid"/>
    99 <xsl:template match="component/@origin-model" mode="valid"/>
   100 
   100 
   303 		<xsl:with-param name="filename" select="$filename"/>
   303 		<xsl:with-param name="filename" select="$filename"/>
   304 	</xsl:apply-templates>
   304 	</xsl:apply-templates>
   305 </xsl:template>
   305 </xsl:template>
   306 
   306 
   307 
   307 
   308 <xsl:template match="unit/@*" priority="-1">	
   308 <xsl:template match="unit/@* | meta/@*" priority="-1">	
   309 	<xsl:apply-templates select="." mode="valid"/>
   309 	<xsl:apply-templates select="." mode="valid"/>
   310 </xsl:template>
   310 </xsl:template>
   311 
   311 
   312 
   312 
   313 <xsl:template match="@id" mode="path">
   313 <xsl:template match="@id" mode="path">
   371 				<xsl:apply-templates select="ancestor::collection" mode="localid"/>
   371 				<xsl:apply-templates select="ancestor::collection" mode="localid"/>
   372 				</xsl:when>
   372 				</xsl:when>
   373 				<xsl:when test="ancestor::collection"/>
   373 				<xsl:when test="ancestor::collection"/>
   374 			</xsl:choose>/<xsl:apply-templates select="ancestor::component" mode="localid"/>/</xsl:variable>
   374 			</xsl:choose>/<xsl:apply-templates select="ancestor::component" mode="localid"/>/</xsl:variable>
   375 		<xsl:choose>
   375 		<xsl:choose>
   376 			<xsl:when test="not(starts-with(concat(.,'/'),$segment)) and $path-errors">
   376 			<xsl:when test="not(starts-with(concat(.,'/'),$segment) or starts-with(concat('/',.,'/'),$segment)) and $path-errors">
   377 				<xsl:call-template name="Note"><xsl:with-param name="text">Unexpected <code><xsl:value-of select="name()"/></code> path for <xsl:apply-templates mode="path" select="../../../@id"/> -&gt; <strong><xsl:apply-templates mode="path" select="../../@id"/></strong>: "<xsl:value-of select="$fullpath"/>"</xsl:with-param></xsl:call-template>
   377 				<xsl:call-template name="Note"><xsl:with-param name="text">Unexpected <code><xsl:value-of select="name()"/></code> path for <xsl:apply-templates mode="path" select="../../../@id"/> -&gt; <strong><xsl:apply-templates mode="path" select="../../@id"/></strong>: "<xsl:value-of select="$fullpath"/>"</xsl:with-param></xsl:call-template>
   378 			</xsl:when>
   378 			</xsl:when>
   379 		</xsl:choose>
   379 		</xsl:choose>
   380 </xsl:template>
   380 </xsl:template>
   381 
   381