Subject: RE: [xsl] RE: (No Subject) Nested for-each From: AROSO Jose Antonio <jose.santos@xxxxxxxxxxx> Date: Tue, 29 Jul 2003 19:02:04 +0100 |
ok. I send now a part of my XML file. <?xml version="1.0" ?> - <ERwin4 FileVersion="4100"> - <Model id="{37BEA408-F83C-4925-A681-2D9DA7E54E0C}+00000000" ModelType="3" TargetServer="174" DBMSVersion="8"> - <Entity_Groups> - <Entity id="{5431ABB1-9BB5-40E3-BB2E-0486638070A3}+00000000" Name="E/3"> - <EntityProps> <Name>E/3</Name> <Type>1</Type> <Index_Generate>1</Index_Generate> <Physical_Only>false</Physical_Only> <Physical_Name>NPRC_DIFE_CONTRL</Physical_Name> </EntityProps> - <Attribute_Groups> - <Attribute id="{CB120696-68FD-424B-B906-21E62A2AF05B}+00000000" Name="CODEVT"> - <AttributeProps> <Name>CODEVT</Name> <Type>0</Type> <Datatype>NUMBER(3)</Datatype> <Null_Option>1</Null_Option> <Order>1</Order> <Physical_Order>1</Physical_Order> <Parent_Domain>{39146A35-A713-4CAA-9FBF-9AA575FA9F44}+00000003</Parent_Domai n> <DO_Color_Inherited>0</DO_Color_Inherited> <DO_Font_Inherited>0</DO_Font_Inherited> </AttributeProps> -----Original Message----- From: cknell@xxxxxxxxxx [mailto:cknell@xxxxxxxxxx] Sent: terça-feira, 29 de Julho de 2003 18:46 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx 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/Attr ibute/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 -> |
---|---|---|
[xsl] RE: (No Subject) Nested for-e, cknell | Thread | RE: [xsl] RE: (No Subject) Nested f, MCCAMISH, Justin |
[xsl] RE: (No Subject) Nested for-e, cknell | Date | RE: [xsl] RE: (No Subject) Nested f, MCCAMISH, Justin |
Month |