xsl-list
[Top] [All Lists]

RE: [xsl] <xsl:apply-templates/>

2006-12-05 10:11:01
God bless you! ;)

Thanks
houman

-----Original Message-----
From: David Carlisle [mailto:davidc(_at_)nag(_dot_)co(_dot_)uk] 
Sent: 05 December 2006 16:41
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] <xsl:apply-templates/>



        <xsl:template match="/">

That matches the root of the document, not the element that you have
confusingly called Root (which is its child) so 

        <xsl:apply-templates/>
applies to <Root> which recursively applies the default template to all
elements of the docuemnt.

        <xsl:template match="/">
                <Root>
                <xsl:apply-templates select="Root/Header"/>
                </Root>
        </xsl:template>

would work, or simply

        <xsl:template match="/">
                <Root>
                <xsl:copy-of select="Root/Header"/>             
                </Root>
        </xsl:template>

David

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>