Subject: [xsl] RE: (No Subject) Nested for-each From: cknell@xxxxxxxxxx Date: Tue, 29 Jul 2003 13:46:01 -0400 |
You need to appreciate the idea of "context" to understand where you are going wrong here. The outer for-each selects as the context node an element at the end of this XPath "Entity_Groups/Entity/EntityProps". While you are inside that loop, your inner for-each is looking for an element that matches this XPath "Entity_Groups/Entity/EntityProps/Entity_Groups/Entity/Attribute_Groups/Attribute/AttributeProps", in spite of what you hope and think it is selecting. I'll bet a Euro that you don't have single node in your XML document that matches that second XPath. Of course, without seeing your source document we can't tell for certain. Please supply a minimal sample of your source XML so we can help further. -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: AROSO Jose Antonio <jose.santos@xxxxxxxxxxx> Sent: Tue, 29 Jul 2003 18:05:02 +0100 To: "'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: Hi... I want use a two loops for-each. The first for-each dont have problems. But the second dont execute. How can i use two loops to catch data from diferent nodes? This code is my code. I dont know why this is dont run. <xsl:for-each select="Entity_Groups/Entity/EntityProps"> Tabela: <xsl:value-of select="Name" /> <br/> Comentarios: <xsl:value-of select="comment" /> <p/> <table border="3"> <xsl:for-each select="Entity_Groups/Entity/Attribute_Groups/Attribute/AttributeProps"> <tr> <td style="text-align:center">NOME</td> <td style="text-align:center">TIPO</td> <td style="text-align:center">COMENTARIOS</td> </tr> <tr> <td> <xsl:value-of select="Name" /> </td> </tr> </table> </xsl:for-each> Best regards Jose XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[no subject], AROSO Jose Antonio | Thread | RE: [xsl] RE: (No Subject) Nested f, AROSO Jose Antonio |
[no subject], AROSO Jose Antonio | Date | RE: [xsl] RE: (No Subject) Nested f, AROSO Jose Antonio |
Month |