xsl-list
[Top] [All Lists]

[xsl] Is PI a real node?

2007-05-09 06:49:52
 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


--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>