Subject:New to XQuery question Author:(Deleted User) Date:03 May 2005 04:40 AM
>Hello,
>I am new to XQuery and XPath, having problmes understanding the
>following 3 statements:
>.[//@id]
This will return the current context if it or one of its children contains an attribute named "id"
>.[//[not(@id)]]
This has an error: "//" must be followed by a test expression.
I guess you meant ".[//*[not(@id)]]".
This will return the current context if it or one of its children does not contain an attribute named "id"
>.[not(//[not(@id))]]
Two errors here: the same "//" not followed by a test expression, and the last ")" closed before the "]".
I guess you meant ".[not(//*[not(@id)])]".
This will return the current context if it and all of its children contain an attribute named "id"