[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|