View Single Post
  #1 (permalink)  
Old July 10th, 2007, 06:57 AM
kgoldvas kgoldvas is offline
Authorized User
 
Join Date: Jan 2006
Location: tel aviv, israel, Israel.
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default template calling

hello

I have 2 templates that look pretty the same with one different. in one there is attribute apiNode and in the other there isnt.
I would like to make out of them one template that with an 'if' function I would know which to call (the one with the apiNode or the one with out). in a simple words, is there a function that will check if there is apiNode (boolean or something)
this are the 2 templates
<xsl:template name="group-column">
    <xsl:param name="key" select="''"/>
    <xsl:param name="apiNode" select="''"/>
    <xsl:param name="apiImport" select="''"/>
        <xsl:attribute name="key">
            <xsl:value-of select="$key"/>
        </xsl:attribute>
        <xsl:attribute name="apiNode">
            <xsl:value-of select="$apiNode"/>
        </xsl:attribute>
        <xsl:attribute name="apiImport">
            <xsl:value-of select="$apiImport"/>
        </xsl:attribute>
</xsl:template>
<xsl:template name="generalKeyDisplay">
    <xsl:param name="key" select="''"/>
    <xsl:param name="display" select="''"/>
    <xsl:attribute name="key">
        <xsl:value-of select="$key"/>
    </xsl:attribute>
    <xsl:attribute name="display">
        <xsl:value-of select="$display"/>
    </xsl:attribute>
</xsl:template>

thank you


Reply With Quote