Subject: Re: xpath not.. From: David Carlisle <davidc@xxxxxxxxx> Date: Tue, 21 Nov 2000 09:24:56 GMT |
> (or is my link http://www.w3.org/TR/xpath.html outdated ?) probably not:) > . and i still cant find sth like not(self::*) there... > ... > and for some reasons you need the inner brackets You need the inner brackets because not() is a function and xpath functions _always_ have () around their arguments. 3.2 Function Calls A FunctionCall expression is evaluated by using the FunctionName to identify a function in the expression evaluation context function library, evaluating each of the Arguments, converting each argument to the type required by the function, and finally calling the function, passing it the converted arguments. It is an error if the number of arguments is wrong or if an argument cannot be converted to the required type. The result of the FunctionCall expression is the result returned by the function. An argument is converted to type string as if by calling the string function. An argument is converted to type number as if by calling the number function. An argument is converted to ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ type boolean as if by calling the boolean function. An ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument that is not of type node-set cannot be converted to a node-set. [16] FunctionCall ::= FunctionName '(' ( Argument ( ',' Argument )* )? ')' ^ ^ ^ ^ ^ ^ So that says the syntax is not( ) and self::* is allowed as an argument as that selects a node set, so by the paragraph above it is allowed in the argument of not() if it may be converted to type boolean by the boolean() function. may provide additional functions for case conversion. 4.3 Boolean Functions Function: boolean boolean(object) The boolean function converts its argument to a boolean as follows: a number is true if and only if it is neither positive or negative zero nor NaN a node-set is true if and only if it is non-empty a string is true if and only if its length is non-zero an object of a type other than the four basic types is converted to a boolean in a way that is dependent on that type so in a boolean context self::* is true if and only if the node set selected is non empty which is true if and only if the current node is an element, so not(self::*) is true just if the current node is not an element. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: xpath not.., Michael Hoffmann | Thread | Re: xpath not.., Michael Hoffmann |
RE: call-template and javascript, Kay Michael | Date | RE: Copying a portion of a subtree , Kay Michael |
Month |