• Welcome to Valhalla Legends Archive.
 

Re:HTML lesson

Started by Adron, April 29, 2004, 07:22 PM

Previous topic - Next topic

Adron

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.

MyndFyre

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Grok

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).

Adron

But apparently XML can't be extended to support attribute values without quotes :P

MyndFyre

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.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Grok

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.

Adron

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 ;)

Grok

Use VS.NET 2003, and Visual Assist.  Your quotes are taken care of for you.

Yoni

<bleh slashgreaterthan="/>" />

And the ( ) are required in if to make it inherently cooler than basic/pascal.

Adron

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.

MyndFyre

Quote from: Yoni on April 30, 2004, 10:55 AM
<bleh slashgreaterthan="/>" />
Bad idea: xml doesn't allow > token values.  Use &lt; .

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!
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Yoni

#11
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 &lt; .
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? :)

K

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 &lt; .

Looks like &gt; to me  :P

MyndFyre

Quote from: K on April 30, 2004, 11:29 PM
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 &lt; .

Looks like &gt; to me  :P

yeah yeah yeah :P
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Adron

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;