> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Hi,

> I am attempting to compare the values in one node with the preceding node.
> When using the preceding-sibling on the first node, it retuns a
> null (which is good), but thereafter returns the value of the first
> node (only) as the tree is processed.

Not completely sure, but the problem might be that:

preceding-sibling::node()

returns the first node on the preceding-sibling axis, but 'first' here being
'in document order'... (as in: take the set of all preceding-siblings and of
that set, return the one that appears first in the source document)

> If I use the axisName following:: or following-sibling:: then it works
fine.

Yes, because here the immediately following (sibling) node is always also
first one following in the document as well.

Try:

self::node()[not(text()=preceding-sibling::node()[1]/text())]

IIC, the addition of '[1]' should make sure you return the immediately
preceding-sibling.

HTH!

Greetz,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to