Can anybody tell me whats wrong with this xslt
-
I have an xhtml file that is valid and im running a simple xslt sheey against him only to be able to catch the body element and it dosent work. The xml: <html xmlns="http://www.w3.org/1999/xhtml"> <body> <a name="top"></a> </body> </html> The xslt: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" > <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <xsl:apply-templates select="node()"/> </xsl:template> <xsl:template match="body"> here </xsl:template> </xsl:stylesheet>
-
I have an xhtml file that is valid and im running a simple xslt sheey against him only to be able to catch the body element and it dosent work. The xml: <html xmlns="http://www.w3.org/1999/xhtml"> <body> <a name="top"></a> </body> </html> The xslt: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" > <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <xsl:apply-templates select="node()"/> </xsl:template> <xsl:template match="body"> here </xsl:template> </xsl:stylesheet>
Change your xml as shown below. <html xmlns="http://www.w3.org/1999/xhtml"> --- > <html> This name space reference is creating issues. Thanks, Nagaraj