[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: show if there is more than one node
<xsl:if test="count(/sn_paginas/pagina_id) > 1"> ... </xsl:if> -----Original Message----- From: Dionisio Ruiz de Zarate [mailto:dionisio@xxxxxxxxxxxxx] Sent: Saturday, May 01, 2004 2:27 PM To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: show if there is more than one node heloow. i have this xml: <?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?> <sn_servicioproyecto> <sn_masterinformacion> <paginas> <sn_paginas> <pagina_id><![CDATA[1691]]></pagina_id> </sn_paginas> <sn_paginas> <pagina_id><![CDATA[1692]]></pagina_id> </sn_paginas> <sn_paginas> <pagina_id><![CDATA[1693]]></pagina_id> </sn_paginas> </paginas> </sn_masterinformacion> </sn_servicioproyecto> whith: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="ISO-8859-1" indent="yes" omit-xml-declaration="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="/"> <xsl:for-each select="sn_servicioproyecto/sn_masterinformacion/paginas/sn_paginas"> <xsl:_value-of select="pagina_id"/> </xsl:for-each> i can print all the pagina id values. but i have one problem, if only there is one sn_paginas/pagina_id i dont want to print it, only i want to print them if there are more than one node. how can i make it? can you help me? thanks
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|