|
|
A caution on Spotlight searches and ampersands
FYI: My wife's a highly talented Web designer, and she uses the numeric codes in preference to the mnemonic versions for a very good reason, which for the life of me I cannot remember just now.
A caution on Spotlight searches and ampersands
OK, here's the scoop...
Unless your DTD allows for named entity codes (like —) then you have to use the numeric entities. Otherwise, they aren't defined. XML only requires five named entities (in order to "escape" the special characters in XML). Those named entities are ' (apostrophe, or single quote), " (double-quote), & (ampersand), < (less than), and > (greater than). Those entities are "inherited" by all XML-based languages. HTML and XHTML, on the other hand, have nearly 250 named entities defined. The names are easy to remember once you see their "description" in English (— is an em-dash, for example). You can see all those useful HTML/XHTML named entities in a handy list at Wikipedia: http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references When working with various XML or SGML-based markup languages, the numeric entities are universal. THAT is the reason why some people use numeric entities exclusively--they are guaranteed to work. The numbers in the entities refer to the 16-bit UNICODE value for the character. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.06 seconds |
|