<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" encoding="UTF-8" doctype-public="PUBLIC -//W3C//DTD HTML 4.01 //EN"  />
    <!--main画面のプリンタ一覧ページ-->
    <xsl:template match="root">
        <h4>
            <xsl:value-of select="LangResource/String/Item/@Index"/>
        </h4>
        <table class="invisible" border="0">
			<xsl:apply-templates select="HelpInfo/PluginName/Item"/>
	    </table>

    </xsl:template>
    <xsl:template match="HelpInfo/PluginName/Item">
        <xsl:variable name="PName" select="@index"/>
        <xsl:variable name="dir" select="@dir"/>
    	<tr>
    		<td>
				<img src = "images/tree_minus.gif" border="0"/>
			</td>
    		<td nowrap="">
				<xsl:value-of select="@index"/>
    		</td>
    	</tr>
    	<tr>
    		<td></td>
    		<td>
    		    <table id="{$PName}" class="invisible" border="0">
	    			<xsl:apply-templates select="../../Index/Item[@pname=$PName and @dir=$dir]"/>
			    </table>
			</td>
		</tr>
    </xsl:template>
    
    <xsl:template match="HelpInfo/Index/Item">
    	<xsl:variable name="PName" select="@index"/>
    	<xsl:variable name="dir" select="@dir"/>
    	<xsl:variable name="url" select="@url"/>
    	<tr>
			<xsl:choose>
				<xsl:when test="@url!=''">
				    <td>
						<img src = "images/tree_item.gif" border="0"/>
					</td>
					<td nowrap="">
    				    <a href="#">
							<xsl:attribute name="onClick">
								<xsl:text>openurl('</xsl:text>
								<xsl:value-of select="@url"/>
								<xsl:text>');</xsl:text>
							</xsl:attribute>
							<xsl:value-of select="@index"/>
						</a>
					</td>
				</xsl:when>
				<xsl:otherwise>
				    <td>
						<img src = "images/tree_minus.gif" border="0" id="{$PName}{$dir}i" />
					</td>
					<td nowrap="">
						<xsl:value-of select="@index"/>
					</td>
				</xsl:otherwise>
			</xsl:choose>
  		</tr>
    	<tr>
    		<td></td>
    		<td>
  		  		<table id="{$PName}{$dir}" class="invisible" border="0">
			    	<xsl:apply-templates select="../../Index2/Item[@pname=$PName and @dir=$dir]"/>
		    	</table>
			</td>
		</tr>
    </xsl:template>
    
    <xsl:template match="HelpInfo/Index2/Item">
	    <xsl:variable name="PName" select="@index"/>
	    	<tr>
				<td>				    	
					<a href="#" tabindex="-1">
						<xsl:attribute name="onClick">
							<xsl:text>openurl('</xsl:text>
							<xsl:value-of select="@url"/>
							<xsl:text>');</xsl:text>
						</xsl:attribute>
						<img src = "images/tree_item.gif" border="0"/>
					</a>
				</td>
				<td width="100%" nowrap="">
				    <a href="#">
						<xsl:attribute name="onClick">
							<xsl:text>openurl('</xsl:text>
							<xsl:value-of select="@url"/>
							<xsl:text>');</xsl:text>
						</xsl:attribute>
						<xsl:value-of select="@index"/>
					</a>
	    		</td>
	    	</tr>
    </xsl:template>
</xsl:stylesheet>