Subject: [xsl] template precedence From: "Trevor Nicholls" <trevor@xxxxxxxxxxxxxxxxxx> Date: Thu, 20 Jul 2006 13:10:25 +1200 |
A trap for young players, like me (document is the top node in the input XML document). Original XSL (in part): ====================== <xsl:template match="document"> ...<xsl:apply-templates />... </ <xsl:template match = "*"> <xsl:choose> ... /> /> New XSL (same part): =================== <xsl:template match="document"> ...<xsl:apply-templates />... </ <xsl:template match="*[@mark='Y']"> ... </ <xsl:template match="*[not(@mark='Y')]"> ... </ ======== I was a bit taken aback to find that "*[]" takes priority over "document". This might be according to spec, but it's still a bit counter-intuitive, isn't it! Cheers T
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Include crop marks for the pr, Shailesh Shinde | Thread | [xsl] Japanese characters show up a, David Nesbitt |
Re: [xsl] Getting the current node,, Dimitre Novatchev | Date | [xsl] Japanese characters show up a, David Nesbitt |
Month |