1.1 --- a/XSLForms/XSL/Prepare.xsl Tue Aug 16 18:12:00 2005 +0000
1.2 +++ b/XSLForms/XSL/Prepare.xsl Wed Aug 17 16:58:41 2005 +0000
1.3 @@ -33,9 +33,28 @@
1.4
1.5
1.6
1.7 + <!-- Match special conditional expression attributes. -->
1.8 +
1.9 + <xsl:template match="*[@template:if]">
1.10 + <axsl:if test="{@template:if}">
1.11 + <xsl:choose>
1.12 + <xsl:when test="@template:element">
1.13 + <xsl:call-template name="enter-element">
1.14 + <xsl:with-param name="other-elements" select="@template:element"/>
1.15 + </xsl:call-template>
1.16 + </xsl:when>
1.17 + <xsl:otherwise>
1.18 + <xsl:call-template name="enter-attribute"/>
1.19 + </xsl:otherwise>
1.20 + </xsl:choose>
1.21 + </axsl:if>
1.22 + </xsl:template>
1.23 +
1.24 +
1.25 +
1.26 <!-- Match element references. -->
1.27
1.28 - <xsl:template match="*[@template:element]">
1.29 + <xsl:template match="*[not(@template:if) and @template:element]">
1.30 <xsl:call-template name="enter-element">
1.31 <xsl:with-param name="other-elements" select="@template:element"/>
1.32 </xsl:call-template>
1.33 @@ -81,7 +100,7 @@
1.34
1.35 <!-- Match special expression attributes. -->
1.36
1.37 - <xsl:template match="*[not(@template:element) and (@template:attribute or @template:value or @template:expr)]">
1.38 + <xsl:template match="*[not(@template:if) and not(@template:element) and (@template:attribute or @template:value or @template:expr)]">
1.39 <xsl:call-template name="enter-attribute"/>
1.40 </xsl:template>
1.41
1.42 @@ -139,9 +158,9 @@
1.43
1.44
1.45
1.46 - <!-- Remove template elements. -->
1.47 + <!-- Remove template attributes. -->
1.48
1.49 - <xsl:template match="@template:element|@template:attribute|@template:value|@template:expr|@template:expr-attr|@template:effect">
1.50 + <xsl:template match="@template:element|@template:attribute|@template:value|@template:expr|@template:expr-attr|@template:effect|@template:if">
1.51 </xsl:template>
1.52
1.53