W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > January 2009

Serving XHTML+RDFa as application/xhtml+xml

From: Sam Kuper <sam.kuper@uclmail.net>
Date: Tue, 27 Jan 2009 17:10:15 +0000
Message-ID: <4126b3450901270910o417e483bo74658969578b13fe@mail.gmail.com>
To: RDFa <public-rdf-in-xhtml-tf@w3.org>

Dear all,

If this is not an appropriate mailing list for my query below, please
could you direct me to a better list, and accept my apologies for
posting to the wrong place?

The PHP document below produces an error in Firefox and Safari, both
of which - if I'm not mistaken - accept application/XHTML+xml:

<?php header("Content-Type: application/xhtml+xml; charset=utf-8");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; ?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
        <meta http-equiv="Content-Type"
content="application/xhtml+xml; charset=UTF-8" />
        <p>Just a test&hellip;</p>

Yet, if I "view source" in those browsers after loading the resulting
page, and paste that source code into the W3C validator, the validator
finds it valid. What, then, am I doing wrong; or is this a bug in
those browsers?*

Many thanks for your help,


*A few notes:
- If I remove the string "&hellip;", then the page above renders
without error messages, albeit without the ellipsis.
- If I replace the string "&hellip;" with an ellipsis character
(copied from Wikipedia, for instance, and pasted into the PHP code),
then the page renders without error messages and with the ellipsis.
This would be a fine solution if it weren't for the fact that other
people who I'm working with may want to be able to enter such
characters as HTML entity references such as "&hellip;". So I need to
be able to achieve a result that will allow them to do so.
- If I replace the string "application/xhtml+xml" in the first line
with "text/html", then the page renders without error messages and
with the ellipsis. For the time being, this is the solution I've
adopted, but for browsers that support application/xhtml+xml, I'd
rather serve application/xhtml+xml, as this specified as a SHOULD in
http://www.w3.org/TR/rdfa-syntax/ (unless I've misunderstood).
Received on Tuesday, 27 January 2009 17:10:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:30 UTC