1.1 --- a/XSLForms/XSL/QtDesignerExtract.xsl Mon Oct 24 18:13:33 2005 +0000
1.2 +++ b/XSLForms/XSL/QtDesignerExtract.xsl Mon Oct 24 18:13:53 2005 +0000
1.3 @@ -23,6 +23,7 @@
1.4
1.5 <xsl:output indent="yes" omit-xml-declaration="yes"/>
1.6 <xsl:param name="widget-name"/>
1.7 + <xsl:variable name="widget" select="//widget[property[@name='name' and cstring/text() = $widget-name]]"/>
1.8
1.9
1.10
1.11 @@ -31,13 +32,7 @@
1.12 <xsl:template match="UI">
1.13 <xsl:copy>
1.14 <xsl:apply-templates select="@*"/>
1.15 - <!-- xsl:copy-of select="class"/>
1.16 - <widget class="QWidget">
1.17 - <property name="name">
1.18 - <cstring><xsl:value-of select="class/text()"/></cstring>
1.19 - </property -->
1.20 - <xsl:apply-templates select="//widget[property[@name='name' and cstring/text() = $widget-name]]"/>
1.21 - <!-- /widget -->
1.22 + <xsl:apply-templates select="$widget"/>
1.23 <xsl:apply-templates select="connections"/>
1.24 <xsl:copy-of select="slots"/>
1.25 <xsl:copy-of select="layoutdefaults"/>
1.26 @@ -52,7 +47,11 @@
1.27
1.28 <xsl:template match="connections">
1.29 <xsl:copy>
1.30 - <xsl:copy-of select="connection[sender/text() = $widget-name or receiver/text() = $widget-name]"/>
1.31 + <xsl:for-each select="connection">
1.32 + <xsl:if test="$widget/descendant-or-self::widget[property[@name='name' and (cstring/text() = current()/receiver/text() or cstring/text() = current()/sender/text())]]">
1.33 + <xsl:copy-of select="."/>
1.34 + </xsl:if>
1.35 + </xsl:for-each>
1.36 </xsl:copy>
1.37 </xsl:template>
1.38