[oXygen-user] XML to HTML - a couple of questions
Robert Koberg
Sat Oct 11 10:41:31 CDT 2008
On Oct 11, 2008, at 11:34 AM, Peter Bradley wrote:
>
> When I do the transformation, I get this output (start):
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;
> charset=utf-8">
>
> <title>My Title</title>
>
> My question is, what is that meta tag? Not only does it appear to
> have
> been inserted without my say-so, but it's also invalid since it's not
> closed.
The XSL processor puts it in. It is not invalid HTML since that was
your output method (which I think is also the default if you did not
specify an output method and your root element name is 'html'). If you
want XHTML and you must use XSL version 1, you need to use the output
method xml. If you can use an XSL version 2 processor, you can use the
output method xhtml which give you other benefits when outputting
xhtml (no need to hack things like script, textarea, etc)
>
>
> The second question concerns the insertion of a DTD at the top of the
> page. My Google-foo appears to have deserted me to the extent that I
> can't see any way of performing a transformation that puts a DTD at
> the
> top of the HTML page. Unsurprisingly, I want to have this:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
This is also on the xsl:output:
http://www.w3.org/TR/xslt#output
Specifically the attributes:
doctype-public = string
doctype-system = string
but, again with XSL 1.0, you need to output xml, not html.
BTW, these are general XSL questions and should be asked on mulberry's
xsl list.
best,
-Rob
>
>
> ... as the first line in the result document.
>
> Apologies if these are silly questions, but I just haven't been
> able to
> find any answers.
>
> Thanks in advance
>
>
> Peter
>
> _______________________________________________
> oXygen-user mailing list
>
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
More information about the oXygen-user
mailing list