Subject: RE: [xsl] xmlns added to some <html> elements From: "Josh Canfield" <Josh.Canfield@xxxxxxxxxxxx> Date: Thu, 25 Mar 2004 10:17:05 -0800 |
Take a look at the exclude-result-prefixes attribute of the stylesheet element, or the xsl:exclude-result-prefixes attribute on a literal result element. This link has more information: http://www.w3.org/TR/xslt#section-Creating-Elements-and-Attributes Josh -----Original Message----- From: Ian Lang [mailto:ianplang@xxxxxxxxx] Sent: Thursday, March 25, 2004 9:27 AM To: XSLT List Subject: [xsl] xmlns added to some <html> elements I am having a problem that is baffling me. I never noticed this before and in fact some of my older generated html page sets do not have any of this. I have a project that generates multiple .html files from a single XML stream using Xalan's redirect extension. Some of the .html files are fine but some of them have html elements that look like this: <html xmlns:ns1="a namespace from my xslt file" xmlns:ns2="another ns from my xslt file" xmlns:ns3="another"> The namespaces are all those from my .xslt except the redirect and xsl namespaces. I cannot see anything in the output element documentation that looks helpful. My output directive looks like this: <xsl:output method="html"/> Ditto for the redirect documentation. My redirect elements look like this: <redirect:write select="$FileName"> <html> ... </redirect:write> or like this: <redirect:open select="$OutterFileName"/> <redirect:write select="$OutterFileName"> <html> ... inside a for-each <xsl:for-each ...> <redirect:open select="$InnerFileName"/> <redirect:write select ="$InnerFileName"> <html> ... </redirect:write> ... resume writing the outter file name <redirect:write select="$OutterFileName"> ... </redirect:write> </xsl:for-each> </redirect:write> But there is no coorelation between .html files generated using just redirect:write and those using redirect:open and redirect:write. These extra namespaces do not bother MS IE but it does bother HTTPUnit which we are using for our units tests on the generated HTML. Plus there is no need for them to be there - our customers do not need those namespaces. Any advice would be appreciated. Thanks, IL __________________________________ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xmlns added to some <html> el, Ian Lang | Thread | [xsl] Some help with xsl transform , Dylan Barber |
Re: [xsl] XSLT 2.0 Decimal number s, Jeff Kenton | Date | RE: [xsl] Some help with xsl transf, Josh Canfield |
Month |