Subject: Re: [xsl] Test processing instruction as first preceding sibling From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Tue, 09 Dec 2008 17:07:23 +0100 |
Hi guys,
I have a doubt about testing preceding-sibling processing-instruction. I have this xml:
<root> <child1> child 1 </child1> <?proc?> <child2> child 2 </child2> </root>
And I need to know if child2 has the first preceding-sibling as a processing-instruction. In this case it should return true.
If whitespace text nodes matter then in your sample /root/child2/preceding-sibling::node()[1] is a text node and only /root/child2/preceding-sibling::node()[2] is a processing instruction node.
I tryed something like this
preceding-sibling::*[1]/name()|preceding-sibling()[1]/name = 'proc'
Martin Honnen http://JavaScript.FAQTs.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Test processing instructi, David Carlisle | Thread | RE: [xsl] Test processing instructi, Michael Kay |
Re: [xsl] Test processing instructi, David Carlisle | Date | RE: [xsl] Test processing instructi, Michael Kay |
Month |