Search Results

Search found 1 results on 1 pages for 'siondream'.

Page 1/1 | 1 

  • XSLT - Comparing preceding-sibling's elements with current's node element

    - by siondream
    Hello, I have this XML file: <recursos> <recurso url="http://w3c.com"> <descripcion>Consorcio W3C</descripcion> <tipo>externo</tipo> <idioma>ingles</idioma> <contenido>General</contenido> <unidad>Unidad 2</unidad> </recurso> <recurso url="http://html.com"> <descripcion>Especificación HTML</descripcion> <tipo>externo</tipo> <idioma>castellano</idioma> <contenido>HTML</contenido> <version>4.01</version> <unidad>Unidad 3</unidad> </recurso> </recursos> I want to compare one "recurso"'s preceding sibling element "unidad" with the "unidad" of the current "recurso" to check if they're different. I was trying: <xsl:if test="preceding-sibling::recurso[position()=1]::unidad != unidad"> </xsl:if> But I know it's horribly wrong :( I hope you could help me, thank you very much.

    Read the article

1