Menu

#1 Problems with '/*' and '//' XPath/XQuery steps

open
nobody
None
5
2006-08-25
2006-08-25
No

SLLp uses "//" for single-line comments and "/*" for
the beginning of multi-line comments (like in Java).

So currently it is not possible to use // and /*
XPath steps in SLL. Instead please use the following
(equivalent) steps:

"//a" => "/descendant-or-self::a"
"/*" => "/child::*"

e.g.:
var $test = <a><b>1</b><b>2</b>...</a>;

// get the second b-element
var $b2 = $test/child::*[2];

// get all b-elements
var $allB = $test/descendant-or-self::b;

Discussion


Log in to post a comment.