xsl-list
[Top] [All Lists]

Re: xmlns="" ??

2004-04-30 03:07:12
Arthur Maloney wrote:

Hello xsl-list,

  I'm using MSXML SP2 to transform Why is xlms="" appearing in meta & table



W3C XHTML 1.0 standard:- Root element must be "html" & contain namespace as 
below:

My code:
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

        <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

        ...
        <meta ...></meta>
        ...
        <table>
        ...

Output is
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" 
xmlns=""></meta>

<table xmlns="">

W3C can't validate as XHTML 1.0 Strict!
because it does not recognize - xmlns="" -
Not part of the standard

If I omit html namespace transformation works. But html element does not
conform.

Is it just MS non standards based output ?

Is there a work around so html element can
conform to stand W3C standard

I have got it all wrong ?

You need to delcare the namespace on *all* html elements. The default ns declaration for the root tag is probably not in scope where your "table" element appears. Just add the ns declaration there as well.

Julian

--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760


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