Hi Team,
A problem about yang current() confuses me.Could anyone help me to understand 
the difference between mark 1 and mark 2.Any help is respect.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Function: node-set current()
The current function returns a node-set that has the current node as its only 
member. For an outermost expression (an expression not occurring within another 
expression), the current node is always the same(mark 1)as the context node. 
Thus,
<xsl:value-of select="current()"/>
means the same as
<xsl:value-of select="."/>
However, within square brackets the current node is usually different(mark 2) 
from the context node. For example,
<xsl:apply-templates select="//glossary/item[@name=current()/@ref]"/>
will process all item elements that have a glossary parent element and that 
have a name attribute with value equal to the value of the current node's ref 
attribute. This is different from
<xsl:apply-templates select="//glossary/item[@name=./@ref]"/>
which means the same as
<xsl:apply-templates select="//glossary/item[@name=@ref]"/>
and so would process all item elements that have a glossary parent element and 
that have a name attribute and a ref attribute with the same value.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Regards,
Kiwi


huqiwei...@163.com 


_______________________________________________
controller-dev mailing list
controller-dev@lists.opendaylight.org
https://lists.opendaylight.org/mailman/listinfo/controller-dev

Reply via email to