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

Hello Daniel, thanks for your quick reply.

>   If you want to output XHTML then output="xml" and generating
> and XHTML1 doctype is the correct way to proceed.

Unfortunately, the result - while being valid xhtml - is not compatible
for most html parsers. There are a couple of minor tweaks that will
result in valid xhtml output that is easier to parse by buggy old html
parsers. For example some fail on <br/>, but succeed on <br />
That is why i prefer the html output mode. (which uses <br></br>,
which i've never seen before...)

>   If you generate HTML output and not XHTML output there is no
> reason to close the meta tags. You can look around in the spec and zillion
> example on the web they are not closed. 
>   And oif you want to genetare XHTML they *MUST* be closed .

Still it doesn't harm, it doesn't make the HTML file invalid if you
close the tag - after all it's just the two characters " /" more -
but it will make the file parseable as XML as well (except for the
character set)

> > second: can i have xsltproc output
> >   <?xml version="1.0" encoding="iso-8859-1"?>
> > even in html mode? then the resulting file would be valid xhtml.
>   Your sentence makes no sense. 
>   1/ if you use output="html" xsltproc does not generate this

That is why i asked "can i have". Because xsltproc doesn't.

>   2/ validity in XML has a precise meaning, and is unrelated to
>      the XML declaration (except for standalone, but not qaffecting this
>      case).

The character set is an important part of the information, too.
FYI, xmllint will accept my generated file when i add the XML encoding
information and close the meta tag.

>   Your problems won't be looked at any further without the required set of
> informations, see http://xmlsoft.org/XSLT/bugs.html

I'm running debian unstable, which has libxslt/xsltproc 1.1.1
and libxml2 2.6.3. I know that both are one minor version off,
but the changelogs didn't show related changes.
The given web page doesn't specify a required set of informations except
for example input and stylesheets, which i did not attach, since they
are not special, just use any (x-) html generating xslt.

     erich@(vitavonni.de|debian.org)    --    GPG Key ID: 4B3A135C     (o_
         The best things in life are free: Friendship and Love.        //\
 Mancher findet sein Herz nicht eher, als bis er seinen Kopf verliert. V_/_

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