[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: causal for each issue
On 30/07/2012 19:53, henry human wrote:
hi The result of following for-each statement is <Depot/> and not as exected. I could not find the mistake ! Here are the XSLT and the XML file : This is an xpath syntax error as you can not start element names with digits. had you used different names the filter .='FF' would mean the for-each was iterating over a single element the 1st_Name element in the first G2. That element only has text content ('FF') soo all the following value-of would select nothing as they are selecting elements (once they are fixed to use legal names) <Depot> <xsl:value-of select="3rd_Logical"/> <xsl:value-of select="2nd_Logical"/> <xsl:value-of select="3rd_Logical"/> <xsl:value-of select="4th_Logical"/> <xsl:value-of select="5th_Logical"/> <xsl:value-of select="6th_Logical"/> </Depot> </xsl:for-each> </xsl:for-each> ********************** <LDL> <G2> <G502> <1st_Name>FF</1st_Name>
<2nd_Logical>MLBIE85</2nd_Logical> <3rd_Name>FW</3rd_Name> <_4th_Logical>FW</_4th_Logical> <3rd_Logical>ENMST01</3rd_Logical> <5th_Logical>USPTR05</5th_Logical> </G502> </G2> <G2> <G502> <nd_Name>FF</2nd_Name> <2nd_Logical>ATVIE85</2nd_Logical> <2nd_KNTT_Flag>0</2nd_KNTT_Flag> <3rd_Name>FW</3rd_Name> <_4th_Logical>FW</_4th_Logical> <3rd_Logical>DEHAM05</3rd_Logical> </G502> </G2> </LDL> David
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|