Article View: fr.comp.text.xml
Article #9210Re: Need help... Test an element??
From: Tom.
Date: Thu, 10 May 2001 22:52
Date: Thu, 10 May 2001 22:52
26 lines
2261 bytes
2261 bytes
In <3AFAB397.782CD6FF@yahoo.com>, Lupo wrote: >> <xsl:when test="RecrutDiscard > 0"> > > You still need to define the selected text as a number in order to > perform the comparison. The node's value is, by default, a string. > > Therefore, you need <xsl:when test="number(RecrutDiscard) > 0">. No!!! Well, maybe if you use this buggy MSXML, but certainly not in good, standard XPath 1.0 XPath 1.0 spec, 3.4 Booleans: "If one object to be compared is a node-set and the other is a number, then the comparison will be true if and only if there is a node in the node-set such that the result of performing the comparison on the number to be compared and on the result of converting the string-value of that node to a number using the number function is true." RecrutDiscard is a relative location path whose value is a node-set. Here, the node-set contains a single node but it's, however, a node-set. fu2 ctx Tom.
Technical Details
Message-ID:
<1533346.0xQCEvomIN@ltgt.net>Path:
arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!proxad.net!feeder2-1.proxad.net!nnrp6.proxad.net.POSTED!not-for-mailReferences:
<B1uK6.72$aB5.22415@tengri.easynet.fr> <OYWRfNW2AHA.404@tkmsftngp07> <3AFAB397.782CD6FF@yahoo.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1047a4,92ec00df5e179645 X-Google-Attributes: gid1047a4,public X-Google-Thread: 110868,92ec00df5e179645 X-Google-Attributes: gid110868,public X-Google-Thread: 114f60,92ec00df5e179645 X-Google-Attributes: gid114f60,public X-Google-Thread: 1006ac,92ec00df5e179645 X-Google-Attributes: gid1006ac,public X-Google-ArrivalTime: 2001-05-10 15:52:45 PST Path: arc1-ca.pugleaf.net!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!proxad.net!feeder2-1.proxad.net!nnrp6.proxad.net.POSTED!not-for-mail Message-ID: <1533346.0xQCEvomIN@ltgt.net> From: Tom. <ptittom+news@free.fr> Subject: Re: Need help... Test an element?? Newsgroups: fr.comp.text.xml,microsoft.public.xml,microsoft.public.xsl,netscape.public.dev.xml Followup-To: comp.text.xml References: <B1uK6.72$aB5.22415@tengri.easynet.fr> <OYWRfNW2AHA.404@tkmsftngp07> <3AFAB397.782CD6FF@yahoo.com> Lines: 26 Organization: </> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Date: Thu, 10 May 2001 22:52:45 GMT NNTP-Posting-Host: 193.252.183.143 X-Complaints-To: abuse@proxad.net X-Trace: nnrp6.proxad.net 989535165 193.252.183.143 (Fri, 11 May 2001 00:52:45 CEST) NNTP-Posting-Date: Fri, 11 May 2001 00:52:45 CEST