<?xml version="1.0" encoding="UTF-8"?>

<!-- ***************************************************************************
*  (c) 2004 by Basler Vision Technologies
*  Section: Vision Components
*  Project: GenApi
*	Author:  Fritz Dierks
******************************************************************************** -->

<xsl:stylesheet version="1.0" 
	xmlns:my="http://www.genicam.org/GenApi/Version_1_0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

	<xsl:output method="text" encoding="UTF-8"/>	
	<xsl:template match="/">
		//-----------------------------------------------------------------------------
		//  (c) 2004 by Basler Vision Technologies
		//  Section: Vision Components
		//  Project: GenApi
		//	Author:  Fritz Dierks
		//-----------------------------------------------------------------------------
		/*!
			\file     <xsl:value-of select="//my:Root/@Name"/>.dot
		*/
		//-----------------------------------------------------------------------------
		//  This file is generated automatically
		//  Do not modify!
		//-----------------------------------------------------------------------------

		digraph GenApi 
		{
			<xsl:apply-templates select="/*/my:*" mode="ListNodes"/>
			<xsl:apply-templates select="/*/my:*" mode="Connections"/>
		}	
	</xsl:template>
	
	<!-- ListNodes ******************************************** -->

	<xsl:template  match="my:*" mode="ListNodes">
		<xsl:value-of select="@Name"/> [label="<xsl:value-of select="name()"/>::<xsl:value-of select="@Name"/>"];
	</xsl:template>

	<!-- Connections ******************************************** -->

	<xsl:template  match="my:*" mode="Connections">
		<xsl:apply-templates select="./*" mode="InsideConnections"/>
	</xsl:template>
	
	<xsl:template  match="my:*" mode="InsideConnections">
		<xsl:choose>
			<xsl:when test="starts-with(name(), 'p')">
				<xsl:value-of select="../@Name"/> -> <xsl:value-of select="."/> [label="<xsl:value-of select="name()"/>"];
			</xsl:when>
		</xsl:choose>
	</xsl:template>

</xsl:stylesheet>
