Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] suppressing only the last PI

From: <Emily.Garrett@----------->
To:
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent