W3C home > Mailing lists > Public > xml-editor@w3.org > January to March 2000

Re: misleading? comments in xml REC text on <

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 22 Mar 2000 19:04:37 GMT
Message-Id: <200003221904.TAA22388@nag.co.uk>
To: xml-editor@w3.org

Richard Tobin wrote
  (In a reply as I only just saw as I don't subscribe to this list
   and just looked in the archive now)

> The last paragraph of [1] may shed some light on the "No < in
> attribute values" WFC.

The paragraph cited is

  On the other hand, such a declaration seems to me to be harder to
  explain to users or implementors than the simple 'amp and lt are
  magic' rule that the spec currently uses.  Recall, moreover, that the
  goal is not simply to require that < and & characters be escaped where
  not markup, but to require that they be escaped with lt and amp.
  (Escaping them with something else is an error, I believe.  Not one
  that parsers are required to detect and report, but an error

Eeek, bad.

So there is (that paragraph claims) some magic property of lt.

If so is

  <!ENTITY ltamp '&#38;#60;&#38;#38;'>

OK as an entity declaration, and can I use that entity in an attribute
value, or is that not well formed due to <wfcnote id='CleanAttrVals'>

<p>The <termref def='dt-repltext'>replacement text</termref> of any entity
  referred to directly or indirectly in an attribute
  value (other than "<code>&amp;lt;</code>") must not contain
  a <code>&lt;</code>.

<x x="&ltamp;"/>

if ltamp does `contain an <' then this is not well formed.

If ltamp does not `contain an <' then neither does lt in which case
(other than "<code>&amp;lt;</code>") is redundant

Received on Wednesday, 22 March 2000 14:09:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:37:39 UTC