<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Grammar Question</title>
	<atom:link href="http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/feed/" rel="self" type="application/rss+xml" />
	<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/</link>
	<description>Things that Eric A. Meyer, CSS expert, writes about on his personal Web site; it&#039;s largely Web standards and Web technology, but also various bits of culture, politics, personal observations, and other miscellaneous stuff</description>
	<lastBuildDate>Tue, 18 Jun 2013 15:30:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Mary</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-14281</link>
		<dc:creator>Mary</dc:creator>
		<pubDate>Fri, 03 Feb 2006 14:43:20 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-14281</guid>
		<description><![CDATA[Is the title of a play underlined or in quotes?  Thank you for your assistance.]]></description>
		<content:encoded><![CDATA[<p>Is the title of a play underlined or in quotes?  Thank you for your assistance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-967</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sun, 19 Sep 2004 12:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-967</guid>
		<description><![CDATA[&lt;p&gt;
Okay, it&#039;s much more clear now&#8212;thanks to all.
&lt;/p&gt;
&lt;p&gt;
J.B.: yep, you&#039;re right, that&#039;s more in line with what I meant to say, although I realized later that my formulation didn&#039;t permit single-quote marks, and in turn neither did yours, but you were a lot closer to being correct than I was.  As for the outsider-hostile character encoding, I figure that anyone who needs to encode markup will know how to do it; nobody else would really need to know anyway.  One of these days I&#039;ll probably add a preview function, but there are a lot of other things sitting much higher on my priority list.  With any luck, WordPress will get a comment-preview function built in, and that will be that.
&lt;/p&gt;]]></description>
		<content:encoded><![CDATA[<p>
Okay, it&#8217;s much more clear now&mdash;thanks to all.
</p>
<p>
J.B.: yep, you&#8217;re right, that&#8217;s more in line with what I meant to say, although I realized later that my formulation didn&#8217;t permit single-quote marks, and in turn neither did yours, but you were a lot closer to being correct than I was.  As for the outsider-hostile character encoding, I figure that anyone who needs to encode markup will know how to do it; nobody else would really need to know anyway.  One of these days I&#8217;ll probably add a preview function, but there are a lot of other things sitting much higher on my priority list.  With any luck, WordPress will get a comment-preview function built in, and that will be that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J.B. Nicholson-Owens</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-966</link>
		<dc:creator>J.B. Nicholson-Owens</dc:creator>
		<pubDate>Sun, 19 Sep 2004 07:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-966</guid>
		<description><![CDATA[By the way, I don&#039;t think &quot;[ &#039;&quot;&#039;? IDENT &#039;&quot;&#039;? ]&quot; means what you think it means, Eric.  I think it means that EACH quote is optional, not BOTH quotes TAKEN TOGETHER.  The subtle difference is illustrated here; with your syntax all of the following 4 are legal:

 &quot;hello&quot;  (quotes on both ends -- you thought of this)
 &quot;hello   (quote on left only)
  hello&quot;  (quote on right only)
  hello   (no quotes at all -- you thought of this)

I think what you were going for is

  [ &#039;&quot;&#039; IDENT &#039;&quot;&#039; &#124; IDENT ]

which indicates a choice: quotes-on or quotes-off, you supply both quotes or no quotes.  No onesies.

Finally, telling people to &quot;Remember to encode character entities if you&#039;re posting markup examples!&quot; without a preview button is rather &quot;hostile-to-outsiders&quot;, no?]]></description>
		<content:encoded><![CDATA[<p>By the way, I don&#8217;t think &#8220;[ '"'? IDENT '"'? ]&#8221; means what you think it means, Eric.  I think it means that EACH quote is optional, not BOTH quotes TAKEN TOGETHER.  The subtle difference is illustrated here; with your syntax all of the following 4 are legal:</p>
<p> &#8220;hello&#8221;  (quotes on both ends &#8212; you thought of this)<br />
 &#8220;hello   (quote on left only)<br />
  hello&#8221;  (quote on right only)<br />
  hello   (no quotes at all &#8212; you thought of this)</p>
<p>I think what you were going for is</p>
<p>  [ '"' IDENT '"' | IDENT ]</p>
<p>which indicates a choice: quotes-on or quotes-off, you supply both quotes or no quotes.  No onesies.</p>
<p>Finally, telling people to &#8220;Remember to encode character entities if you&#8217;re posting markup examples!&#8221; without a preview button is rather &#8220;hostile-to-outsiders&#8221;, no?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jf</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-964</link>
		<dc:creator>jf</dc:creator>
		<pubDate>Sun, 19 Sep 2004 02:24:57 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-964</guid>
		<description><![CDATA[String vs. ident: The choice between string and ident allows you to skip the quotes if it is a single, simple word (no space, punctuation or non-ascii). So 
&lt;code&gt;class=abc&lt;/code&gt; and &lt;code&gt;class=&quot;abc&quot;&lt;/code&gt; are both legal, while &lt;code&gt;class=&quot;to be&quot;&lt;/code&gt; must be quoted. The historical reason is proably that html uses these rules. (Unlike xml/xhtml, where quotes/strings are always mandatory.) 

Strings do allow all characters, both ascii and non-ascii, with the newline/control char/quote exceptions. 
&quot;string doesn&#039;t allow non-ascii characters&quot; refers to &quot;the flaw in the reasoning&quot;, not to strings.]]></description>
		<content:encoded><![CDATA[<p>String vs. ident: The choice between string and ident allows you to skip the quotes if it is a single, simple word (no space, punctuation or non-ascii). So<br />
<code>class=abc</code> and <code>class="abc"</code> are both legal, while <code>class="to be"</code> must be quoted. The historical reason is proably that html uses these rules. (Unlike xml/xhtml, where quotes/strings are always mandatory.) </p>
<p>Strings do allow all characters, both ascii and non-ascii, with the newline/control char/quote exceptions.<br />
&#8220;string doesn&#8217;t allow non-ascii characters&#8221; refers to &#8220;the flaw in the reasoning&#8221;, not to strings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Baron</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-963</link>
		<dc:creator>David Baron</dc:creator>
		<pubDate>Sun, 19 Sep 2004 02:16:03 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-963</guid>
		<description><![CDATA[Er, I did write a double negative, just not in the right two places.  I meant &quot;doesn&#039;t disallow ASCII characters&quot; (well, most of them).  But I put a &quot;non-&quot; in front of &quot;ASCII&quot; instead of a &quot;dis&quot; in front of &quot;allow&quot;.

I should always read what I write to see any words out!]]></description>
		<content:encoded><![CDATA[<p>Er, I did write a double negative, just not in the right two places.  I meant &#8220;doesn&#8217;t disallow ASCII characters&#8221; (well, most of them).  But I put a &#8220;non-&#8221; in front of &#8220;ASCII&#8221; instead of a &#8220;dis&#8221; in front of &#8220;allow&#8221;.</p>
<p>I should always read what I write to see any words out!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Baron</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-962</link>
		<dc:creator>David Baron</dc:creator>
		<pubDate>Sun, 19 Sep 2004 02:14:11 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-962</guid>
		<description><![CDATA[Oops, I was trying to write a double negative and I forgot one of them.  I meant &quot;doesn&#039;t disallow&quot;.

And the reason simple STRING doesn&#039;t suffice is that we want to allow &lt;code&gt;td[align=left]&lt;/code&gt; in addition to &lt;code&gt;td[align=&quot;left&quot;]&lt;/code&gt;, as long as the attribute value is reasonably simple (i.e., an identifier).]]></description>
		<content:encoded><![CDATA[<p>Oops, I was trying to write a double negative and I forgot one of them.  I meant &#8220;doesn&#8217;t disallow&#8221;.</p>
<p>And the reason simple STRING doesn&#8217;t suffice is that we want to allow <code>td[align=left]</code> in addition to <code>td[align="left"]</code>, as long as the attribute value is reasonably simple (i.e., an identifier).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-961</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sun, 19 Sep 2004 00:32:36 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-961</guid>
		<description><![CDATA[&lt;p&gt;
The &lt;code&gt; -~&lt;/code&gt; bit pointed out by Antone seems to have been the missing key in terms of character-range.  But why, then, offer a choice of a STRING or IDENT, when it seems like a simple STRING would suffice?  I still don&#039;t get that part.  And then David said:
&lt;/p&gt;
&lt;blockquote cite=&quot;http://www.meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-959&quot;&gt;
The flaw in the reasoning in the post is, as pointed out above, that STRING doesn&#039;t allow non-ASCII characters. In fact, it allows all characters except for unescaped newlines, the type of quotation marks quoting the string (unescaped), and control characters other than TAB (i.e., all characters less than ASCII/Unicode 32 other than TAB, plus ASCII/Unicode 127).
&lt;/blockquote&gt;
&lt;p&gt;
Could you maybe translate that into English, chief?  Start with explaining how STRING can disallow non-ASCII characters while also allowing all characters besides the exceptions you listed.  Those seem very much like mutually exclusive statements.
&lt;/p&gt;]]></description>
		<content:encoded><![CDATA[<p>
The <code> -~</code> bit pointed out by Antone seems to have been the missing key in terms of character-range.  But why, then, offer a choice of a STRING or IDENT, when it seems like a simple STRING would suffice?  I still don&#8217;t get that part.  And then David said:
</p>
<blockquote cite="http://www.meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-959"><p>
The flaw in the reasoning in the post is, as pointed out above, that STRING doesn&#8217;t allow non-ASCII characters. In fact, it allows all characters except for unescaped newlines, the type of quotation marks quoting the string (unescaped), and control characters other than TAB (i.e., all characters less than ASCII/Unicode 32 other than TAB, plus ASCII/Unicode 127).
</p></blockquote>
<p>
Could you maybe translate that into English, chief?  Start with explaining how STRING can disallow non-ASCII characters while also allowing all characters besides the exceptions you listed.  Those seem very much like mutually exclusive statements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Baron</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-959</link>
		<dc:creator>David Baron</dc:creator>
		<pubDate>Sat, 18 Sep 2004 20:20:05 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-959</guid>
		<description><![CDATA[The flaw in the reasoning in the post is, as pointed out above, that STRING doesn&#039;t allow non-ASCII characters.  In fact, it allows all characters except for unescaped newlines, the type of quotation marks quoting the string (unescaped), and control characters other than TAB (i.e., all characters less than ASCII/Unicode 32 other than TAB, plus ASCII/Unicode 127).

That said, it should be possible to figure this out without looking at the grammar.  The attribute selector part certainly is possible: 5.8.1 says &quot;Attribute values must be identifiers or strings.&quot;  The definitions of identifiers and strings, though, should probably be clearer in chapter 4.]]></description>
		<content:encoded><![CDATA[<p>The flaw in the reasoning in the post is, as pointed out above, that STRING doesn&#8217;t allow non-ASCII characters.  In fact, it allows all characters except for unescaped newlines, the type of quotation marks quoting the string (unescaped), and control characters other than TAB (i.e., all characters less than ASCII/Unicode 32 other than TAB, plus ASCII/Unicode 127).</p>
<p>That said, it should be possible to figure this out without looking at the grammar.  The attribute selector part certainly is possible: 5.8.1 says &#8220;Attribute values must be identifiers or strings.&#8221;  The definitions of identifiers and strings, though, should probably be clearer in chapter 4.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurens Holst</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-958</link>
		<dc:creator>Laurens Holst</dc:creator>
		<pubDate>Sat, 18 Sep 2004 19:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-958</guid>
		<description><![CDATA[Because CSS 2.1 is more based on real-world implementations and lessons learned from CSS 2. It is the better spec (especially as far as clarity of explanations is concerned), and the one most browsers aim to implement.

~Grauw]]></description>
		<content:encoded><![CDATA[<p>Because CSS 2.1 is more based on real-world implementations and lessons learned from CSS 2. It is the better spec (especially as far as clarity of explanations is concerned), and the one most browsers aim to implement.</p>
<p>~Grauw</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim Dabell</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-957</link>
		<dc:creator>Jim Dabell</dc:creator>
		<pubDate>Sat, 18 Sep 2004 17:27:02 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-957</guid>
		<description><![CDATA[Is there any particular reason you are quoting from CSS 2.1 and not CSS 2?  The definition of attr is the same, and the 2.1 specification states:

&lt;blockquote&gt;&quot;Publication as a Candidate Recommendation does not imply endorsement by the W3C Membership. It is inappropriate to cite this document as other than work in progress.&quot;&lt;/blockquote&gt;]]></description>
		<content:encoded><![CDATA[<p>Is there any particular reason you are quoting from CSS 2.1 and not CSS 2?  The definition of attr is the same, and the 2.1 specification states:</p>
<blockquote><p>&#8220;Publication as a Candidate Recommendation does not imply endorsement by the W3C Membership. It is inappropriate to cite this document as other than work in progress.&#8221;</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uri Bernstein</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-956</link>
		<dc:creator>Uri Bernstein</dc:creator>
		<pubDate>Sat, 18 Sep 2004 16:09:41 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-956</guid>
		<description><![CDATA[Alway one step behind you :-)
I should refresh more often.]]></description>
		<content:encoded><![CDATA[<p>Alway one step behind you :-)<br />
I should refresh more often.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antone Roundy</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-955</link>
		<dc:creator>Antone Roundy</dc:creator>
		<pubDate>Sat, 18 Sep 2004 16:09:01 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-955</guid>
		<description><![CDATA[I don&#039;t think &#039;div[class=this is a test] {color: orange;}&#039;, without quotes, is legal.

attrib : &#039;[&#039; S* IDENT S* [ [ &#039;=&#039; &#124; INCLUDES &#124; DASHMATCH ] S* [ IDENT &#124; STRING ] S* ]? &#039;]&#039;

After the &#039;=&#039;, you can have 0 or more whitespace characters followed by exactly one ident or string  followed by 0 or more whitespace characters (notice that there&#039;s no &quot;*&quot;, &quot;+&quot; or anything after [ IDENT &#124; STRING ], so you have to have exactly one of those). If you put quotes around &quot;this is a test&quot;, you have one string. Without the quotes, you have 4 identifiers.]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t think &#8216;div[class=this is a test] {color: orange;}&#8217;, without quotes, is legal.</p>
<p>attrib : &#8216;[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S* [ IDENT | STRING ] S* ]? &#8216;]&#8217;</p>
<p>After the &#8216;=&#8217;, you can have 0 or more whitespace characters followed by exactly one ident or string  followed by 0 or more whitespace characters (notice that there&#8217;s no &#8220;*&#8221;, &#8220;+&#8221; or anything after [ IDENT | STRING ], so you have to have exactly one of those). If you put quotes around &#8220;this is a test&#8221;, you have one string. Without the quotes, you have 4 identifiers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uri Bernstein</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-954</link>
		<dc:creator>Uri Bernstein</dc:creator>
		<pubDate>Sat, 18 Sep 2004 16:08:31 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-954</guid>
		<description><![CDATA[Antone - I&#039;m afraid you took the wrong turn in step 3 - you followed the rule for escaped characters (which consist of a backslash followed by something).

(the other reason I&#039;m posting this comment is to correct my e-mail address, which I mis-typed last time).]]></description>
		<content:encoded><![CDATA[<p>Antone &#8211; I&#8217;m afraid you took the wrong turn in step 3 &#8211; you followed the rule for escaped characters (which consist of a backslash followed by something).</p>
<p>(the other reason I&#8217;m posting this comment is to correct my e-mail address, which I mis-typed last time).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antone Roundy</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-953</link>
		<dc:creator>Antone Roundy</dc:creator>
		<pubDate>Sat, 18 Sep 2004 15:57:32 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-953</guid>
		<description><![CDATA[Oops! Correction to what I wrote above. &quot;escape&quot; requires a backslash to precede it. The way you get the useful characters in there is from string1 (or string2) where is lists (-~ in the jumble of symbols. In this case, &quot;-&quot; denotes a range of characters, not a literal minus sign. The range (-~ includes almost everything in &lt;space&gt;-~, just not ! &quot; # $ % &amp; and &#039;, all of which (except the quote marks) are listed literally.]]></description>
		<content:encoded><![CDATA[<p>Oops! Correction to what I wrote above. &#8220;escape&#8221; requires a backslash to precede it. The way you get the useful characters in there is from string1 (or string2) where is lists (-~ in the jumble of symbols. In this case, &#8220;-&#8221; denotes a range of characters, not a literal minus sign. The range (-~ includes almost everything in &lt;space&gt;-~, just not ! &#8221; # $ % &#038; and &#8216;, all of which (except the quote marks) are listed literally.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uri Bernstein</title>
		<link>http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-952</link>
		<dc:creator>Uri Bernstein</dc:creator>
		<pubDate>Sat, 18 Sep 2004 15:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://meyerweb.com/eric/thoughts/2004/09/18/grammar-question/#comment-952</guid>
		<description><![CDATA[Hi Eric,

I hope I can help here a bit and perhaps thus pay back for some of the help I got from your books and columns.

STRING, in fact *does* include the ASCII range (or most of it). The key to understanding this is that little &quot;-&quot; hiding there, near the end of &lt;code&gt;[\t !#$%&amp;(&lt;b&gt;-&lt;/b&gt;~]&lt;/code&gt;, in the definition of STRING. What it means is &quot;any character whose code is &lt;i&gt;between&lt;/i&gt; that of &#039;(&#039; (which is hex 28) and &#039;~&#039; (which is hex 7E)&quot;. This includes all the digits, lower and upper case letters, and some more.

So if your string qualifies as an IDENT (roughly mening that it starts with a letter or underscore, and does not contain unescaped spaces or punctuation), you don&#039;t have to quote it. Any other string, you do have to quote.
Note that every IDENT also qualifies as a string (when quoted). So you&#039;re always allowed to quote, if you feel like it.

At least that&#039;s the way I understand it.]]></description>
		<content:encoded><![CDATA[<p>Hi Eric,</p>
<p>I hope I can help here a bit and perhaps thus pay back for some of the help I got from your books and columns.</p>
<p>STRING, in fact *does* include the ASCII range (or most of it). The key to understanding this is that little &#8220;-&#8221; hiding there, near the end of <code>[\t !#$%&#038;(<b>-</b>~]</code>, in the definition of STRING. What it means is &#8220;any character whose code is <i>between</i> that of &#8216;(&#8216; (which is hex 28) and &#8216;~&#8217; (which is hex 7E)&#8221;. This includes all the digits, lower and upper case letters, and some more.</p>
<p>So if your string qualifies as an IDENT (roughly mening that it starts with a letter or underscore, and does not contain unescaped spaces or punctuation), you don&#8217;t have to quote it. Any other string, you do have to quote.<br />
Note that every IDENT also qualifies as a string (when quoted). So you&#8217;re always allowed to quote, if you feel like it.</p>
<p>At least that&#8217;s the way I understand it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->