Subject: Re: [xsl] causal for each issue From: Michael Kay <mike@xxxxxxxxxxxx> Date: Tue, 31 Jul 2012 09:15:02 +0100 |
But currrent node is the <G502>element and this node has element childern as per definition in the XML?The problem is that the current node, as per the provided source XML document, doesn't have any element-children...
Michael Kay Saxonica
brg henry
--- Dimitre Novatchev <dnovatchev@xxxxxxxxx> schrieb am Di, 31.7.2012:
Von: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Betreff: Re: [xsl] causal for each issue An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Datum: Dienstag, 31. Juli, 2012 00:45 Uhr On Mon, Jul 30, 2012 at 1:54 PM, henry human <henry_human@xxxxxxxx> wrote:must any of them(_1st_Name,_2nd_Name,_3nd_Name,_4nd_Name, _5nd_Name) have a childern,why!!!!!!!?
Because this is what is specified in your code:
The current node (as specified in the select attribute of <xsl:for-each>) is an:
G2[1]/G502/(1st_Name,2nd_Name, 3nd_Name,4nd_Name, 5nd_Name)[. =('FF')]">
That is, the current node is an element having a name among those (ignoring the naming errors that you probably have already fixed):
1st_Name,2nd_Name, 3nd_Name,4nd_Name, 5nd_Name
Then having one of these as the current node you have:
<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>
That is, you want to output in the body of <Depot> the string values of all these *children* of the current node. The problem is that the current node, as per the provided source XML document, doesn't have any element-children, therefore nothing gets output. This is exactly the reported result and it is very obvious ans easy to explain.
schrieb am Mo, 30.7.2012:
--- Dimitre Novatchev <dnovatchev@xxxxxxxxx>_5nd_NameVon: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Betreff: Re: [xsl] causal for each issue An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Datum: Montag, 30. Juli, 2012 22:05 Uhr On Mon, Jul 30, 2012 at 12:21 PM, henry human <henry_human@xxxxxxxx> wrote:_1st_Name,_2nd_Name, _3nd_Name,_4nd_Name,body ofNone of the elements _1st_Name,_2nd_Name, _3nd_Name,_4nd_Name, _5nd_Name has any element children, therefore thesignificantthe generated literal result element depot is empty.
-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved withoutof junkintelligence. --------------------------------------- To invent, you need a good imagination and a pilemistakes may be------------------------------------- Never fight an inanimate object ------------------------------------- To avoid situations in which you might makelooking.the biggest mistake of all ------------------------------------ Quality means doing it right when no one isdon't know------------------------------------- You've achieved success in your field when youignored.whether what you're doing is work or play ------------------------------------- Facts do not cease to exist because they areis to------------------------------------- I finally figured out the only reason to be aliveenjoy it.
-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk ------------------------------------- Never fight an inanimate object ------------------------------------- To avoid situations in which you might make mistakes may be the biggest mistake of all ------------------------------------ Quality means doing it right when no one is looking. ------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play ------------------------------------- Facts do not cease to exist because they are ignored. ------------------------------------- I finally figured out the only reason to be alive is to enjoy it.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] causal for each issue, Michel Hendriksen | Thread | Re: [xsl] causal for each issue, David Carlisle |
Re: [xsl] causal for each issue, Michel Hendriksen | Date | |
Month |