[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [xtm-wg] XTM Whitespace Handling
Lars Marius Garshol wrote: > > * Murray Altheim > | > | I've had to modify local copies of the XTM DTD in order to keep the > | apache serializer from altering the whitespace in my documents. > > I'm tempted to call this a bug in the Apache serializer. If it has the > DTD available it should never inject whitespace into the content of > any element with #PCDATA content[1]. If it does not have the DTD > available it should never inject whitespace into the content of an > element that contains text nodes (in the DOM view). The problem (as documented) is not that they inject any whitespace, it's that they alter it at all. I agree that this is a bug, but it's not entirely: if there is no DTD, applications are free to do what they want. The serializer is an application, not part of the parser proper, so it's not really making an error. Now, if there were a DTD available, and that DTD specifies that xml:space is "preserve", the serializer won't alter the whitespace. > | The big question really is: is whitespace significant in XTM > | documents? > > In <baseNameString> and <resourceData> it certainly is. Agreed. The question was somewhat rhetorical. > It may be that the processing model should contain a section on how to > produce XTM documents from the abstract model, thus settling this > formally once and for all. This would certainly be helpful to implementors, who at this point should be our top priority. We need implementations. > | Do the base names > | > | "Niagara Falls" > | " Niagara Falls" > | "Niagara > | Falls" > | "Niagara Falls " > | "Niagara<tab>Falls" > | > | all match? > > According to annex F.2.1 they do not. > > | My recommendation (which I'm certainly open to discussing) would be > | to add > | > | xml:space (default|preserve) 'preserve' > | > | to those elements which we explicitly state that whitespace *is* > | significant. > > I'm not really for or against this, but I think it may be the wrong > fix. That is, I think it may be the Apache serializer that needs > fixing more than the XTM 1.0 DTD. So even if we do add this I think > this should be reported as a bug. As I said above, the XML 1.0 Recommendation does not prohibit XML applications from doing whatever they like with white space. The serializer is not "legally" doing anything wrong. > [1] If it does so on elements that have xml:space=default it may be > OK, but not, I think, if xml:space is not set. It is generally > _not_ safe to assume that anything that does not have > xml:space=preserve is fair game. Remember that xml:space is only a hint to applications, not the parser. But given that a number of applications (the apache serializer, for one) actually do follow its directive, I'm suggesting we add this to the DTD. It's not a backwards-compatibility problem, and should have no effect on current implementations other than that those built on commonly- available XML tools will behave more correctly. Murray ........................................................................... Murray Altheim, SGML/XML Grease Monkey <mailto:altheim@eng.sun.com> XML Technology Center Sun Microsystems, 1601 Willow Rd., MS UMPK17-102, Menlo Park, CA 94025 In the evening The rice leaves in the garden Rustle in the autumn wind That blows through my reed hut. -- Minamoto no Tsunenobu ------------------------ Yahoo! Groups Sponsor ---------------------~-~> Make good on the promise you made at graduation to keep in touch. Classmates.com has over 14 million registered high school alumni--chances are you'll find your friends! http://us.click.yahoo.com/n4HqaC/DMUCAA/4ihDAA/2n6YlB/TM ---------------------------------------------------------------------_-> To Post a message, send it to: xtm-wg@eGroups.com To Unsubscribe, send a blank message to: xtm-wg-unsubscribe@eGroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC