[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-Porters] Need authoritative Apple refs for EOL == CR



On Mon, 1 Mar 1999, Chris Nandor wrote:

> At 13.04 -0500 1999.03.01, Arved Sandstrom wrote:
> >The consensus now appears to be this: XML does NOT require \n == \xA
> >internally, but according to the spec an XML processor _must_ pass \xA out
> >to an application, in place of \xD\xA or \xA. Despite the fact this is not
> >so attractive for us on the MacOS side, I have to reluctantly concur with
> >this interpretation, after really carefully re-reading the EOL handling
> >section in the XML spec. (It sort of helps that Larry Wall pointed this
> >out in the first place... :-))
> 
> I'm not sure I follow.  What is the consensus?  That XML::Parser should
> return \xA, but that string methods should convert to \n?  Or that it
> should indeed return \xA in string methods?
> 
Sorry, should have explained that more clearly. Enno Derksen originally
started out by talking about stringification methods, but that particular
topic is sort of by the wayside at the moment. We're back to a more
fundamental discussion of: what is \n on various platforms?

The consensus, if I may refer to it as such, is that a conforming XML
processor, such as XML::Parser, must (is required by the XML spec) return
\xA to an XML application. This is actually quite clear.

I'm leaving stringification methods for round 2. Things like this are
covered in the DOM spec (such as 'toString'), and I'm re-reading that
myself.

Where the first source of difficulty arises is in convincing XML extension
authors that if original content is being processed by XML::Parser s.t.
EOL's are getting made into \xA characters, they can't just pass the XML
back out and compare it to the original content. Well, obviously on Unix
they can. I'm trying to argue, over on Perl-XML, that under MacOS you
can't.
 > 
> >So far the discussion has been quite reasonable (Larry appears to be
> >supportive, in particular), but just today Tim Bray, who is directly
> >responsible for this chunk of the spec, also joined in. He clearly is not
> >aware that \n != \xA on MacOS, and I need a good, solid authoritative ref
> >from Apple docs (more than one is even better) saying that the line
> >terminator for Mac apps is a CR (\xD), which I can refer him to. I've
> >looked at IM:Text, IM:Printing, IM:Files, searched on the Apple Developers
> >site, and I can't find a thing, except one ancient Tech Note pertaining to
> >A/UX <=> HFS file translations. So, help! :-)
> 
> Why doesn't he just take the word of everyone who obviously knows it to be
> true?  How about a Mac program that prints the value of \n as its numeric
> equivalent?  :)
> 
> I did some searching and could not find anything.  I will let you know if I do.
> 
I didn't mean to suggest that Tim Bray has taken a position that I, or
anyone else trying to clarify the MacOS situation, are full of it. So far
he just indicated in a post that he's completely unaware that \n != \xA.
I'm just thinking that an official Apple reference or two would be more
helpful, something he can look up himself, than me or anyone else just
telling him that this is how it is.

But thanks for anything you can dig up. Arved



==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-porters-request@macperl.org