[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Removing xmlns attributes from html tags

Subject: Removing xmlns attributes from html tags
From: Anders Flodell <anf@xxxxxxxxxxxx>
Date: Wed, 28 Mar 2001 11:33:10 +0200
removing xmlns
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.