[xslt] Re: <br></br> empty elements



Daniel Veillard wrote:

------------------

  Either you want to save XHTML or you want to save HTML.
The rules are not the same. XHTML1 serialization rules are for
output="xml" and the proper DOCTYPE set-up , or you use 
output="html" and in that case the XML is generated in the normal
way any XML would, and this includes nodes with namespaces.
  <html>
  <html xmlns="http://www.w3.org/TR/html4/strict";;>
are 2 totally different nodes in that case. The first one is an 
HTML and hence SGML node serialized for HTML4.01 targets. In the
second case it is an XML node with a namespace and the serialization
rules are the ones of XML in that context.
  So no "output with and without namespace declaration should be 
identical"
is just plain wrong !

----------------

yes, I realised what was going on as soon as I'd sent out the last 
mail. These are old files that used to run under other xslt 
processors and we're converting to libxml/xslt and getting 
discrepancies. Looks like the old processor was just ignoring any 
namespace if output was html, whereas libxslt is taking the namespace 
as definitive. So, ok, having an html namespace is wrong anyway, 
because html is not an xml format, so it should be deleted. Problem 
solved.

Thank you



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