[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Attribute normalisation and character entities

  • From: David Brownell <david-b@p...>
  • To: Richard Tobin <richard@c...>
  • Date: Thu, 27 Jan 2000 15:00:58 -0800

entity xd
Richard Tobin wrote:
> How is an attribute containing a character reference to to whitespace
> character (other than space) supposed to be normalised?
> Section 3.3.3 seems to me to say that character references are not
> subject to the translation to #x20 - the four bulleted points are
> an exhaustive disjunction.
> However the Oasis test suite, in tests sa02 and not-sa02, requires
> that they are replaced with spaces.
> Which is correct?

As a data point, those output tests were originally generated using
the then-current version of XP.  I suspect Tom Passim's observation
is close:  except for CDATA, _whitespace_ should be replaced with just
one space.

As I've commented elsewhere, I find that much of the entity processing
in the XML spec seems to be specified as a collection of special cases
(updated via errata as inconsistencies turn up) rather than being based
on simple and consistent rules.  This is another place that it seems to
be happening.

There are two curious points in 3.3.3 ... first, that character and
entity refs may appear, and second that CRLF sequences may appear (line
endings already having been normalized).

How would these appear?  If we assume that 4.4 applies first, then
those OASIS cases are correct, and they'd appear "doubly escaped" as:

	char-ref-attr = "foo &#38;#9; bar"
	ent-ref-attr1 = "AT&#38;amp;T"
	ent-ref-attr2 = "AT&amp;amp;T"
	crlf-attr     = "a&#xD;&#xA;b"

If we assume that 3.3.3 has needless duplication of 4.4 then I
can't see how the literal CRLF can ever show up as input to the
normalization, since line-ends have already been normalized.

On the other hand, I don't think anyone actually writes what
ent-ref-attr2 has -- "AT&amp;T" is it.  Perhaps 4.4 applies
first, _and_ there is needless duplication (for entity refs).
Or 3.3.3 has both duplication and several errors.

- Dave

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Unsubscribe by posting to majordom@i... the message
unsubscribe xml-dev  (or)
unsubscribe xml-dev your-subscribed-email@your-subscribed-address

Please note: New list subscriptions now closed in preparation for transfer to OASIS.


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.