The changes listed at http://drupal.org/node/254940#rdfa_header need to be done to the default page.tpl.php file.

Comments

geerlingguy’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

Here's a patch - patchy goodness!

johnalbin’s picture

The original patch for RDF variables is over in #332980: RDF namespace registry (Add a changelog entry).

One thing we need to test thoroughly is the change in DOCTYPE. This patch changes the doctype from "XHTML 1.0 Strict" to "XHTML+RDFa 1.0". Considering that every modern browser and many crappy browsers (like IE) do doctype switching, we want to be very careful when deciding to make this type of change.

If IE switched from "standards compliant" mode to "quirks" mode, it would be effectively impossible to theme a site using CSS. Because any CSS designers worth his/her salt only works in "standards compliant" mode.

I'm not saying this patch will cause the end of the world as we know it (for CSS developers), but we need to test this very carefully before committing.

johnalbin’s picture

StatusFileSize
new1.09 KB

Looks like Opera is safe. Unrecognized doctypes are automatically in "standards" mode. http://www.opera.com/docs/specs/doctype/

Same thing with IE6: http://msdn.microsoft.com/en-us/library/bb250395.aspx#

It looks like we might be safe. We just need to check all our bases before proceeding.

@geerlingguy: You removed some trailing semi-colons from several print statements.

And for those wondering why the "lang" attribute of the HTML element disappeared (I was), see #338429: XHTML 1.1 compatibility (RDFa).

Re-rolled with semi-colon and spacing fixes.

scor’s picture

@JohnAlbin: is this semi colon rule new? I can see both syntaxes with and without semi colon across the core themes. Example without trailing ;:
./modules/system/block.tpl.php:34: <?php print $block->content ?>

If this is new then we also need to fix all the core theme since they contains both syntaxes.

geerlingguy’s picture

@ JohnAlbin / scor: Hmm... those trailing semi-colons... I hate 'em, but either way is fine with me. I haven't seen anything that defines how it's *supposed* to be done, so maybe we could add it to http://drupal.org/coding-standards or the coding standards section in the theming handbook?

johnalbin’s picture

Re: the semi-colons. It doesn't seem we have a standard right now. And its the mix of having or not having trailing semi-colons that drives me batty. If you look at Garland's page.tpl, its all over the place. While system/page.tpl.php consistently _has_ semi-colons, so we should keep it consistent.

The "must have semi-colon" urge comes from my PHP programmer half of my brain and the "must not have semi-colon" urge comes from my KISS-for-themers part of my brain. So I'm not real strong in my opinion on what our standard should be.

wretched sinner - saved by grace’s picture

To weigh in, since I happened to be reading the coding standards today, I would say that semi-colon's in is probably the better way to go, since the JS standard is to include them (to rpevent errors). Therefore including them would be the best option I think as it keeps us consistent between languages also (as much as possible).

scor’s picture

Status: Needs review » Reviewed & tested by the community

either way the semi colon issue should be fixed in a different issue. this is RTBC.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Well... we need to document those variables at the top of the file.

johnalbin’s picture

Status: Needs work » Needs review
StatusFileSize
new1.66 KB

Doh!

Ok. I added the missing comments. scor, can you review them to make sure I got a good summary of those variables? I wrote them entirely without any RDF experience, based on the comments in your previous patch and the handbook.

scor’s picture

Status: Needs review » Reviewed & tested by the community

@JohnAlbin: that's good!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Cool. Those comments read exactly like "wah wah wah" to me, but I assume someone who knows what that stuff is will be impressed. :P

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

davidseth’s picture

Issue tags: +RDF

adding RDF tag to make it trackable with all the other patches, etc.