xsl-list
[Top] [All Lists]

xmlns added to some <html> elements

2004-03-25 10:27:09
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


<Prev in Thread] Current Thread [Next in Thread>