xsl-list
[Top] [All Lists]

RE: value of the value of a variable

2004-11-23 08:03:51
Pieter, I actually do want to pass the *name* of a tag to the template -
then in the template I want to access the *value* (text) of the tag that
was passed in.

Hardy

pieter(_dot_)siegers(_at_)elnorte(_dot_)com 11/23/04 09:59AM >>>
Hi Hardy,

You're using

<xsl:with-param name="mytag" select="'full_name'"/>

but I guess you want to use

<xsl:with-param name="mytag" select="full_name"/> 

HTH,
<prs/>

-----Original Message-----
From: Hardy Merrill [mailto:HMerrill(_at_)dhcr(_dot_)state(_dot_)ny(_dot_)us] 
Sent: Tuesday, November 23, 2004 8:31 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
Subject: [xsl] value of the value of a variable

Here is a snippet of my call and template:

-----------------------------------------------------------------

<xsl:call-template name="get_inactive">
        <xsl:with-param name="distno" select="district_no"/>
        <xsl:with-param name="disttype" select="district_type"/>
        <xsl:with-param name="mytag" select="'full_name'"/>
        <xsl:with-param name="legislators"
select="msxsl:node-set($sorted_legislators)"/>
</xsl:call-template>

<xsl:template name="get_inactive">
        <xsl:param name="distno"/>
        <xsl:param name="disttype"/>
        <xsl:param name="mytag"/>
        <xsl:param name="legislators"/>

               <xsl:for-each
select="msxsl:node-set($legislators)/*[legislator_active = 0 and
district_no
= $distno and district_type = $disttype]">

                             <xsl:value-of select="$mytag" /> <<<=====
this
one ======

               </xsl:for-each>

</xsl:template>
--------------------------------------------------------------

In "this one" in the template, $mytag contains the literal "full_name"
- what I want is the *text value* of the full_name tag, but this isn't
doing
it for me.  How do I get that?

TIA.

Hardy Merrill

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list 
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ 
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list 
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ 
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>