[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] RE: (No Subject) Nested for-each
Subject: RE: [xsl] RE: (No Subject) Nested for-each From: "MCCAMISH, Justin" <justin.mccamish@xxxxxxx> Date: Tue, 29 Jul 2003 19:02:08 +0100 |
Also, from your message, it looks like you might be missing the closing </xsl:for-each> for the outer one. Cheers, Justin -----Original Message----- From: cknell@xxxxxxxxxx To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Sent: 7/29/2003 6:46 PM Subject: [xsl] RE: (No Subject) Nested for-each 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] RE: (No Subject) Nested f, AROSO Jose Antonio | Thread | RE: RE: [xsl] RE: (No Subject) Nest, cknell |
RE: [xsl] RE: (No Subject) Nested f, AROSO Jose Antonio | Date | RE: RE: [xsl] RE: (No Subject) Nest, cknell |
Month |