- From: Shane P. McCarron <shane@aptest.com>
- Date: Thu, 06 Jul 2000 13:03:00 -0500
- To: Masayasu Ishikawa <mimasa@w3.org>
- CC: www-validator@w3.org
Ahhh!! Okay - I feel better now. I did not realize this difference
existed.
So, for forward looking documents, authors should escape all ampersands
and terminate all general entity references with semi-colons. That way
their documents will migrate to XHTML and friends that much more easily.
Masayasu Ishikawa wrote:
>
> "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
--
Shane P. McCarron phone: +1 763 786-8160
ApTest fax: +1 763 786-8180
mobile: +1 612 799-6942
e-mail: shane@aptest.com
Received on Thursday, 6 July 2000 14:03:04 UTC