XML Quiz

Roger L Costello <[email protected]>
Newsgroups gmane.text.xml.devel
Message-ID <SA9PR09MB59521B8A604EAAFCFE442BABC80F9@SA9PR09MB5952.namprd09.prod.outlook.com>
Hi Folks,

In a previous post I asked: 

What stage should the entity &amp; be converted to &?
(a)	Lexical analysis stage
(b)	Syntax analysis stage
(c)	Semantic analysis stage

One person suggested that entities can be converted even before the lexical analysis stage, in a preprocessor stage -- analogous to the way a C preprocessor replaces macro definitions.

Question: Are there any problems with converting all entities in a preprocessor stage?

See answer below .........














Answer: If you were to convert all entities, then that would result in converting this:

	<![CDATA[&amp;]]>

to this:

	<![CDATA[&]]>

And that would be incorrect.

Thanks to Matt Timmermans for pointing this out to me.

/Roger

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: [email protected]
subscribe: [email protected]
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.