|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|

Cart








