Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - >Thread Next - Re: [xsl] suppressing only the last PI [xsl] suppressing only the last PITo: Date: 1/3/2007 7:31:00 PM Hi,
I'm trying to insert some content prior to the last processing
instruction only if the value in the PI begins with 'PageEnd_'.
The following instruction successfully displays the last processing
instruction (and no others) following the content:
<xsl:apply-templates
select="node()[self::processing-instruction('TL_XSL')[starts-with(.,'Pag
eEnd_')]][position()=last()]"/>
However, the following instruction occurs prior to the content and
should suppress only the last PI, but is suppressing all processing
instructions named TL_XSL and whose value beings with 'PageEnd_' and not
just the last one:
<xsl:apply-templates
select="node()[not(self::processing-instruction('TL_XSL')[starts-with(.,
'PageEnd_')][position()=last()])]"/>
Can anyone tell what is wrong with it and why it is not just suppressing
the last one? I am including the position()=last() instruction inside
the not(), where in the other one it is separated from the first
instruction, but this seems like it would work. If I put the
position()=last() outside the not(), then it suppresses them all.
Thanks if you can help,
Emily Garrett | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
