How to pass out put of an xslt template as an input to another template

My xslt and xml are attached. I am calling a template    <xsl:call-template name="strip-tags"> and passing a parameter. This template produces an output. Then I need to call another template <xsl:template name="process-values"> and pass in the output of the strip tags template as a parameter to this template. how can we achive this?

Thanks,
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
	
	  <xsl:variable name="lc" select="'azertyuiopqsdfghjklmwxcvbn'"/>
        <xsl:variable name="uc" select="'AZERTYUIOPQSDFGHJKLMWXCVBN'"/>
         
        
	<xsl:template match="/">
		<Records>
			<xsl:for-each select="/documents/document">
				<record>
				
					
        <xsl:call-template name="strip-tags">
			<xsl:with-param name="text" select="translate(normalize-space(substring-after(concat(element[@name='MSHValues']/value,element[@name='MTHValues']/value,element[@name='SNOMEDCTValues']/value), ':')), $uc, $lc)" />
          </xsl:call-template>
          
          
       </record>
			</xsl:for-each>
				</Records>
			  </xsl:template>
			
    <xsl:template name="process-values">
        <xsl:param name="list"/>
        <xsl:param name="remaining"/>
        <xsl:choose>
            <xsl:when test="contains($remaining, ';')">
                <xsl:variable name="new-list">
                    <xsl:call-template name="filter-and-add">
                        <xsl:with-param name="list" select="$list"/>
                        <xsl:with-param name="term" select="substring-before($remaining, ';')"/>
                    </xsl:call-template>
                </xsl:variable>
                 <xsl:call-template name="process-values">
                    <xsl:with-param name="list" select="$new-list"/>
                    <xsl:with-param name="remaining" select="substring-after($remaining, ';')"/>
                </xsl:call-template>
            </xsl:when>
            <xsl:otherwise>
                <xsl:variable name="new-list">
                    <xsl:call-template name="filter-and-add">
                        <xsl:with-param name="list" select="$list"/>
                        <xsl:with-param name="term" select="$remaining"/>
                    </xsl:call-template>
                </xsl:variable>
                <xsl:value-of select="substring($new-list, 3)"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    <xsl:template name="filter-and-add">
        <xsl:param name="list"/>
        <xsl:param name="term"/>
        <xsl:param name="norm-term" select="normalize-space(translate($term, '()1234567890', ''))"></xsl:param>
        <xsl:choose>
            <xsl:when test="not(contains(concat($list, '; '), concat('; ', $norm-term, '; ')))">
                <xsl:value-of select="concat($list, '; ', $norm-term)"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:value-of select="$list"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
    
    <xsl:template name="strip-tags">
		<xsl:param name="text"/>
		<xsl:choose>
			<xsl:when test="contains($text, '&lt;')">
				<xsl:value-of select="substring-before($text, '&lt;')"/>
				<xsl:call-template name="strip-tags">
					<xsl:with-param name="text" select="substring-after($text, '&gt;')"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$text"/>
			</xsl:otherwise>
		</xsl:choose>
		
		
	</xsl:template>
	
     
</xsl:stylesheet>

Open in new window

<?xml version="1.0" encoding="utf-8"?>
<documents><document id="http://www.qualitymeasures.ahrq.gov/content.aspx?id=26549"><element name="MSHValues"><value>: 

                                            &lt;a href='/search/search.aspx?term=Cross+Infection &amp;umls=1'&gt;Cross Infection&lt;/a&gt;; &lt;a href='/search/search.aspx?term=Postoperative+Complications &amp;umls=1'&gt;Postoperative Complications&lt;/a&gt;; &lt;a href='/search/search.aspx?term=Sepsis &amp;umls=1'&gt;Sepsis&lt;/a&gt;

                                        </value></element><element name="MTHValues"><value>: 

                                            &lt;a href='/search/search.aspx?term=Systemic+infection &amp;umls=1'&gt;Systemic infection&lt;/a&gt;

                                        </value></element><element name="SNOMEDCTValues"><value>: 

                                            &lt;a href='/search/search.aspx?term=Cross+infection &amp;umls=1'&gt;Cross infection&lt;/a&gt; (36406009); &lt;a href='/search/search.aspx?term=Nosocomial+infectious+disease &amp;umls=1'&gt;Nosocomial infectious disease&lt;/a&gt; (19168005); &lt;a href='/search/search.aspx?term=Postoperative+complication &amp;umls=1'&gt;Postoperative complication&lt;/a&gt; (385486001); &lt;a href='/search/search.aspx?term=Systemic+infection &amp;umls=1'&gt;Systemic infection&lt;/a&gt; (91302008)


</document></documents>

Open in new window

mmalik15Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gertone (Geert Bormans)Information ArchitectCommented:
just wrap it        


<xsl:call-template name="process-values">
            <xsl:with-param name="list" select="';'"/>
            <xsl:with-param name="remaining" >
                    <xsl:call-template name="strip-tags">
                  <xsl:with-param name="text" select="translate(normalize-space(substring-after(concat(element[@name='MSHValues']/value,element[@name='MTHValues']/value,element[@name='SNOMEDCTValues']/value), ':')), $uc, $lc)" />
                    </xsl:call-template>          
            </xsl:with-param>
        </xsl:call-template>

or make the call in a variable and use the variable as the param value

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.