xsl-list
[Top] [All Lists]

generate XHTML header without causing xmlns attributes in e.g. <table>?

2003-10-16 23:58:01
I need to generate valid XHTML 1 strict from my XSL stylesheet

My stylesheet starts with:
<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml"; 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml" encoding="ISO-8859-1" doctype-public="-//W3C//DTD 
XHTML 1.0 Strict//EN" doctype-system="DTD/xhtml1-strict.dtd" />

When I generate my XHTML document using Xalan-J, I get these headers in the 
XHTML file

<?xml version="1.0" encoding="ISO-8859-1"?>
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"DTD/xhtml1-strict.dtd">
                <html xmlns="http://www.w3.org/1999/xhtml";>

Which is exactly what I want.

However, my tables cannot validate using w3c's validator, since they get an 
empty attribute with the name xmlns, like this:
<table xmlns="" id="y" class="z">

Also the XHTML tags inside the table (not td/tr but all others) also get the 
xmlns attribute which has no value and they also get an xmlns:fo attribute like 
this:
<br xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format"; />

How can I generate valid XHTML1 without having those xmlns attributes inserted 
in table and <br>?
If they must be there, how can I control their value?

Regards,
Flemming Joensson

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list