Posted by
Tambet Matiisen on
URL: https://discuss.orbeon.com/XHTML-output-and-PDF-tp3026751p3028248.html
On 5.11.2010 3:09, Erik Bruchez wrote:
> Tambet,
>
>> I'm happy with the result, but I noticed one thing in the process: even when
>> oxf.epilogue.output-xhtml=true, the output is still HTML in IE and it will
>> give error when generating PDF. I tracked the problem down into
>> /config/epilogue-servlet.xsl in orbeon-resources-private.jar. There is a
>> check, that XHTML output is produced only, when accept header sent by
>> browser contains application/xhtml+xml. But IE sends accept header as */*,
>> which should be acceptable also. My question is - why is this check there
>> and can't it be just removed? I want to use vanilla Orbeon with no custom
>> patches.
> I am not sure but I assume it's because IE did not (does not until
> version 9) support application/xhtml+xml:
>
>
http://www.w3.org/MarkUp/2004/xhtml-faq#ieJust did test with my IE8 and it happily accepts application/xhtml+xml
content type, even in compatibility mode.
>> I did a little research before sending this e-mail and indeed when accept
>> header is */*, then output should be text/html.
>>
http://www.w3.org/TR/xhtml-media-types/#media-types>>
>> I would rather see, that when oxf.epilogue.output-xhtml=true and accept
>> header is text/html or */*, then output is still XHTML, but formatted
>> according to HTML compatibility guidelines (isn't it already?):
>>
http://www.w3.org/TR/xhtml1/#guidelines> That would be a possibility. Could you try this change and make sure
> it works with IE and other browsers?
I could remove the accept header check (therefore output is always
XHTML), set content-type to text/html (although application/xhtml+xml
doesn't seem to trigger any problem in IE8 and IE7 compatibility mode),
let it sink for a few weeks and send you patch then. I currently don't
have time or knowledge to review xml-converter, if it outputs
HTML-compliant XHTML in xhtml mode. But this solution would be better
aligned with my expectations, when I set oxf.epilogue.output-xhtml = true.
> One requirement is that we don't want to trigger IE's quirks mode with
> an improper DOCTYPE.
Quirks mode choice is based on DOCTYPE as you said, not Content-Type. If
oxf.epilogue.output-xhtml = true and browser is IE, then currently
Orbeon works in quirks mode. It is in standards mode in all other
browsers (that send application/xhtml+xml as part of accept header) and
in IE when oxf.epilogue.output-xhtml = false. Interesting choice.
Regards,
Tambet
--
You receive this message as a subscriber of the
[hidden email] mailing list.
To unsubscribe: mailto:
[hidden email]
For general help: mailto:
[hidden email]?subject=help
OW2 mailing lists service home page:
http://www.ow2.org/wws