Subject: Re: [xsl] template never matches From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Tue, 22 Feb 2011 13:47:03 +0100 |
I'm having trouble matching a named element vs using node(). Code below. Any bright ideas?
Example input:
<?xml version="1.0" encoding="utf-8"?> <html> <head> <title>Vmtejte</title> <meta charset="utf-8"/> </head> <body id="home"> </body> </html>
XSL:
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xs xsl">
<xsl:template match="/"> <xsl:copy> <xsl:apply-templates select="@* | node()" mode="test"/>
<xsl:template match="node() | @*" mode="test"> <!-- always matched --> <xsl:sequence select="." /> </xsl:template>
<xsl:template match="head" mode="test">
Martin Honnen http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
AW: [xsl] template never matches, Szabo, Patrick \(LNG | Thread | Re: [xsl] template never matches, Andrew Welch |
AW: [xsl] template never matches, Szabo, Patrick \(LNG | Date | Re: [xsl] template never matches, Andrew Welch |
Month |