xpath - What is // in XSLT? -
what //
in xslt? (e.g. $currentpage//node
)
what // in xslt? e.g. ($currentpage//node)
in xpath abbreviation:
the value of attributes of xslt instructions (such select
attribute) must xpath expression.
therefore,
($currentpage//node)
stands for
($currentpage/descendant-or-self::node()/node)
this selects elements named node
children of nodes either contained in variable $currentpage
or descendents of nodes contained in variable $currentpage
.
do note in provided expression node()
node-test (it selects node types on descendant-or-self::
axis, such elements, text nodes, comments , processing-instructions.
on other side, somepath/node
shorthand somepath/child::node
, selects elements named node
children of context node.
i recommend not use name node
element in order avoid confusion.
Comments
Post a Comment