[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[no subject]

truco de unknown
I show this:

<table bgcolor="#FFFFFF" cellspacing="1" cellpadding="0" border="0" 
width="100%">
<tr class="menuItem"><td width="45%">Noticias</td><td 
width="55%">Trucos</td></tr>
<tr class="links"><td>titulo de la noticia</td></tr>
<tr class="links"><td>titulo del truco</td></tr>
</table>

I want to show this:
<table bgcolor="#FFFFFF" cellspacing="1" cellpadding="0" border="0" 
width="100%">
<tr class="menuItem"><td width="45%">Noticias</td><td 
width="55%">Trucos</td></tr>
<tr class="links"><td>titulo de la noticia</td><td>titulo del 
truco</td></tr>
</table>

the question is that if i find one <actual> node with the t value (true) i 
try to show its information into one table, i put, i want to put , into one 
col the information if the <ttipo_noticia> node = noticia and into other col 
if the <tipo_noticia> is = truco but only i can put into the sama col.


for making this i use the bellow xsl file and the bellow xml file.

Please can you help me?

The xsl is this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/registros">
<xsl:for-each select="registro">
<xsl:if test="actual='t'">
<table width="100%" border="0" cellpadding="0" cellspacing="1" 
bgcolor="#FFFFFF">
<tr class="menuItem"><td width="45%">Noticias</td><td 
width="55%">Trucos</td></tr>
<tr class="links">
<td>
<xsl:for-each select="noticias/noticia">
<xsl:choose>
<xsl:when test="tipo_noticia='noticia'"><xsl:value-of 
select="titulo_noticiacastellano" disable-output-escaping="yes"/></xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</td>
</tr>
<tr class="links">
<td>
<xsl:for-each select="noticias/noticia">
<xsl:choose>
<xsl:when test="tipo_noticia='truco'"><xsl:value-of 
select="titulo_noticiacastellano" disable-output-escaping="yes"/></xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</td>
</tr>
</table>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>



this XML file is this:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<registros>
<registro>
<actual>t</actual>
<noticias>
<noticia>
<titulo_noticiacastellano>titulo de la noticia</titulo_noticiacastellano>
<tipo_noticia>noticia</tipo_noticia>
</noticia>
<noticia>
<titulo_noticiacastellano>titulo del truco</titulo_noticiacastellano>
<tipo_noticia>truco</tipo_noticia>
</noticia>
</noticias>
<titulo_boletincastellano>titulo del boletin 
actual</titulo_boletincastellano>
</registro>
<registro>
<actual>f</actual>
<titulo_boletincastellano>titulode l boletin</titulo_boletincastellano>
</registro>
<registro>
<actual>f</actual>
<titulo_boletincastellano>Nuevo Boletin</titulo_boletincastellano>
</registro>
<registro>
<actual>f</actual>
<titulo_boletincastellano>titulodel bletin</titulo_boletincastellano>
</registro>
<registro>
<actual>f</actual>
<titulo_boletincastellano>titulod el boletin </titulo_boletincastellano>
</registro>
<registro>
<actual>f</actual>
<titulo_boletincastellano> titulo del boletin</titulo_boletincastellano>
</registro>
</registros> 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.