xsl-list
[Top] [All Lists]

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

2006-12-05 09:41:20


        <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>
--~--

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