Subject: Re: Test processing instruction as first preceding sibling
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Tue, 9 Dec 2008 23:13:14 +0100 (CET)
|
"G. Ken Holman" wrote:
> preceding-sibling::node()[not(self::text())][1]/
> self::processing-instruction('proc')
Depending on the OP's needs, maybe the following is more suitable:
preceding-sibling::node()[
not(self::text()[not(normalize-space(.))])
][1]/self::processing-instruction('proc')
(takes precedings text nodes into account if they are not whitespaces
only.)
Regards,
--
Florent Georges
http://www.fgeorges.org/
|