[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Is PI a real node?


Subject: [xsl] Is PI a real node?
From: <Emily.Garrett@xxxxxxxxxxx>
Date: Wed, 9 May 2007 09:49:26 -0400

 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.Clo.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


Current Thread
Keywords
xsl