[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

suppressing only the last PI

Subject: suppressing only the last PI
From: <Emily.Garrett@xxxxxxxxxxx>
Date: Wed, 3 Jan 2007 14:29:14 -0500
 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.