This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: MSXML ancestor-or-self
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] MSXML ancestor-or-self
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Wed, 7 Mar 2001 20:46:42 -0000
- Reply-To: xsl-list at lists dot mulberrytech dot com
> You can't use ancestor-or-self in this case because of the
> structure of your xml.
He was using ancestor-or-self::*/p which I think selects the correct nodes;
the only problem is removing duplicates. Which isn't easy in this case: I
think it might need a recursive-template solution.
(There was also a question about the ordering of the axis. The answer is
that the axis is in reverse document order, but the result of the expression
is an unordered set, and the xsl:fro-each processes the set in document
order (by default). You can get reverse document order by <xsl:sort
select="position()" data-type="number" order="descending"/>)
Mike Kay
Software AG
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list