RE: [xsl] Understanding axis

Subject: RE: [xsl] Understanding axis
From: "Allan Jones" <allan.jones@xxxxxxxxxxxx>
Date: Tue, 29 Oct 2002 17:12:57 -0000
|I've been learning the use of axis in transformations and I stumbled on
|something that didn't seem to make sense...
|local-name( */* )
|local-name( */child::* )
|return the same values. I would have thought...
|local-name( */child::* )
|local-name( */*/* )
|would be the same (which they aren't).
|Could somebody help me reason out why it is this way?

this one's probably the result of a misconception you're having about the
axes in general.

in effect, when you specify '*/*' in your example, you're saying
'child::*/child::*' because the child:: axis is implicit.

the best way to think of it is that the axis will always be 'child::' unless
you specifically state otherwise (e.g. by specifying parent:: or @ as your

this is why */* and child::*/child::* return the same value.

hope that helps,

 XSL-List info and archive:

Current Thread