5 Nov 2003 12:25
Re: Suggestion: use CSS to detect when spaces should be preserved
Manuel Collado <mcollado <at> fi.upm.es>
2003-11-05 11:25:01 GMT
2003-11-05 11:25:01 GMT
Hussein Shafie wrote: > Eric van der Vlist wrote: > >> Currently, XEE relies on the xml:space attribute (usually defaulted in a >> DTD or schema) to detect when spaces need to be preserved. This info is >> also available in the CSS stylesheet (white-space attribute) and I think >> that in most cases, that's easier for a "power user" to fiddle the CSS >> than the DTD. >> >> Why not use the information of the CSS stylesheet (when available) and >> not normalize spaces when white-space is set to "pre"? > > > Your suggestion cannot be easily implemented given the architecture of XXE. Probably because CSSs are used at browse/edit time, and not at load/save time. Editing formatted text requires no only 'whitespace: pre' in CSS, but also to preserve newlines at load/save. Otherwise the formatting will be lost between editing sessions. On other hand, the 'whitespace: pre' option could (should?) be used to handle the 'return' key. In this case it could behave like inside XML comments: it simply inserts a newline. Otherwise it could maintain its actual behaviour: split the element at the caret position. > > However you are right in saying that XXE could have a method other than > xml:space="preserve" to specify that spaces need to be preserved for > some elements.(Continue reading)
RSS Feed