OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: <& in internal entity values

[ Lists Home | Date Index | Thread Index ]
  • From: "James Tauber" <jtauber@jtauber.com>
  • To: "Peter Jones" <peterj@wrox.com>, "'XML-DEV'" <xml-dev@ic.ac.uk>
  • Date: Fri, 28 Aug 1998 21:11:24 +0800

-----Original Message-----
From: Peter Jones <peterj@wrox.com>

>Can anyone tell me why productions [9] 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    "<&" >
>
>Is it?

No.

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
--
James Tauber / jtauber@jtauber.com      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:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS