preceding-sibling::processing-instruction('REMOVE')
will find that processing instruction from _all_ following sibling nodes
but you only want to look at the immediately preceding node which is not
white space and test if it is a processing instruction; so that is:
preceding-sibling::node()[not(self::text() and
.='')][1][self::processing-instruction('REMOVE')]
David
--
http://www.dcarlisle.demon.co.uk/matthew
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list