QA


Q&A

Q.

How exactly are parsed entities merged with document content?

A.

You can think of the merger of parsed entities with document content as a search-and-replace operation. For example, if you had a certain word in a word processor document that you wanted to replace with a phrase, you would perform a search-and-replace, which replaces each occurrence of the word with the phrase. Parsed entities work in a very similar manner, except that the word is the entity reference and the phrase is the entity data; an XML processor carries out the search-and-replace process.

Q.

Why is it necessary to use notations for familiar binary data types such as GIF and JPEG images?

A.

GIF and JPEG images are "familiar" only within the context of a web browser, which is inherently associated with HTML. XML is a much broader technology that doesn't necessarily have a direct tie with a web browser. Therefore, no partiality is given to web data types over any other data types. XML's approach is to require notations for all binary entities.

Q.

Why would I ever want to place text in an external entity?

A.

Although any text could be included directly in an XML document as an internal entity, any large pieces of text that are shared among several documents would benefit greatly from being placed in external files. The storage of these entities would then be isolated in one place, and they could simply be referenced by each document.




Sams Teach Yourself XML in 24 Hours
Sams Teach Yourself XML in 24 Hours, Complete Starter Kit (3rd Edition)
ISBN: 067232797X
EAN: 2147483647
Year: 2005
Pages: 266

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net