[xsl] Avoid xmlns (namespace)

Subject: [xsl] Avoid xmlns (namespace)
From: "J. S. Rawat" <jrawat@xxxxxxxxxxxxxx>
Date: Sat, 24 Jan 2009 15:40:59 +0530
Hi List,
I want to avoid xmlns="http://www.w3.org/1999/xhtml"; as an attribute of element "item" (<itemref xmlns="http://www.w3.org/1999/xhtml"; idref="ch1" linear="yes"/>) from the output xml even after my exclusion entry in the top (#default). If I remove xmlns from xsl:stylesheet, I am getting xmlns="".

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns="http://www.w3.org/1999/xhtml";
exclude-result-prefixes="#default xsl" version="2.0">

<xsl:variable name="metafile" select="document('meta.txt')"/>

<xsl:for-each select="$metafile/items/file">
<xsl:apply-templates select="." mode="manifest"/>

<xsl:template match="file" mode="manifest">
 <item id="{title/@id}" href="{@id}" media-type="application/xhtml+xml"/>

Any tip in this direction will be highly appriciable!!!


Current Thread