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

Re: Problem in xsl:for-each

Subject: Re: Problem in xsl:for-each
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Thu, 10 Jan 2002 16:58:40 +0000
Re:  Problem in xsl:for-each
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


Current Thread
  • Problem in xsl:for-each
    • jam - Thu, 10 Jan 2002 11:11:14 -0500 (EST)
      • Jeni Tennison - Thu, 10 Jan 2002 11:57:15 -0500 (EST) <=
      • <Possible follow-ups>
      • Zwetselaar M. van (Marco) - Thu, 10 Jan 2002 11:45:30 -0500 (EST)
      • jam - Thu, 10 Jan 2002 12:18:59 -0500 (EST)
      • jam - Thu, 10 Jan 2002 12:50:15 -0500 (EST)

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.