This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Problem in xsl:for-each
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: jam at mundofree dot com
- Cc: "xsl-list at lists dot mulberrytech dot com" <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 10 Jan 2002 16:58:40 +0000
- Subject: Re: [xsl] Problem in xsl:for-each
- Organization: Jeni Tennison Consulting Ltd
- References: <a67b7d1a.7d1aa67b@mundofree.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Jam,
> I'm trying to access to all items in node 'Parrafo'.
> Variable $Nombre_Fichero contains a valid filename .
> This XSL does not output all elements. (This is the real problem )
>
> <xsl:for-each
> select="$Nombre_Fichero//Documento/Noticia/Cuerpo/Parrafo">
> <xsl:copy-of select="$Nombre_Fichero//."/>
> <br>
> </br>
> </xsl:for-each>
Perhaps you want:
<xsl:for-each
select="$Nombre_Fichero//Documento/Noticia/Cuerpo/Parrafo">
<xsl:copy-of select="." />
<br />
</xsl:for-each>
This will give you a copy of each Parrafo element, separated by br
elements.
But you said that $Nombre_Fichero contained a filename (and not a node
set, which is what it would have to hold for the above file to work),
so possibly you're actually after:
<xsl:for-each
select="document($Nombre_Fichero)//Documento/Noticia/Cuerpo/Parrafo">
<xsl:copy-of select="." />
<br />
</xsl:for-each>
Feel free to post more details about your source document and the
output that you want to generate if the above doesn't work.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list