Myreader.co.uk  
uk news, chat and community
   home   |   control panel login   |   archive   |  
 
net
net
news.announce
news.config
news.management
news.moderation
providers
providers.aaisp
web.authoring
  
 
date: Tue, 22 Jan 2008 16:38:29 +0000,    group: uk.net.web.authoring        back       
<q>   
To my surprise, Internet Explorer fails to understand <q>.

And since it also doesn't understand :before and :after, I can't even
get it to display quotes by adding a bit of CSS!

How rubbish is that?

Daniele
date: Tue, 22 Jan 2008 16:38:29 +0000   author:   (D.M. Procida)

Re: <q>   
"D.M. Procida" wrote;
> To my surprise, Internet Explorer fails to understand <q>.
>
> And since it also doesn't understand :before and :after, I can't even
> get it to display quotes by adding a bit of CSS!

"Does the job"

Set up an auto-complete in your editor.

---dE|_---
date: Tue, 22 Jan 2008 17:06:35 GMT   author:   dE|_

Re: <q>   
dE|_ wrote:

> "Does the job"

“Even better!” Or if you're using UTF-8, you don't need to use 
entities at all, just include the quote marks in the document directly 
“like this”.

When <q> works though, it's far more useful than boring inline quote marks:

  * It should automatically take into account the language of the 
    document -- for example the French quote «like this»;

  * Nested <q> elements can be detected in CSS, and the quote mark
    changed, so, say the outer set of quotes used “doubles”, but the 
    inner ‘singles’;

  * You can style the <q> element with CSS (e.g. italics, different
    colour, etc) without having to add a redundant <span> element);

  * And <q> has a cite attribute, so that you can include the URL for 
    the source of the quote.

-- 
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 23 days, 11:06.]

                            CSS to HTML Compiler
           http://tobyinkster.co.uk/blog/2008/01/22/css-compile/
date: Wed, 23 Jan 2008 00:05:29 +0000   author:   Toby A Inkster

Re: <q>   
Toby A Inkster  wrote:

> > "Does the job"
> 
> “Even better!” Or if you're using UTF-8, you don't need to use
> entities at all, just include the quote marks in the document directly
> "like this".

None of that's any good - that's just giving up on really useful markup.

> When <q> works though, it's far more useful than boring inline quote marks:
> 
>   * It should automatically take into account the language of the 
>     document -- for example the French quote «like this»;
>
>   * Nested <q> elements can be detected in CSS, and the quote mark
>     changed, so, say the outer set of quotes used "doubles", but the 
>     inner 'singles';
> 
>   * You can style the <q> element with CSS (e.g. italics, different
>     colour, etc) without having to add a redundant <span> element);
> 
>   * And <q> has a cite attribute, so that you can include the URL for
>     the source of the quote.

and:

*       Quotes can be flagged as such by browsers, assistive software, 
        and content indexers

So is there any way that <q> can be made usable with the bloody IE?
Otherwise, my chances of getting anyone else to use it are nil...

Daniele
date: Wed, 23 Jan 2008 08:13:52 +0000   author:   (D.M. Procida)

Re: <q>   
D.M. Procida wrote:

> So is there any way that <q> can be made usable with the bloody IE?

Yes -- Javascript. Unlike <abbr> which (until IE 7) Internet Explorer 
truly did nothing with, <q> is at least parsed and added to the DOM tree. 
You ought to be able to do something like this in Javascript:

	if (document.all && navigator.userAgent.indexOf("Opera")<0)
	{
		var $q_elements = document.getElementsByTagName('Q');
		for (var $i=0; $q_elements[$i]; $i++)
		{
			$q = $q_elements[$i];
			$q.innerHTML = '“' + $q.innerHTML + '”';
		}
	}

Of course, then there's the question of what to do with IE users with
Javascript disabled. How about making things italic for them?

	<!--[if IE]>
	<style type="text/css">q{font-style:italic}</style>
	<![end if]-->
	<script type="text/javascript">
	if (document.all && navigator.userAgent.indexOf("Opera")<0)
	{
		var $q_elements = document.getElementsByTagName('Q');
		for (var $i=0; $q_elements[$i]; $i++)
		{
			$q = $q_elements[$i];
			$q.innerHTML = '“' + $q.innerHTML + '”';
			$q.style.fontStyle = 'inherit';
		}
	}
	</script>

-- 
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 23 days, 20:24.]

                            CSS to HTML Compiler
           http://tobyinkster.co.uk/blog/2008/01/22/css-compile/
date: Wed, 23 Jan 2008 09:23:02 +0000   author:   Toby A Inkster

Re: <q>   
Toby A Inkster  wrote:

> > So is there any way that <q> can be made usable with the bloody IE?
> 
> Yes -- Javascript. Unlike <abbr> which (until IE 7) Internet Explorer
> truly did nothing with, <q> is at least parsed and added to the DOM tree.
> You ought to be able to do something like this in Javascript:

Thanks, that's great.

Daniele
date: Wed, 23 Jan 2008 10:38:17 +0000   author:   (D.M. Procida)

Re: <q>   
On Wed, 23 Jan 2008, Toby A Inkster wrote:

> When <q> works though, it's far more useful than boring inline quote marks:
>
>   * It should automatically take into account the language of the
>     document -- for example the French quote «like this»;

  « ou mieux comme ça »
So I think the quotation marks (like any punctuation) should be
left to the taste of the author and not to the arbitrariness
of a program.

Likewise we don't write

  <question>Qué será</question>

and expect the browser to find out which question marks to use;
but we write

  ¿Qué será?

instead.

-- 
In memoriam Alan J. Flavell
http://groups.google.co.uk/groups/search?q=author:Alan.J.Flavell
date: Wed, 23 Jan 2008 16:10:07 +0100   author:   Andreas Prilop

Re: <q>   
In message
<1ib4l62.10m4enn5x7tajN%real-not-anti-spam-address@apple-juice.co.uk>,
D.M. Procida  writes

>Internet Explorer

>How rubbish is that?

I've removed the surplus verbiage from your post, HTH.

-- 
Andy Mabbett
            *  Say "NO!" to compulsory ID Cards:  <http://www.no2id.net/>
            *  Free Our Data:  <http://www.freeourdata.org.uk>
            *  Are you using Microformats, yet: <http://microformats.org/> ?
date: Wed, 23 Jan 2008 22:20:54 +0000   author:   Andy Mabbett

Re: <q>   
Toby A Inkster  wrote:

> > So is there any way that <q> can be made usable with the bloody IE?
> 
> Yes -- Javascript. Unlike <abbr> which (until IE 7) Internet Explorer
> truly did nothing with, <q> is at least parsed and added to the DOM tree.
> You ought to be able to do something like this in Javascript:
> 
>       if (document.all && navigator.userAgent.indexOf("Opera")<0)
>       {
>               var $q_elements = document.getElementsByTagName('Q');
>               for (var $i=0; $q_elements[$i]; $i++)
>               {
>                       $q = $q_elements[$i];
>                       $q.innerHTML = '“' + $q.innerHTML + '”';
>               }
>       }

Thanks, though I can't get that to work.

Why are we checking for Opera in the first line? However, even if I
remove the if { }, it still doesn't work.

Thanks,

Daniele
date: Wed, 6 Feb 2008 10:28:13 +0000   author:   (D.M. Procida)

Re: <q>   
D.M. Procida wrote:

> Thanks, though I can't get that to work.

Here's an example page using it:
http://examples.tobyinkster.co.uk/q-elements

> Why are we checking for Opera in the first line? However, even if I
> remove the if { }, it still doesn't work.

"document.all" is a proprietary DOM extension only implemented by IE, so 
"if (document.all)" was a fairly good way of detecting it. However, the 
Opera developers (circa v7.5 IIRC) found that a lot of web sites were 
blocking Opera using that Javascript technique, so they implemented a 
document.all stub -- it can't be used for anything useful like IE's 
document.all can, its sole purpose is to work around this Javascript 
detection.

That's why we do:

	if (document.all && navigator.userAgent.indexOf("Opera")<0)

which checks two things:

	1. Does document.all exist; and
	2. Does the browser not identify itself as Opera.

Thus we fairly reliably detect Internet Explorer. 

-- 
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 9 days, 17:00.]

                       The Great IE8 Meta Tag Debacle
          http://tobyinkster.co.uk/blog/2008/02/06/ie-8-meta-tag/
date: Fri, 8 Feb 2008 10:49:25 +0000   author:   Toby A Inkster

Google
 
Web myreader.co.uk


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us