Christian,
Thank you.
I’ve just spotted that I was unclear in my description in the last email. According to the specification only <meta> elements that have @http-equiv with a value of Content-Type should be discarded. Not any with http-equiv. Apologies for any confusion.
Regards, James
On 13 Jan 2016, at 18:49, Christian Grün christian.gruen@gmail.com wrote:
Looks suspicious indeed. Thanks for the hint, I’ll track this down this soon [1]. Christian
[1] https://github.com/BaseXdb/basex/issues/1240
On Wed, Jan 13, 2016 at 7:37 PM, James Ball basex-talk@jamesball.co.uk wrote:
Hi Christian,
Thank you for that, so the first case is correct. And the second case, where existing <meta> elements are removed? I’ve just read the spec and it looks like only <meta> elements that have http-equiv should be discarded.
Regards, James
On 13 Jan 2016, at 18:31, Christian Grün christian.gruen@gmail.com wrote:
Hi James,
Is this correct?
It should be, at least according to the current specification (“If there is a head element [...]”, see [1]).
Hope this helps, Christian
[1] https://www.w3.org/TR/2015/CR-xslt-xquery-serialization-31-20151217/#HTML_IN...
On Wed, Jan 13, 2016 at 7:06 PM, James Ball basex-talk@jamesball.co.uk wrote:
Hello,
I’m getting an unexpected behaviour with the serialization option include-content-type and file:write with HTML.
If I write a document without a <head> element then one doesn’t get added and nothing happens.
file:write("test.htm",<html><body/></html>,map {"method":"html", "html-version":"4.0","include-content-type":"yes”})
returns:
<html> <body></body> </html>
Is this correct?
If there is a head then the <meta> gets added with no problems - unless there is already a meta element, in which case it gets replaced.
file:write("/Users/jb8748/test.htm",<html><head><meta http-equiv="refresh" content="60" /></head><body/></html>,map {"method":"html", "html-version":"4.0","include-content-type":"yes”})
returns:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body></body> </html>
Is this correct?
All running Running Beta 8.4 f5341cc
Many thanks, James