[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [office] Fwd: ODF spec question (white-space processing)
On 11/09/06, David Faure <faure@kde.org> wrote: > I am just not sure I fully understand your suggestion. If we keep the term "collapsed" > and remove the reference to HTML, then we are basically deciding on the current > KOffice behavior, i.e. <text:p> followed by spaces leaves one space visible - right? > While I should probably be happy about that, when reading the Intel testcases I did > realize that many people writing XML by hand will probably do the same as they did, > and write > <text:p> > My paragraph text > </text:p> > which in their mind shouldn't lead to whitespace before and after the text > (text:s should be used for that). If ODF is an XML application then follow the XML rules, not HTML ones. JC used a trick to make it look pretty without modifying whitespace. <text:p >My paragraph text</text:p> > > So, to be clear, I'm happy with the OpenOffice.org behavior, but it should be made > explicit in the specification. Not by talking about HTML, but by writing "any whitespace > at the beginning or end of a paragraph is removed" or something like that. XSLT uses the phrase 'normalize' http://www.w3.org/TR/xpath#section-String-Functions quote The normalize-space function returns the argument string with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters by a single space. Whitespace characters are the same as those allowed by the S production in XML. end quote. HTH -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]