Subject: RE: why doesn't 'self::NODE' work?
From: "Avula, Raj" <ravula@xxxxxxxxxxx>
Date: Mon, 14 Apr 2003 18:45:48 -0700
|
The reason is self::LINK matches all the child nodes of LINK (not only text
Childs)
So you can use this.
<xsl:template match="/PARA/LINK">
<xsl:for-each select="text()">
<xsl:value-of select="." />
</xsl:for-each>
</xsl:template>
or
<xsl:apply-templates select="text()" />
You should try not match non-text children of Link.
Goodluck...
-----Original Message-----
From: Wright, Steve [mailto:Steve.Wright@xxxxxxx]
Sent: Monday, April 14, 2003 5:49 PM
To: 'XSL-List@xxxxxxxxxxxxxxxxxxxxxx'
Subject: why doesn't 'self::NODE' work?
Hello,
I am trying desparately to obtain the following input from the below xml
tree:
--------------------------------------------------------
desired output:
--------------------------------------------------------
Figure 3-3
--------------------------------------------------------
--------------------------------------------------------
xml tree:
--------------------------------------------------------
<PARA>
<LINK linkend="0546">
Figure
<FIG NUM="3" ID="0546">
<TTL>
The Cell Membrane
</TTL>
</FIG>
3-3
</LINK>
</PARA>
--------------------------------------------------------
This is the XPATH expression that I am using:
--------------------------------------------------------
<xsl:template match="PARA/LINK">
<xsl:value-of select="self::LINK" />
</xsl:template>
--------------------------------------------------------
--------------------------------------------------------
This is the (undesired) output that I am getting:
--------------------------------------------------------
Figure The Cell Membrane 3-3
--------------------------------------------------------
Any help w/ this would be greatly appreciated.
Thanks in advance,
Steve
****************************************************************************
This email may contain confidential material.
If you were not an intended recipient,
please notify the sender and delete all copies.
We may monitor email to and from our network.
****************************************************************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
- Re: why doesn't 'self::NODE' work?, (continued)
- James J. Ramsey - Mon, 14 Apr 2003 21:50:39 -0400 (EDT)
- Michael Kay - Tue, 15 Apr 2003 03:46:19 -0400 (EDT)
- David Carlisle - Tue, 15 Apr 2003 04:11:10 -0400 (EDT)
- Avula, Raj - Mon, 14 Apr 2003 21:41:43 -0400 (EDT) <=
- Passin, Tom - Tue, 15 Apr 2003 09:29:30 -0400 (EDT)
- Wright, Steve - Tue, 15 Apr 2003 12:28:47 -0400 (EDT)
|
|