EDCzip
EDCzip

Reputation: 25

Some problems with xslt and ul with xml

I have a problem. I have to show on the screen a list inside a xml with a xslt like html. The thing is that it only shows the first parameter. The problem is that I cannot use javascript or variables, but I have no idea. Thanks, here's the code

The xml:

 <UsuariosDestacados>
        <Usuario>Jonathan Joestar</Usuario>
        <Usuario>Joseph Joestar</Usuario>
        <Usuario>Will Anthonio Zeppeli</Usuario>
        <Usuario>Ceaser Zeppeli</Usuario>
    </UsuariosDestacados>

An here is the xsl

<h3>Usuarios destacados</h3>
<ul>
   <xsl:for-each select="Hamon/UsuariosDestacados">
       <li><xsl:value-of select="Usuario"/></li>
   </xsl:for-each>
</ul>

An here is the output:

Usuarios destacados

•Jonathan Joestar

Upvotes: 0

Views: 32

Answers (1)

michael.hor257k
michael.hor257k

Reputation: 117073

I am guessing (!) you want to do:

   <xsl:for-each select="Hamon/UsuariosDestacados/Usuario">
       <li><xsl:value-of select="."/></li>
   </xsl:for-each>

I can only guess, because you did not post a reproducible example.

Upvotes: 2

Related Questions