It might help to provide a complete (but minimal) source document and
stylesheet to demonstrate the problem.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Emily(_dot_)Garrett(_at_)thomson(_dot_)com
[mailto:Emily(_dot_)Garrett(_at_)thomson(_dot_)com]
Sent: 09 May 2007 14:49
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Is PI a real node?
Hi, I hope someone can explain this to me.
In the following statements:
<xsl:template match="@*|node()" priority="1">
<xsl:message terminate="no">NODENAME:!<xsl:value-of
select="name()"/>!</xsl:message>
<xsl:message terminate="no">NODEVAL:!<xsl:value-of
select="normalize-space(.)"/>!</xsl:message>
<xsl:choose>
<xsl:when
test="self::processing-instruction('TL_XSL')[ends-with(.,'Ch.C
lo.KT.A.Au
to')]">
<xsl:message terminate="no">NAME OF
NODEKT.A.Auto:!<xsl:value-of select="name()"/>!</xsl:message>
</xsl:when>
</xsl:choose>
The value that displays for the name() for NODENAME is the
processing-instruction name, TL_XSL. However, for the NAME OF
NODEKT.A.Auto, the value of name() is the parent element of the
processing-instruction. This is the way the XSL processes,
and I don't
understand why.
I am generating elements to be output before and after the
PI, but it is outputting before and after the parent element
of the PI instead.
Thanks.
Emily
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--