Sorry, here's the complete tree XML :
<root name="eu" >
<place position="1" link="place1.xml">
<subject area="Brasil">
<fonte name="courier" />
<especificacoes>
<especificacao descricao="" valor="" />
<especificacao descricao="" valor="" />
</especificacoes>
<imagens>
<image legend="legend" type="photo2" link="image/photo2.jpg" />
<image legend="legend" type="photo1" link="image/photo1.jpg" />
</imagens>
<texto tipo="grande">
Bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
bla, bla,
bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla, bla,
bla!
</texto>
<texto tipo="medio">
bla-bla-bla chamada1 bla-bla-bla, bla, bla, bla, bla, bla, bla, bla,
bla,
</texto>
<texto tipo="pequeno">
bla-bla-bla chamada1 bla-bla-bla
</texto>
</subject>
</place>
</root>
The template is this ???
<xsl:template match="subject">
<table>
<xsl:for-each select="image[@type='photo1']">
<tr><td><a>
<xsl:attribute name="href">
<xsl:value-of select="@link"/>
</xsl:attribute>
<xsl:value-of select="@legend"/>
</a></td></tr>
</xsl:for-each>
</table>
<xsl:template/>
thanxs a lot,
Roger
----- Original Message -----
From: Albert, Kevin <kjalbert@software.rockwell.com>
To: <cocoon-dev@xml.apache.org>
Sent: Tuesday, August 08, 2000 3:43 PM
Subject: [Cocoon Devel] RE: XSP
> You've not shown a complete xml tree, so it is somewhat difficult to give
a complete answer.
>
> This is not tested, but have you tried something like the following in the
template that processes the image elements' parent node:
>
> <table>
> <xsl:for-each select="image[@type='photo1']">
> <tr><td><a>
> <xsl:attribute name="href">
> <xsl:value-of select="@link"/>
> </xsl:attribute>
> <xsl:value-of select="@legend"/>
> </a></td></tr>
> </xsl:for-each>
> </table>
>
> ... repeat above for photo2 types ...
>
> Regards,
> Kevin Albert
> Rockwell Software
>
>
> -----Original Message-----
> From: Rogerio Lacerda [mailto:rogerforum@newmail.net]
> Sent: Monday, August 07, 2000 5:10 PM
> To: cocoon-dev@xml.apache.org
> Subject: XSP
>
>
> Problem:
>
> I have a XML:
>
> <image legend="legend" type="photo2" link="image/photo2.jpg" />
> <image legend="legend" type="photo1" link="image/photo1.jpg" />
>
> But I need show in first table the photo1 and in second table the
photo2...
>
> The photo2 ( like above ) is in first line and photo1 in second line...how
I
> process this XSL/XSP ???
>
> The XSL with XSP dont accept CALL-TEMPLATE...
>
> Thanxs a lot,
>
>
> Roger
>
>
> _______________________________________________
> cocoon-devel mailing list
> cocoon-devel@lists.real-time.com
> https://mailman.real-time.com/mailman/listinfo/cocoon-devel
>
|