output method is html.
Unless I include the <head> element,
I get no meta element included.
Suggest this should be either
a) An error, stylesheet can't do as required by output instruction.
b) The head element should be included.
But to ignore it seems wrong Mike?
**** snip here *****
NOTICE: The information contained in this email and any attachments is
confidential and may be legally privileged. If you are not the
intended recipient you are hereby notified that you must not use,
disclose, distribute, copy, print or rely on this email's content. If
you are not the intended recipient, please notify the sender
immediately and then delete the email and any attachments from your
RNIB has made strenuous efforts to ensure that emails and any
attachments generated by its staff are free from viruses. However, it
cannot accept any responsibility for any viruses which are
transmitted. We therefore recommend you scan all attachments.
Please note that the statements and views expressed in this email
and any attachments are those of the author and do not necessarily
represent those of RNIB.
RNIB Registered Charity Number: 226227
From: Michael Kay <mhk@mh...> - 2003-05-12 23:46:32
> output method is html.
> Unless I include the <head> element,
> I get no meta element included.
> Suggest this should be either
> a) An error, stylesheet can't do as required by output instruction.
> b) The head element should be included.
> But to ignore it seems wrong Mike?
Saxon is following the spec here. If you want the spec changed, this is
not the place to ask.
I think this is opening a Pandora's box. In general, saying
output="html" is a request to format the output as HTML, not to validate
that it is correct HTML; producing valid output is the user's
responsibility. If omitting the <head> element is an XSLT error, then
all sorts of other HTML errors should be XSLT errors too. XSLT 2.0 of
course allows you to validate the result document against a schema if
From: Mike Brown <mike@sk...> - 2003-05-13 01:31:18
Michael Kay wrote:
> If omitting the <head> element is an XSLT error, then
> all sorts of other HTML errors should be XSLT errors too.
Furthermore, both the start and end tags for the <head> and <body> elements
are optional. Combine this knowledge with the fact that an XSLT user may be
generating an HTML fragment and not a complete document, and you should see
that the only time it's safe to output the <meta> is when a <head> element has
been explicitly provided in the result tree.
These complications are also factors in the common behavior of emitting the
<meta> right after the <head> start tag, even if there's an explicit meta in
the result tree already. It's difficult for a serializer to know when it's "in
the HEAD" since there might not even be one.