xsl-list
[Top] [All Lists]

Re: [xsl] XSLT Output contains the unwanted content of all elements as text

2007-03-09 04:39:58
Florent Georges wrote:
But a matching template would never looked for that
element, as the default template rule for elements would be
redefined to do nothing, and the root element would match
it.

  So the entire tree walk would stop at the... root element:

    <xsl:template match="*"/>

    <xsl:template match="non-root-element">
      Can never be reached.
    </xsl:template>

Ah, in that way. Yes, you are very right ;)
I *always* start my new template with something like:

<xsl:template match="/" name="main" >
   <xsl:apply-templates select="specify/starting/point/here" />
</xsl:template>


which gives me a clear starting point for the tree walk in any situation. I didn't realize that the OP did not have such a root-matching template.

-- Abel



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