|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] suppressing only the last PI
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







