[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
On 19/08/2010 18:43, Ylvisaker, Steve wrote:
actually the immediate precding sibling of the parent is the white space text node after the PI, so I think yiu want to ignore such, so...
test="../preceding-sibling::node()[not(self::text()[not(string(.))])][1][self::processing-instruction()]
David
Re: [xsl] Xpath question with processing-instruction()
Subject: Re: [xsl] Xpath question with processing-instruction() From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 19 Aug 2010 19:03:35 +0100 |
On 19/08/2010 18:43, Ylvisaker, Steve wrote:
I know I can do this but I'm stumped.
Please consider the following XML:
<section> <?ModuleStart ShowIDs="yes"?> <title>Text of a title</title> <para>para in the section</para> </section>
I am current to the text() node of<title/>
I need to test to see if my parent has an immediate preceding sibling of processing-instruction named "ModuleStart"
If so I need to know the content of that PI.
actually the immediate precding sibling of the parent is the white space text node after the PI, so I think yiu want to ignore such, so...
test="../preceding-sibling::node()[not(self::text()[not(string(.))])][1][self::processing-instruction()]
David
I need to be sure that the test will NOT be true if I am current with the text() node of<para/>
Thanks in advance for your help Steve
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Xpath question with proce, Ylvisaker, Steve | Thread | [xsl] RE: Xpath question with proce, Tony Nassar |
Re: [xsl] Xpath question with proce, Dimitre Novatchev | Date | Re: [xsl] XSLT 1.0 serializer for X, Hermann Stamm-Wilbra |
Month |