From: Robert Cummings on 6 Oct 2010 09:10 On 10-10-06 09:06 AM, Peter Lind wrote: > On 6 October 2010 15:03, Robert Cummings<robert(a)interjinn.com> wrote: >> On 10-10-06 08:52 AM, Peter Lind wrote: >>> >>> Where exactly do you get the part about double quotes from? Can't seem >>> to locate it in the any of the relevant specs (xhtml or xml). Also, >>> never seen an xml or xhtml validator choke on single quotes. >> >> http://www.w3.org/TR/xhtml1/#h-4.2 >> > > I quote: "4.2. Element and attribute names must be in lower case. > XHTML documents must use lower case for all HTML element and attribute > names. This difference is necessary because XML is case-sensitive e.g. > <li> and<LI> are different tags." > > Where in that do you see anything about double quotes? > > Maybe you're thinking of http://www.w3.org/TR/xhtml1/#h-4.4 - but that > just states quoted, nothing about double quotes vs. single quotes. Nope, sorry, I had lowercase on the brain. In XHTML you can use single or double quotes :) *gulps down more coffee* Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.
From: Andy McKenzie on 6 Oct 2010 09:21 On Wed, Oct 6, 2010 at 9:03 AM, Robert Cummings <robert(a)interjinn.com> wrote: > On 10-10-06 08:52 AM, Peter Lind wrote: >> >> Where exactly do you get the part about double quotes from? Can't seem >> to locate it in the any of the relevant specs (xhtml or xml). Also, >> never seen an xml or xhtml validator choke on single quotes. > > http://www.w3.org/TR/xhtml1/#h-4.2 > > Cheers, > Rob. I don't see that it explicitly states a requirement for double quotes there -- it certainly implies it, but the text never says anything about either double-quotes being required or single-quotes being disallowed. Full text: "All attribute values must be quoted, even those which appear to be numeric." Is there a statement somewhere in the document that says quotes are always double-quotes? -Alex
From: Andy McKenzie on 6 Oct 2010 09:31 On Wed, Oct 6, 2010 at 9:25 AM, Peter Lind <peter.e.lind(a)gmail.com> wrote: > On 6 October 2010 15:21, Andy McKenzie <amckenzie4(a)gmail.com> wrote: >> On Wed, Oct 6, 2010 at 9:03 AM, Robert Cummings <robert(a)interjinn.com> wrote: >>> On 10-10-06 08:52 AM, Peter Lind wrote: >>>> >>>> Where exactly do you get the part about double quotes from? Can't seem >>>> to locate it in the any of the relevant specs (xhtml or xml). Also, >>>> never seen an xml or xhtml validator choke on single quotes. >>> >>> http://www.w3.org/TR/xhtml1/#h-4.2 >>> >>> Cheers, >>> Rob. >> >> I don't see that it explicitly states a requirement for double quotes >> there -- it certainly implies it, but the text never says anything >> about either double-quotes being required or single-quotes being >> disallowed. >> >> Full text: "All attribute values must be quoted, even those which >> appear to be numeric." >> >> Is there a statement somewhere in the document that says quotes are >> always double-quotes? > > No, there isn't. Both single quotes and double quotes are allowed for > attributes in both XML and XHTML. What makes you think it's implied > that double quotes are the only allowed form of quotes? > > Regards > Peter > Double quotes are the only example given: in most documentation if there are two allowed forms, there are two examples, or at least a note in the text. I haven't read enough of this particular document to know if they follow that form, but I've certainly seen it a lot of places. -Alex
From: Peter Lind on 6 Oct 2010 09:43 On 6 October 2010 15:31, Andy McKenzie <amckenzie4(a)gmail.com> wrote: *snip* > Double quotes are the only example given: Â in most documentation if > there are two allowed forms, there are two examples, or at least a > note in the text. Â I haven't read enough of this particular document > to know if they follow that form, but I've certainly seen it a lot of > places. > > -Alex > Xhtml documents are xml documents and thus must follow the specs for XML. Specifically, the following: http://www.w3.org/TR/2008/REC-xml-20081126/#NT-AttValue Regards Peter -- <hype> WWW: plphp.dk / plind.dk LinkedIn: plind BeWelcome/Couchsurfing: Fake51 Twitter: kafe15 </hype>
From: Steve Staples on 6 Oct 2010 10:00 On Wed, 2010-10-06 at 15:43 +0200, Peter Lind wrote: > On 6 October 2010 15:31, Andy McKenzie <amckenzie4(a)gmail.com> wrote: > > *snip* > > > Double quotes are the only example given: in most documentation if > > there are two allowed forms, there are two examples, or at least a > > note in the text. I haven't read enough of this particular document > > to know if they follow that form, but I've certainly seen it a lot of > > places. > > > > -Alex > > > > Xhtml documents are xml documents and thus must follow the specs for > XML. Specifically, the following: > http://www.w3.org/TR/2008/REC-xml-20081126/#NT-AttValue > > Regards > Peter Wow... I didn't mean to spark up a debate/battle about the use of " vs ' or anything... I was just under the impression that the use of {} when referring to a variable inside the "" was "proper", and was the way it "should" be done, not that it "HAD" to be done that way... even back in 92 when I started HTML programming, I was taught that elements and attributes should be in lower case, attributes should be within ""... and when i started using PHP, I would always use "" and when referencing a variable, "text ". $var ." more text" was the way I did it, and then i read somewhere that variable inside "" to avoid any potential issues, should be enclosed with {}. Granted, it works without using them (for 99% of things), but as my personal preference, that is the way i do it, and was under the impression that it should be used in that manner, to avoid deprecation. Now, to end my run on and on and on sentence... it was just something I have always done, just like the code formatting i follow (which i wont get into, cuz that will prolly start another huge long thread too :P) -- As for the OP's question, I don't think it really matters which one you use, it would boil down to which one makes more sense to you when you read it later and try to figure out why you did it the way you did :) (documentation is essential for deciphering code the next day) If you're worried about I/O processes, and have to constrain yourself to using 1 or 2 more I/O processes, then you should do a lot of benchmarking to determine for yourself which is more efficient on your hardware. again, just my $0.02. Steve.
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 5 Prev: i wanna join Next: Variable (Class instantiation) collision |