This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Removing xmlns attributes from html tags


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"
xmlns:style="mystyle.xsl"
xmlns="http://www.w3.org/TR/REC-html40";><HEAD><STYLE>
...
</HTML>

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
proc.transform 

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"; 
	xmlns:common="somexsl.xsl"
	xmlns:user="someotherxsl.xsl" 
	xmlns:style="mystyle.xsl"
	xmlns="http://www.w3.org/TR/REC-html40";
	version="1.0">
<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="/">
...
</xsl:stylesheet>

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
www.intellix.com


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]