News for hackers. Stuff that matters.
Re:CSS4 Preview – Selectors by bps4484 on Wednesday March 07, 2012 @01:27PM (#3676503)
could you elaborate on A? What's the problem of using "<" in an enclosing html document that wouldn't also be a problem for ">", which already exists?
Re:CSS4 Preview – Selectors by saurik on Wednesday March 07, 2012 @03:00PM (#3676871)
I'm confused by your comment: ">" only has special meaning in the context of a tag, or after "]]"; "<" has special meaning meaning anywhere in a document you are not inside of a tag.
Re:CSS4 Preview – Selectors by bps4484 on Friday March 09, 2012 @02:35PM (#3685578)
that actually answered my question. I don't know the html spec that well so I didn't know if both "<" and ">" were reserved characters. From what I understand of what you're saying, it's only when ">" comes after a "<" that is has special meaning.
Re:CSS4 Preview – Selectors by saurik on Friday March 09, 2012 @02:53PM (#3685637)
Correct. From the XML specification (which is easier to obtain than SGML, more prescriptive than HTML4, and capable of being understood by humans in a way the HTML5 "document IE" specification is unable to support), 2.4 "Character Data and Markup" (note the "may" and "MUST"):

The ampersand character (&) and the left angle bracket (<) MUST NOT appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they MUST be escaped using either numeric character references or the strings " &amp; " and " &lt; " respectively.

The right angle bracket (>) may be represented using the string " &gt; ", and MUST, for compatibility, be escaped using either " &gt; " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section.