Re: Review of XHTML+RDFa 1.1 (http://www.w3.org/TR/2010/WD-xhtml-rdfa-20100803/) (Tom)

On Mon, 01 Nov 2010 11:07:12 -0500
Shane McCarron <shane@aptest.com> wrote:

> > === Comment 10
> > 3. Additional RDFa Processing Rules
> > [...]
> > In section 6.5, processing step 6, if no URI is provided by a
> > resource attribute, then first check to see if the element is the
> > head or body element. [DOES THE ORDER MATTER? SHOULD THE BODY
> > ELEMENT BE CHECKED BEFORE THE HEAD ELEMENT?]
> > ===  
> 
> This is legacy text and I don't think it matters.  Mark, can you
> elaborate?

This is just checking the tag name of the current element, so it
doesn't matter which.

You could do:

	if ($current_element.tagName == 'head'
	||  $current_element.tagName == 'body')

or:

	if ($current_element.tagName == 'body'
	||  $current_element.tagName == 'head')

or even use a regular expression:

	if ($current_element.tagName.matches(/^head|body$/))

Doesn't matter. (Well, you probably want to do a namespace-aware check,
but that complicates the examples.)

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Monday, 1 November 2010 16:30:16 UTC