|
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Output flat file results , Abel Braaksma | Thread | RE: [xsl] Is PI a real node?, Michael Kay |
| Re: [xsl] Embedding an SSI echo in , tom tom | Date | [xsl] simple xslt function error, Vaduvoiu Tiberiu |
| Month |