473,698 Members | 2,134 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 13699

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
3226
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 information needed for execution in its execution environment." What I'm wondering is what exactly...
2
10394
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
2425
by: hsharsha | last post by:
Consider the below code: int main(void) { class inner {}; friend class inner; /* what does this signify???? */ return 0; }
39
3180
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
4410
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
3171
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
1930
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
7131
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
5311
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
10653
by: bobby | last post by:
hello group, what does for( ; ; ) mean in C program Thanks
0
8598
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9016
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8887
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8856
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5858
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4360
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
1997
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.