xsl-list
[Top] [All Lists]

Re: [xsl] Writing array elements based on a an evaluation of one of the child elements

2006-05-24 04:53:04
So now I have...
 
 <xsl:template match = "ACCOUNT-LIST"> 
   <xsl:if test="string-length(ACCOUNT-NO/text() > 0)">
   <xsl:element name = "ACCOUNT-LIST">
                       <xsl:for-each select="."/>
            </xsl:element>
       </xsl:if>
 </xsl:template>
 
and this writes a whole bunch of empty <ACCOUNT-LIST> elements 
Which I guess is happening because somehow I'm not refering to the correct 
occurence of the ACCOUNT-NO child node I'm dealing with? And I'll need some 
xsl:for-each logic
 
I see the xsl above as saying...
 
When you see the ACCOUNT-LIST element 
1) check if the child element ACCOUNT-NO has a text length gt; 0
2) If yes write an element called ACCOUNT-LIST that has all the values of the 
current node (ACCOUNT-LIST).
 
I guess I'm mising a whole chunk that specifies the current occurence

----- Original Message ----
From: Florent Georges <darkman_spam(_at_)yahoo(_dot_)fr>
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Sent: Wednesday, 24 May, 2006 1:31:01 PM
Subject: Re: [xsl] Writing array elements based on a an evaluation of one of 
the child elements


neil cave wrote:

THat and the fact that I should be evaluating 

string-length(//ACCOUNT-NO/text()) > 0 ) 

  It depends on your input type and on what you want exactly to test. 
But in this case, I think you can just test the presence of the text
nodes (not their length being gt 0).  It looks quite strange to me to
test on all ACCOUNT-NO in the document.  But you're the only one that
knows.

  Regards,

--drkm
























    

    
        
___________________________________________________________________________ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son 
interface révolutionnaire.
http://fr.mail.yahoo.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>