[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: why doesn't 'self::NODE' work?
<xsl:value-of> gives you the string value of the selected node. The string value of an element is defined as the concatenation of all its descendant text nodes. You are interested in only the child text nodes, which you can obtain as: <xsl:for-each select="NODE/text()"> <xsl:value-of select="."/> </xsl:for-each> Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Wright, Steve > Sent: 15 April 2003 01:49 > 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|