• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

nesting quotes in tag attributes

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.

Are there a set of concrete rules (i.e. in the specifications or somewhere) for when tag attributes allowed to nest double quotes within double quotes?

For example, this does *NOT* work...



...I must change either the outer or the inner set of quotes to single quotes for it to work. In other words, no nesting of double quotes is allowed.

However, this DOES work...



...nesting of double quotes IS allowed here.

So, what are the rules? It doesn't seem to me that the tag author has any control over it. So it must be a container specification, right?

Thanks!
John
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by JohnWilliam Fitz:





confusing?



...nesting of double quotes IS allowed here.

So, what are the rules? It doesn't seem to me that the tag author has any control over it. So it must be a container specification, right?



i dont think so. see it is normal that how compiler understand that where is the " starting and ending ?
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

confusing?



Sorry, the tag should have read...




see it is normal that how compiler understand that where is the " starting and ending ?



But the container's behaviour is different in the two examples. In the first example, the container sees the second double quote in the attribute value as closing the string and then assumes what comes next is the next attribute. So I must make the inner quotes single quotes for it to be interpreted correctly.

But in the second example I gave, why doesn't the compiler or container see the second double quote as closing the string the way it did in the first example? This behaviour is documented somewhere, no?

John
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry. The smiley should be a colon followed by a p. That is truly frustrating that even when I wrap a block in [code] tags it still converts characters to smileys.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can still use HTML Special Entities for the double quotes around member.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by JohnWilliam Fitz:
That is truly frustrating that even when I wrap a block in [code] tags it still converts characters to smileys.



in this case,when you post your code please disable the smilies option which is below your UBB code option
 
JohnWilliam Fitz
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

You can still use HTML Special Entities for the double quotes around member.



Thanks Christopher. I will read that.

Will the exam try to test my knowledge of what situations allow nested double quotes in tag attribute values? I feel shaky on what's legit and not.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Will the exam try to test my knowledge of what situations allow nested double quotes in tag attribute values?


No, I don't think so.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic