00001 <?xml version="1.0" encoding="UTF-8" ?> 00002 <!-- $Id: domain.xsl,v 1.3 2004/05/28 15:27:22 ensonic Exp $ 00003 * @file gitk-renderer-phone/xsl/domain.xsl 00004 * @author Steffen Ast <sast@users.sf.net> 00005 * @date Wed May 12 08:41:31 MET 2004 00006 * 00007 * @brief transfomrms dialog into phone domain 00008 * @ingroup gitkrendererphone 00009 * 00010 --> 00011 <xsl:stylesheet version="1.0" 00012 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 00013 xmlns:giml="http://gitk.sourceforge.net/" 00014 xmlns:dc="http://purl.org/dc/elements/1.1/" 00015 xmlns:i18n="http://apache.org/cocoon/i18n/2.0" 00016 xmlns="http://gitk.sourceforge.net/" 00017 exclude-result-prefixes="giml"> 00018 00019 <xsl:output method="xml" doctype-system="http://gitk.sourceforge.net/giml.dtd"/> 00020 00021 <xsl:template match="/giml:giml/giml:dialog/giml:dialogwidgets"> 00022 <dialogwidgets> 00023 <widget id="__ctrl" type="optionchoice_single_compact"> 00024 <options> 00025 <xsl:apply-templates/> 00026 <option id="Prev"><i18n:text i18n:domain="gitk-renderer-phone">Prev</i18n:text></option> 00027 <option id="Next"><i18n:text i18n:domain="gitk-renderer-phone">Next</i18n:text></option> 00028 </options> 00029 <value>0</value> 00030 </widget> 00031 </dialogwidgets> 00032 </xsl:template> 00033 00034 <xsl:template match="/giml:giml/giml:dialog/giml:dialogwidgets/giml:dialogwidget"> 00035 <option> 00036 <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> 00037 <i18n:text i18n:domain="gitk-core"><xsl:value-of select="@id"/></i18n:text> 00038 </option> 00039 </xsl:template> 00040 00041 <xsl:template match="//giml:widgetgroup"> 00042 <!-- skip empty groups --> 00043 <xsl:if test="count(./giml:widget)!=0"> 00044 <!-- copy whole group --> 00045 <widgetgroup> 00046 <xsl:copy-of select="@*"/> 00047 <xsl:copy-of select="./giml:label"/> 00048 <xsl:copy-of select="./giml:widget"/> 00049 <!-- add anonymous inner groups --> 00050 <xsl:for-each select="./giml:widgetgroup"> 00051 <xsl:if test="count(./giml:label)=0"> 00052 <xsl:copy-of select="./giml:widget"/> 00053 </xsl:if> 00054 </xsl:for-each> 00055 </widgetgroup> 00056 </xsl:if> 00057 <!-- add named inner groups (those with a label) --> 00058 <xsl:for-each select="./giml:widgetgroup"> 00059 <xsl:if test="count(./giml:label)!=0"> 00060 <xsl:apply-templates select="."/> 00061 </xsl:if> 00062 </xsl:for-each> 00063 </xsl:template> 00064 00065 <xsl:template match="@*|node()"> 00066 <xsl:copy> 00067 <xsl:apply-templates select="@*|node()"/> 00068 </xsl:copy> 00069 </xsl:template> 00070 </xsl:stylesheet>