[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: why doesn't 'self::NODE' work?

Subject: Re: why doesn't 'self::NODE' work?
From: "James J. Ramsey" <jjramsey_6x9eq42@xxxxxxxxx>
Date: Mon, 14 Apr 2003 18:55:15 -0700 (PDT)
Re:  why doesn't 'self::NODE' work?
--- "Wright, Steve" <Steve.Wright@xxxxxxx> wrote:

> <xsl:template match="PARA/LINK">
> 	<xsl:value-of select="self::LINK" />
> </xsl:template>

As far as I understand, <xsl:value-of
select="foo-element"/> will not have a predictable (or
usable) result if foo-element has children. What you
need to do is

<xsl:template match="PARA/LINK">
   <xsl:apply-templates/>
</xsl:template>

and create templates for handling the children of
LINK, FIG, and TTL, maybe something like:

<xsl:template match="PARA/LINK/FIG">
   <!-- Something to display the figure -->
   <xsl:apply-templates select="TTL"/>
</xsl:template>

<xsl:template match="PARA/LINK/FIG/TTL">
   <!-- AFAIK, this is enough to return the 
        contents of TTL. -->
   <xsl:apply-templates/>
</xsl:template>

I used "PARA/LINK/FIG" and "PARA/LINK/FIG/TTL" because
I wasn't sure if TTL and FIG were also used as the
names of children of other elements, and perhaps had
subtly different representations in those contexts.


__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.