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



On Mon, Dec 29, 2003 at 03:28:32AM +0100, Erich Schubert wrote:
Hi,
i've been transforming xml to xhtml via an xslt stylesheet using "html"
output mode (so empty tags don't get folded).

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

I'm happy with the result except for two small things:

xsltproc inserts a meta tag which is not valid xhtml:
the tag is not closed, neither <meta ... /> nor <meta ..></meta>
I am not aware of some browser not supporting the latter notation.

  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 .

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
  2/ validity in XML has a precise meaning, and is unrelated to
     the XML declaration (except for standalone, but not qaffecting this
     case).
 
     
I tried using xml output mode, but that had unwanted side effects, too -
like <div> </div> becoming <div/>.

  Which is normal for generic XML serialization. If you want to force 
XHTML1 serialization rules, you must add an XHTML1 doctype to the generated
document (see xsl:output definition where this is detailed).

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

Daniel

-- 
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]