On 8/19/2010 12:59 PM, Martin Honnen wrote:
Ylvisaker, Steve wrote:
I need to test to see if my parent has an immediate preceding sibling
of processing-instruction named "ModuleStart"
If so I need to know the content of that PI.
Well if we take white space text nodes into account then the title
element is not immediately preceded by a processing instruction,
rather by a text node. So maye
<xsl:variable name="n"
select="../preceding-node()[not(self:text(normalize-space()))][1][self::processing-instruction()]"/>
Since it needs to be named "ModuleStart":
select="...[self::processing-instruction('ModuleStart')]"
Can you explain how
[not(self::text(normalize-space()))]
works?
I think it's supposed to filter out whitespace-only text nodes, but I
don't see anything in the spec about text() taking an argument.
Maybe you meant something like
[not(self::text()[not(normalize-space())])]
?
Thanks,
Lars
<xsl:if test="$n">
<xsl:value-of select="$n"/>
</xsl:if>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--