I know the following question is a little bit of beginners but I need your help to understand a basic concept.
I would like to say first that I\'m a XSLT programmer
Another use is to create a tag only if it has a child. An example is required :
node b
node c
Somewhere in your XSLT :
Got a "b" node
Got a "c" node
You may see the demo here : http://xsltransform.net/eiZQaFz
It is way better than testing each tag like this :
...
Because you would end up editing it in two places. Also the processing speed would depend on which tags are in your imput. If it is the last one from your test, the engine will test the presence of everyone before. As $foo/node() is an idioms for "is there a child element ?", the engine can optimize it. Doing so, you ease the life of everyone.