[xsl] Removing xmlns attributes from html tags

Subject: [xsl] Removing xmlns attributes from html tags
From: Anders Flodell <anf@xxxxxxxxxxxx>
Date: Wed, 28 Mar 2001 11:33:10 +0200
Hi list !

Im presenting content with xsl, xml , msxml3 komponent and ASP.
When using multiple included xsl templates, done with xsl:include, I get
back the xmlns attributes within my outputted HTML, like:

<HTML xmlns:common="somexsl.xsl" xmlns:user"someotherxsl.xsl"

I dont want to show this in the HTML, is there a way to remove the xmlns
attributes ?
Have I missed something in the ASP code for generating my web page that
actually prevents outputing the xmlns attributes ?

Here is the ASP code Im using:

set XSLTDoc = Server.CreateObject("MSXML2.XSLTemplate")
set XMLobj = Server.CreateObject("msxml2.DOMDocument")
set XSLobj = Server.CreateObject("Msxml2.FreeThreadedDOMDocument")
' Load the XSL
XSLobj.async = false
XSLobj.validateOnParse = true
XSLobj.resolveExternals = false
result1 = XSLobj.load(styleFile)
XSLTDoc.stylesheet = XSLobj
set proc = XSLTDoc.createProcessor()
' Load the XML
XMLobj.async = false
XMLobj.resolveExternals = false
result2 = XMLobj.load(xmlfile)
proc.input = XMLobj
proc.output = Response

Here is part of the xsl Im using:

<?xml version="1.0" encoding="Windows-1252"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
<xsl:output method="html" indent="yes" encoding="windows-1252"/>
<xsl:include href="mystyle.xsl"/>
<xsl:include href="someotherxsl.xsl"/>
<xsl:include href="athirdxsl.xsl"/>
<xsl:template match="/">

For the moment I have made a "hairy" work-around with string handling in the
ASP code that removes the xmlns attributes before it presents the page.

With Kind regards
Anders Flodell
Custom Developer
Intellix A/S

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread