[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: generate XHTML header without causing xmlns attrib
The problem isn't the xmlns="" declarations, the problem is that you have put the <table> element is in the wrong namespace (actually, in no namespace). Show us how you produce the table element. If you put the element in the right namespace, the namespace declarations will look after themselves. Michael Kay > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of > Flemming Jønsson > Sent: 17 October 2003 07:58 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: generate XHTML header without causing xmlns > attributes in e.g. <table>? > > > 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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|