Subject: Re: [xsl] template match problem From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Sun, 23 Mar 2008 13:57:56 +0100 |
My question is why does the TOC entry template match against the highest level frag element (1st child of section) when it has a child frag element? The condition in the template match should forbid it and cause the default template (with lower priority) to match. What have I missed?
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="section"> <root> <xsl:apply-templates/> </root> </xsl:template>
<xsl:template match="frag" priority="1"> <template match="frag" priority="1"/>
<?xml version="1.0" encoding="utf-8"?><root> <template match="frag" priority="1"/> <template match="frag" priority="1"/> </root>
<xsl:template match="frag[not(descendant::frag) and descendant::xsl:variable[@name='xslVarTocEntry']]"
Martin Honnen http://JavaScript.FAQTs.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] template match problem, Chris Bowditch | Thread | Re: [xsl] template match problem, Chris Bowditch |
[xsl] template match problem, Chris Bowditch | Date | Re: [xsl] template match problem, Chris Bowditch |
Month |