Subject: RE: A problem with [embedded templates???]
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Mon, 4 Oct 1999 13:09:49 -0600
|
David Hunter wrote:
> David Carlisle wrote:
> > <xsl:template match="title">
> > <h1><xsl:apply-templates/></h1>
> > </xsl:template>
> >
> > <xsl:template match="italics">
> > <i><xsl:apply-templates/></i>
> > </xsl:template>
>
> for:
> <title>This is some <italics>text</italics> in some XML</title>
> this gives me empty tags (<h1><i></i></h1>)
Because you said you are using MSXSL, you need to add some default templates
required by the current spec before David Carlisle's templates will work:
<!-- default template for root or element node -->
<xsl:template><xsl:apply-templates/></xsl:template>
<!-- default template for text or attribute node -->
<xsl:template match="text()|@*"><xsl:value-of/></xsl:template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|