Lists Home |
Date Index |
- From: "James Tauber" <firstname.lastname@example.org>
- To: "Peter Jones" <email@example.com>, "'XML-DEV'" <firstname.lastname@example.org>
- Date: Fri, 28 Aug 1998 21:11:24 +0800
From: Peter Jones <email@example.com>
>Can anyone tell me why productions  of the XML 1 spec says that the &
>char is not allowed within an entity declaration but the section 2.4 on
>Char Data below says that they are. Section 2.4 seems to suggest that
>the following is o.k.
><!ENTITY punctuation "<&" >
I am guessing that what confused the issue was the sentence "They are also
legal within the literal entity value of an internal entity declaration".
The reason for this sentence is that AT THE TIME OF DECLARATION, < and & in
a literal entity value are not treated as markup delimiters.
2.4 says that
"The ampersand character (&) and the left angle bracket (<) may appear in
their literal form only when used as markup delimiters, or within a comment,
a processing instruction, or a CDATA section".
Now because < and & are not markup delimiters in a literal entity value at
the time of declaration, the additional sentence "They are also legal within
the literal entity value of an internal entity declaration" is added.
< and & are treated as markup delimiters only at the point of reference.
Hope this helps.
James Tauber / firstname.lastname@example.org http://www.jtauber.com/
Lecturer and Associate Researcher
Electronic Commerce Network ( http://www.xmlinfo.com/
Curtin Business School ( http://www.xmlsoftware.com/
Perth, Western Australia ( http://www.schema.net/
xml-dev: A list for W3C XML Developers. To post, mailto:email@example.com
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:firstname.lastname@example.org the following message;
To subscribe to the digests, mailto:email@example.com the following message;
List coordinator, Henry Rzepa (mailto:firstname.lastname@example.org)