RDFa about= attribute and the W3C validator

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I've been working on a new release of my website http://mushroomobserver.org
and trying to get all the pages to pass the W3C validator.  However, a
recent change I made has me stumped.  An example page is:


I'm running it through the validator with:


The error I get is:

Line 105, Column 15: there is no attribute "about".

The reason I added the 'about=' attribute (and in fact the div itself)
was to use RDFa to generate the correct RDF for the Creative Commons
license I want to put the image under.  I was turned onto the use of
RDFa for this purpose by the folks at Creative Commons.  I think this
might have to do with the DTD I'm using for the page and perhaps there
is some additional definition file I need to load, but I'm a bit hazy
on all of this at the moment.

Any help would be most appreciated!


Re: RDFa about= attribute and the W3C validator

Quoted text here. Click to load it

I did a bit of searching, and it looks like RDFa is currently just a
working draft. It looks like something that would sensibly exist in
its own namespace (although using that would be saying goodbye to
Appendix C compatibility), but isn't actually in one yet (either that,
or someone is expecting future versions of HTML to include it, or
someone doesn't care and/or understand about validation).

As far as I can tell, you can't use RFDa in a valid, Appendix C
conformant HTML document today.

Quoted text here. Click to load it

You could stuff the RDFa into its own namespace, then process the
document as part of your publication process (or each time the page is
requested) to extract the data, represent it in the other format you
described, and then remove the non-XHTML namespace from the
documentation entirely.

David Dorward
http://dorward.me.uk /
http://blog.dorward.me.uk /

Re: RDFa about= attribute and the W3C validator

Nathan wrote:
Quoted text here. Click to load it


Note where it says RDFa is still a proposal, which means it won't pass
validation and probably won't for a long time yet. That isn't
necessarily a reason not to use it, but it does mean that it is subject
to change so use at your own risk. See the links at the bottom of that
page for more info.


Re: RDFa about= attribute and the W3C validator

Quoted text here. Click to load it

Couple of things about RDFa:

* The ink's not dry yet.
* RDFa is a push from extremely smart RDF people who don't always
appreciate real world HTML-authoring issues.
* "Compatible" is problematic. To quote the RDFa spec, "An XHTML
document marked up with RDFa constructs should validate, and a non-XML
HTML document marked up with RDFa remains compliant."  HTML docs (and
Appendix C XHHTML docs) using RDFa are _not_ valid, and they only
remain compliant by relying on some reliable browser error-correction
behaviour regarding the ignoring of unknwon attributes (Jukka will
butt in somewhere around this point to bad-mouth it)

So RDFa works, it works pretty well and it works reliably and
compatibly. It does this for XHTML, Appendix C and HTML

_However_ using RDFa can break an authoring process based on the blind
use of DTD-based validationg tools, which includes pretty much all
clueful coding processes that are still trying to get valid output
from less-skilled coders. If you want to keep validating it (and you
should), then you either need to know enough to manually ignore the
known non-validities, or else you can automatically post-process the
report from the validator to strip these.

Re: RDFa about= attribute and the W3C validator

Thanks for all the quick replies!  Sounds like I've found a hairy edge
of 'doing the right thing' :-).  For now, I've left the attribute in
the pages that need it, but I'm not marking them as valid and its use
is restricted tags that are only about RDFa.

I am hoping to expand my use of RDF (and probably RDFa) in the near
future, so it's good to know that this is an issue.

Re: RDFa about= attribute and the W3C validator

Andy Dingley wrote:

Quoted text here. Click to load it

Maybe they're relatively reliably supported, but they're not compliant.

The W3C standard just says that:

Quoted text here. Click to load it


Re: RDFa about= attribute and the W3C validator

On 22 Sep, 11:37, "Andr=E9 Gillibert"
Quoted text here. Click to load it

What does "compliant" mean?

I suspect that you're interpreting it to mean the same as "valid",
when the RDFa spec and I take a looser (but still workable) meaning of
it. If we'd meant "valid", we'd have said "valid" (and would then have
been unable to implement it under non-XML XHTML Appendix C)

Site Timeline