[xml] Namespace declarations in the HTML tag



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm trying to get my XML->XSLT->HTML page to pass the w3's HTML
validator, and it seems that regardless which mode I use (html 4.01,
xhtml 1.0) it complains about this:

<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns:nav="http://cfconsulting.ca/navtree/1.0";
~      xmlns:xform="http://cfconsulting.ca/xform/1.0";>
~    <head>
~       <meta http-equiv="Content-Type" content="text/html;
~             charset=UTF-8" />
~       <title></title>
~       <link rel="stylesheet" href="css/main.css" />
~     </head>
<body>
...

(reformatted for readability).

The nav & xform namespaces were declared in my XML source file, but
apparently they're being carried forward into the final HTML file.
Unnecessarily too, since those two namespaces are only used in the XML
side of things.

The validator complains about them - is there a way to tell the
processor to NOT include the xml namespace declarations in the final output?

Here is the top of my xslt page:


<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0"
~    xmlns:nav="http://cfconsulting.ca/navtree/1.0";
~    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
~    xmlns:xform="http://cfconsulting.ca/xform/1.0";>

<xsl:output indent="yes" method="xml"
~    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
~    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>


Is there something here I need to do?

Thanks,
~  cf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAV1QCoaQ1/feGlJoRAvqRAJ9pvMMCdSN/opV9ed99egupHpKzxwCePNEZ
OsU07xGDH8pr+WiDRNUxlS0=
=KuKs
-----END PGP SIGNATURE-----



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]