<?xml version="1.0"?> 
<xsl:stylesheet 
     version="1.0" 
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
	
<!--
	===========	From XGMML  TO Broken Links Report  =================
			     by John Punin
-->

<xsl:template match="text()"></xsl:template>

<!-- 
	=============For all ELEMENTS in XGMML===============
-->
	

<xsl:template match="/graph/node/att"><xsl:apply-templates select="@name"/></xsl:template>


<!--name-->
<xsl:template match="@name[.='code' and ../@value='404']">
<xsl:variable name="t"><xsl:value-of select="../../@id"/>
</xsl:variable>
<xsl:variable name="l"><xsl:value-of select="../../@label"/>
</xsl:variable>
<xsl:for-each select="/graph/edge/@target[.=$t]">
<xsl:variable name="s"><xsl:value-of select="../@source"/>
</xsl:variable>
<xsl:for-each select="/graph/node/@id[.=$s]">
<xsl:value-of select="../@label"/> -> <xsl:value-of select="$l"/></xsl:for-each><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>

<xsl:template match="@name[not(.='code' and ../@value='404')]">
</xsl:template>

</xsl:stylesheet>

