Quote from: Myndfyre on April 28, 2004, 05:13 PM
3.) Ensure that all values have assigned values that are in quotes. For example, the iframe tag allows you to define the contant "allowTransparency", making the frame transparent. Proper setting would be:
<iframe allowTransparency="true" />
where it could be without XHTML:
<iframe allowTransparency />
Are values required to always be in quotes now? Previously, <iframe allowTransparency=true /> might've worked too.
Quote from: Adron on April 29, 2004, 07:22 PM
Quote from: Myndfyre on April 28, 2004, 05:13 PM
3.) Ensure that all values have assigned values that are in quotes. For example, the iframe tag allows you to define the contant "allowTransparency", making the frame transparent. Proper setting would be:
<iframe allowTransparency="true" />
where it could be without XHTML:
<iframe allowTransparency />
Are values required to always be in quotes now? Previously, <iframe allowTransparency=true /> might've worked too.
XHTML requires attribute values to be in single or double quotes, because that is a requirement of XML. XHTML is a specific merger of XML and HTML -- essentially HTML with the rules of XML.
Quote from: Myndfyre on April 30, 2004, 12:24 AMXHTML requires attribute values to be in single or double quotes, because that is a requirement of XML. XHTML is a specific merger of XML and HTML -- essentially HTML with the rules of XML.
HTML was "rewritten" in XML, making HTML 4.01 "an application of" XML. XML being an extensible markup language, HTML and XHTML are two of those extensions (among hundreds).
But apparently XML can't be extended to support attribute values without quotes :P
Quote from: Adron on April 30, 2004, 08:08 AM
But apparently XML can't be extended to support attribute values without quotes :P
Nope. XML is very strict, but the advantage is that parsers in all kinds of languages are easy to implement.
Quote from: Adron on April 30, 2004, 08:08 AM
But apparently XML can't be extended to support attribute values without quotes :P
hehe ... no, you'd have to redefine XML to allow that, which is different from extending it. You're saying why can't you extend C++ to not need semicolons.
Quote from: Grok on April 30, 2004, 08:51 AM
Quote from: Adron on April 30, 2004, 08:08 AM
But apparently XML can't be extended to support attribute values without quotes :P
hehe ... no, you'd have to redefine XML to allow that, which is different from extending it. You're saying why can't you extend C++ to not need semicolons.
Hmm, maybe. Or make it not to need ( ) with if. I don't think it would become ambiguous if you removed those, or made them optional?
About the quotes with values, I've just tried to stop writing those for attribute values to save space. And now I need to start writing them again - eww ;)
Use VS.NET 2003, and Visual Assist. Your quotes are taken care of for you.
<bleh slashgreaterthan="/>" />
And the ( ) are required in if to make it inherently cooler than basic/pascal.
Quote from: Grok on April 30, 2004, 10:19 AM
Use VS.NET 2003, and Visual Assist. Your quotes are taken care of for you.
That's a rather heavy-weight html editor. I'd prefer being able to code without quotes in notepad ;)
Actually, sometimes visual assist annoys me. I suppose you have to learn to get along with it, so it doesn't keep undoing things you do.
Quote from: Yoni on April 30, 2004, 10:55 AM
<bleh slashgreaterthan="/>" />
Bad idea: xml doesn't allow > token values. Use < .
Quote from: Yoni on April 30, 2004, 10:55 AM
And the ( ) are required in if to make it inherently cooler than basic/pascal.
int i = 3;
if i <<= 2 == 81 i -= 3;
yuck!
Quote from: Myndfyre on April 30, 2004, 12:33 PM
Quote from: Yoni on April 30, 2004, 10:55 AM
<bleh slashgreaterthan="/>" />
Bad idea: xml doesn't allow > token values. Use < .
Oh yeah, good call.
Quote from: Myndfyre on April 30, 2004, 12:33 PM
int i = 3;
if i <<= 2 == 81 i -= 3;
Hmm, the () could be given up by requiring { } to always appear in the if body. So you have to make some kind of compromise... It's better the way it is now anyway.
Edit: Hmm, how can you left-shift by 2 bits and get a result that isn't divisible by 4? :)
Quote from: Myndfyre on April 30, 2004, 12:33 PM
Quote from: Yoni on April 30, 2004, 10:55 AM
<bleh slashgreaterthan="/>" />
Bad idea: xml doesn't allow > token values. Use < .
Looks like > to me :P
Quote from: Yoni on April 30, 2004, 04:32 PM
Quote from: Myndfyre on April 30, 2004, 12:33 PM
int i = 3;
if i <<= 2 == 81 i -= 3;
Hmm, the () could be given up by requiring { } to always appear in the if body. So you have to make some kind of compromise... It's better the way it is now anyway.
Actually, this code still doesn't look ambiguous. "81 i" isn't a valid expression, so it has to be where the conditionally executed statement starts. And of course you'd still have to use proper formatting of your code. You can write easy to read code today or you can write hard to read code.
int i = 3;
if i <<= 2 == 81
i -= 3;
Quote from: Myndfyre on April 29, 2004, 04:58 PM
You know, I recently created a website where I set the DTD to XHTML 1.0 strict. I don't know if ASP.NET is honoring that, but it's just a side-note.
probably not. Atleast if you are doing a <form runat="server"> That will spit up the viewstate tag even if viewstate is off, which will cause your code not to be valid. Furhtermore the form will have aname attribute, and all asp.net elements will have a name attribute.
What do you mean it will split up the viewstate tag? When you view it in Notepad, the widest a string can be is 1024 characters. It's still on the same line, *in reality* in the parser, just not in Notepad.
I mean when you turn viewstate off in the web.config or at the top of the page, the tag will still be there, it will just only have a few characters there simply because a form is running at the server. It does not matter if its on one line or a bajillion, I know its in one line because I do not have mozilla set to wrap lines when I view the source, but the viewstate tag is will make the code invalid because it has the name attribute (name="__VIEWSTATE" ). Plus a form running that the server will have an invalid name attribute, just having the name there is bad, but the fact that the id, unless you change it has two __ in it too will also cause an error in the validator.
if i * i == 5
Took me a minute to think of that one. Can be extended to make sense, but it's already ambiguous as it is.
Ah, good one, it needs that separator for operators that can be either unary or binary.