Re: XSL Abbreviations

Subject: Re: XSL Abbreviations
From: "Ben Pickering" <benjaminpickering@xxxxxxxxxxx>
Date: Mon, 03 Jul 2000 13:22:08 GMT
Just reading the XPath docs wrong, that's all. // is equivalent to
/descendant-or-self::node()/ - note the leading and trailing slashes. You
could try ..//.[generate-id(.) = $node]

I tried you suggestion, but it doesn't seem to work, at least in XT.


Plus, can you explain the siginificance of the slashes, for curiosity's sake: I get that the leading '/' selects the document root (which is why you need to say './/' rather than just '//' for the context node's parent; the '//' includes a built-in '/' in front of descendant-or-self.)

But I don't see the significance of the trailing slash. Surely this just acts to select all the children of nodes matching descendant-or-self, thus providing the same effect as descendant?

Why is this behaviour appropriate to '//'? Can I just take this as meaning 'descendant', (but selecting all descendant nodes and NOT self at all)?

Regards,
Ben.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread