|
Subject: Re: [xsl] optimization choose - then same call-template From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Sun, 26 Jan 2003 14:06:30 +0100 |
Hope this helps a bit. Regards,
<!-- the three parameters are inititialized from other template rule, which applies this rule for node df >
<xsl:template match="df">
<xsl:param name="pathNode"/>
<xsl:param name="pathProperties"/>
<xsl:param name="df" select="@name"/>
<!-- select attribute title from xml-source with normalizing (delete)white-space-->
<xsl:variable name="title" select="normalize-space($pathNode[.=$df]/../@title)"/>
<xsl:choose>
<!-- test if title from xml-source is not empty (exist and contains more than white-space)-->
<xsl:when test="$title != '' "><!-- Label --><xsl:value-of select="$title"/>
<xsl:call-template name="df">
<!-- insert title from xml-source and pass parameters to generic template for generation of datafields -->
<xsl:with-param name="thisTitle" select="$title"/>
<xsl:with-param name="thisName" select="$df"/>
<xsl:with-param name="thisPath" select="$pathNode[.=$df]/../."/>
<xsl:with-param name="dfProperties" select="$pathProperties/df[@name=$df]"/>
</xsl:call-template>
</xsl:when>
<!-- title from xml-properties -->
<xsl:otherwise>
<!-- Label --><xsl:value-of select="$pathProperties/df[@name=$df]"/>
<xsl:call-template name="df">
<!-- insert title from xml-properties and pass same parameters as above to generic template for generation of datafields -->
<xsl:with-param name="thisTitle" select="$pathProperties/df[@name=$df]"/>
<xsl:with-param name="thisName" select="$df"/>
<xsl:with-param name="thisPath" select="$pathNode[.=$df]/../."/>
<xsl:with-param name="dfProperties" select="$pathProperties/df[@name=$df]"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] optimization choose - then sa, "Braumüller, Hans" | Thread | [xsl] basic xsl question, Matts Isuls |
| Re: [xsl] xsl:copy question, Joerg Heinicke | Date | RE: [xsl] [off-list] document(lang_, B. Tommie Usdin |
| Month |