Names to mailaddresses?

Discussion in 'XML' started by Peelo, Jul 13, 2003.

  1. Peelo

    Peelo Guest

    Hello,

    I've read a few tutorials but still can't figure out how to xsl next:

    from xml:
    <people>
    <fname>John</fname><sname>Doe</sname><comp>Netscape</comp>
    <fname>James</fname><sname>Doe</sname><comp>Sun</comp>
    </people>

    to html:
    <a href="">John Doe</a><br>
    <a href="">John Doe</a><br>

    TIA

    Peelo
    Peelo, Jul 13, 2003
    #1
    1. Advertising

  2. Peelo

    Peelo Guest

    I think this works;
    <xsl:element name="a">
    <xsl:attribute name="href">
    <xsl:value-of select="concat('mailto:', people/fname, '.', people,sname,
    '@', people/comp, '.com')" />
    </xsl:attribute>
    <xsl:value-of select="concat(people/fname, ' ', people,sname" /><br/>
    </xsl:element>

    Replying to myself,

    Peelo

    "Peelo" <> wrote in message
    news:besfqs$cov$...
    > Hello,
    >
    > I've read a few tutorials but still can't figure out how to xsl next:
    >
    > from xml:
    > <people>
    > <fname>John</fname><sname>Doe</sname><comp>Netscape</comp>
    > <fname>James</fname><sname>Doe</sname><comp>Sun</comp>
    > </people>
    >
    > to html:
    > <a href="">John Doe</a><br>
    > <a href="">John Doe</a><br>
    >
    > TIA
    >
    > Peelo
    >
    >
    Peelo, Jul 14, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paddy McCarthy
    Replies:
    3
    Views:
    689
    Anthony J Bybell
    Sep 24, 2004
  2. Bob
    Replies:
    1
    Views:
    371
    Lucas Tam
    Jul 30, 2004
  3. Lewis G. Pringle, Jr.
    Replies:
    0
    Views:
    588
    Lewis G. Pringle, Jr.
    Sep 30, 2003
  4. Craig
    Replies:
    0
    Views:
    434
    Craig
    Feb 9, 2004
  5. Carl
    Replies:
    0
    Views:
    508
Loading...

Share This Page