This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem in xsl:for-each


It's perfect, thank you Jeni

Cheers
JAM

----- Original Message ----- 
From: "Jeni Tennison" <jeni@jenitennison.com>
To: <jam@mundofree.com>
Cc: <xsl-list@lists.mulberrytech.com>
Sent: Thursday, January 10, 2002 6:32 PM
Subject: Re: [xsl] Problem in xsl:for-each


> Hi Jam,
> 
> >      <xsl:variable name="Nombre_Fichero" select="document(string
(.))"/>
> [snip]
> >      <xsl:for-each select="document
> > ($Nombre_Fichero)//Documento/Noticia/Cuerpo/Parrafo">
> >       <xsl:text>Parrafo : </xsl:text>
> >       <xsl:copy-of select="$Nombre_Fichero//."/>
> >       <br>
> >       </br>
> >      </xsl:for-each>
> 
> Here, the $Nombre_Fichero variable holds a root node (not the file
> name), so you need the first of the possible solutions I gave you:
> 
>   <xsl:for-each
>       select="$Nombre_Fichero//Documento/Noticia/Cuerpo/Parrafo">
>     <xsl:text>Parrafo : </xsl:text>
>     <xsl:copy-of select="." />
>     <br />
>   </xsl:for-each>
> 
> Note that the xsl:copy-of within the xsl:for-each copies the *context
> node* - the Parrafo element itself - rather than each of the
> descendants of the $Nombre_Fichero node, which is what you have it
> doing currently.
> 
> Cheers,
> 
> Jeni
> 
> ---
> Jeni Tennison
> http://www.jenitennison.com/
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]