Oh well... it was right when I originally wrote it anyway :-)

--------------
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PROTECTED]



-----Original Message-----
From: Arnaud Le Hors [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 05, 2001 1:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [Bug 1236] New - incorrect NMTOKENS attribute normalization


Dean Roddey wrote:
> 
> I think that the parser is correct. The example given is of two NMTOKEN
> values separated by char refs that resolve to new lines. Normalization
> happens after character ref expansion, and the normalization indicates
that
> all whitespace should be reduced to a single space.
> 
> And besides, there are LOTS of attribute normalization tests in the
various
> test suites and the parser doesn't have any failures on that stuff, so I'm
> relatively confident that (unless something has changed for the worse
> recently) its working correctly.
> 
> So this:
> 
> <normNames attr="A&#xa;&#xa;&#xa;B"/>
> 
> Becomes:
> 
> <normNames attr='A\r\r\rB"/>
> 
> after the char refs are expanded. And then the whitespace is folded down
to
> single spaces, which leaves:
> 
> <normNames attr="A B"/>
> 

This is wrong actually. Have a look at the XML 1.0 _Second_Edition_
which clarified this point: http://www.w3.org/TR/REC-xml#AVNormalize

During the second phase of normalization, only space characters (#x20)
are collapsed.
And #xA is \n not \r, so the result should be:

<normNames attr='A\n\n\nB"/>
-- 
Arnaud  Le Hors - IBM Cupertino, XML Strategy Group

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to