Evitar valores duplicados en xsl
Publicado por Alfredo (1 intervención) el 15/03/2015 18:32:34
Buenas tardes, quiero eliminar los valores repetidos en xslt y no encuentro información al respecto, ¿Alguien me puede ayudar?
Cuando quiero extraer los valores de autonomía, me sale repetido el valor Andalucía dos veces, y me gustaría que solo saliera una vez.
Gracias por la ayuda.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="/come">
<link rel="stylesheet" type="text/css" href="LMSGI05_O2.css"/>
<html>
<head>
Actividad 4
</head>
<body>
<div class="intro">
<h2> Confederacion ornitologica mundial</h2>
</div>
<div class="parte2">
<h3>Autonomías participantes</h3>
<xsl:for-each select="confederacion">
<xsl:sort select="autonomia" data-type="text" order="descending"/>
<ul>
<li> <xsl:value-of select=" autonomia"></xsl:value-of></li>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Cuando quiero extraer los valores de autonomía, me sale repetido el valor Andalucía dos veces, y me gustaría que solo saliera una vez.
Gracias por la ayuda.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="/come">
<link rel="stylesheet" type="text/css" href="LMSGI05_O2.css"/>
<html>
<head>
Actividad 4
</head>
<body>
<div class="intro">
<h2> Confederacion ornitologica mundial</h2>
</div>
<div class="parte2">
<h3>Autonomías participantes</h3>
<xsl:for-each select="confederacion">
<xsl:sort select="autonomia" data-type="text" order="descending"/>
<ul>
<li> <xsl:value-of select=" autonomia"></xsl:value-of></li>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Valora esta pregunta


0