xsl-list
[Top] [All Lists]

[xsl] Concatenation of Element Values

2007-06-21 21:08:41
hi list,

i'm a newbie on XSL and i'm really overwhelmed by the
information i've
 seen on the internet that i'm already confused as to
how i'm going to
 come up with the rights codes for my program. here's
my problem..

i have an xml that's like this:
<ADDRESS>
    <ADDRESSFIELD>
            <ID>2</ID>
    <ADDRESSFIELD>
    <ADDRESSFIELD>
            <ID>5</ID>
    <ADDRESSFIELD>
    <ADDRESSFIELD>
            <ID>9</ID>
    <ADDRESSFIELD>
<ADDRESS>

then i also have some post parameters:
<addressField2>some Street address</addressField2>
<addressField5>some Town address</addressField5>
<addressField9>some City address</addressField9>

and this is the value i need to get:
<addressField2>;<addressField5>;<addressField9>
ex. some Street address; some Town address; some City
address

so far, this is what i have:
<xsl:template match="ADDRESS">
    <xsl:for-each select="ADD">
        <xsl:call-template name="getAdd">
            <xsl:with-param name="addField">
                in_add<xsl:value-of select="ID"/>
            </xsl:with-param>
        </xsl:call-template>
    </xsl:for-each>
</xsl:template>

<xsl:template name="getAdd">
    <xsl:param name="addField"/>

    <!-- this is where i'm lost. i'm lost on how im
gonna get the
 address field values and concatenate them -->
 
</xsl:template>



hope someone can shed some light on my blurry mind. 
any help is
 greatly greatly appreciated.  thanks!

-ycon


 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

--~------------------------------------------------------------------
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>