- From: Masayasu Ishikawa <mimasa@w3.org>
- Date: Fri, 07 Jul 2000 02:57:56 +0900
- To: www-validator@w3.org
"Shane P. McCarron" <shane@aptest.com> wrote:
> "Shane P. McCarron" wrote:
> >
> > Gerald Oskoboiny wrote:
> > > There are some cases where the ampersands don't need to be
> > > escaped, like: <p>foo & bar</p>, or <a href="foo&_bar">
> > >
> >
> > I don't think I agree. In SGML, an ampersand always introduces an
> > entity reference. If you want to actually use an ampersand, you are
> > required to use &. I don't see any way around this requirement.
>
> Okay... The XML specification is pretty clear on this, and is available
> on-line at http://www.w3.org/TR/REC-xml
Well, you're right in terms of XML, but you're wrong in terms of SGML.
This is where SGML and XML differ.
"Comparison of SGML and XML" [SGML-XML] says:
XML imposes the following restrictions not in SGML:
* Entity references
+ Entity references must be closed with a REFC delimiter
(snip)
* Character references
+ Character references must be closed with a REFC delimiter
(snip)
* Other
(snip)
+ When < and & occur as data, they must be entered as < and
&
[SGML-XML] http://www.w3.org/TR/NOTE-sgml-xml
Regards,
--
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium
Received on Thursday, 6 July 2000 13:58:00 UTC