473,563 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What does <xsl:if test="not($valu es[. = $value])"> mean?

Hi,
What does <xsl:if test="not($valu es[. = $value])"mean? What I do
not understand is $values[. = $value]? Here, [] means array? And . =
$value means current node is equal to the variable value? So the total
meaning is "if not exists of value in array of values" ? But the result
of '. = $value' is a boolean value, so '$values[. = $value]' should not
mean "the value in values".

Rice

Oct 18 '06 #1
2 13681

ri*****@gmail.c om wrote:
What does <xsl:if test="not($valu es[. = $value])"mean?
Assuming that $values is a node-set (and what else could it
be if we're applying a predicate to it?), this means 'if
there are no nodes in the $values node-set such that the
text content of the node equals the $value', I believe.
What I do not understand is $values[. = $value]? Here, []
means array?
Of course not. There are no arrays in XSLT, [] is a
predicate.
And . = $value means current node is equal to the
variable value?
If by 'current node' you mean 'the node that we are testing
against the predicate', then, yes, that's what it means.
You should also remember that using a node in comparison
implicitly applies the XPath string() function to it. If
you want to compare the node identities you should
explicitly use the generate-id() function.

--
Pavel Lepin

Oct 18 '06 #2
ri*****@gmail.c om wrote:
What does <xsl:if test="not($valu es[. = $value])"mean?
You would have better shown how the variable $values and the variable
$value is initialized. Assuming $values is initialized with a node set then
$values[. = $value]
selects those nodes in the node set for that the predicate in the square
brackets holds (i.e. . = $value).
So the result of
$values[. = $value]
is a node set again that can be empty or can contain one or more nodes.
Doing not() on a node set yields true if the node set is empty and false
otherwise so the test
<xsl:if test="not($valu es[. = $value])">
checks whether there are no nodes in $values for which the predicate holds.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
3202
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external references to functions and objects not defined in the current translation. All such translator output is collected into a program image which contains...
2
10374
by: Paul T. Rong | last post by:
Sorry I just lost tracks of a series of posts, so I post my question again, hoping someone can help. Here is codes provided by Jeff Smith > Private Sub Form_Load() > Dim db As DAO.Database > Dim rst As DAO.Recordset > Dim intI As Integer > Set db = CurrentDb
2
2414
by: hsharsha | last post by:
Consider the below code: int main(void) { class inner {}; friend class inner; /* what does this signify???? */ return 0; }
39
3156
by: utab | last post by:
Dear all, Is there a clear distinction how to decide which functions to be members of a class and which not How is your attitude (Your general way from your experiences ...) "If the function changes the state of the object, it ought to be a member of that object." Reference Accelerated C++, A. Koenig, page 159.
5
4402
by: Niu Xiao | last post by:
I saw a lot of codes like: void foo(void* arg) void bar(void** arg) f((void*)p) but what does void pointer mean in c? I just know it stands for generic pointer. thanks.
3
3158
by: leo.hou | last post by:
Dear experts, I came across the following script in a htm file. Could some one explain why is it passing some parameter to a jpg file? What does it mean? Thanks <script language="JavaScript" type="text/javascript"> <!--
7
1924
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
Dim sCoName As String = oDs.Customers(0).CompanyName The part that I want to understand is the oDs.Customers(0). Does oDs.Customers(0) mean 1st row of the datatable Customers. Where can I find more information about this?
9
7122
by: PengYu.UT | last post by:
Hi, I'm wondering what 'c' in "cout", "cin" mean? Does it mean "C++"? Or the 'c' in <cassert>? Thanks, Peng
4
5301
by: dolphin | last post by:
Hi All I read a .cpp files,find that static void fun(void){......} int main() { .......... } What does this static function mean?Is it the same as the static
13
10561
by: bobby | last post by:
hello group, what does for( ; ; ) mean in C program Thanks
0
7580
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6244
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5481
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.