[xslt] Re: [xml] xsltproc outputs invalid meta tag for xhtml

On Tue, Dec 30, 2003 at 12:00:28AM +0100, Erich Schubert wrote:
> Hello Daniel,
> it's nice that you show your skill to flame that much.

  Well, you're making my life harder just because you don't
follow the guidelines, why on earth should I take this a good thing
and not react ? I do code, I do support, I do bug fixes, I just ask to
follow the f....g guidelines and some people think they know better
and that they can waste my time. Who is childish ????

> But my xslt stylesheet does use
> <xsl:output method="xml" encoding="iso-8859-1"
> doctype-public="-//W3C//DTD XHTML 1.1//EN"
> doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"; />
> which is AFAIK the correct specification of XHTML1.1, isn't it?

  well, now that you finally show some code, I can point you to the
problem. Libxml2 handles XHTML1 


  and you used XHTML-1.1

  which is a different spec. With a different DOCTYPE, that I don't 
claim to support (yet).

> Just as you suggested in your first mail, and claimed i did not read.

  Well, it looks like you read my mail, I said XHTML1 and you used
XHTML-1.1 . The code for the serialization should probably be adapted to
handle XHTML-1.1, the best is to ask for it in a bugzilla entry.

> Still the output is "<br/>", so i can't really use this for generating
> fully html-compatible xhtml.

  Just need to fix the Doctype that should work, or fix libxml2 code
to try to handle XHTML-1.1 

> Attached is an unbelievably complex example...
> The result contains "<br/>" thus is unuseable for HTML compatibility.
> changing xsl:output/@method to "html" will result in an non-XML file
> (due to the meta tag) with the non-standard <br></br> (although <br> has
> minimal content model empty, so C.3 of XHTML1.0 doesn't apply)

  Right that's one of the many reason why output="html" should not be
used for generating XHTML.

> >From 3.1.1 of XHTML1.0:

  Note XHTML-1.0 ... compare to 1.1 :-)

> "An XML declaration is not required in all XML documents; however XHTML
> document authors are strongly encouraged to use XML declarations in all
> their documents. Such a declaration is required when the character
> encoding of the document is other than the default UTF-8 or UTF-16 and
> no encoding was determined by a higher-level protocol."
> Well, my request for a way to output the <?xml> header albeit using
> "html" output isn't that far off, is it? Of course the meta tags do

  it is, the way HTML output the character encoding is different, there
is predefined entities that the HTML (SGML) serializer may use which
could lead to errors when parsed as XML, etc. Stating that something is
XML when it is serialized with the HTML serialization code is really a bad

> specify a character set as in "higher-level protocol". But that isn't a
> reason not to output that header anyway.

  if generated from an HTML serializer that's really a bad idea.


Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

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