Talk:XML Whitespace

From TEIWiki
Revision as of 10:03, 30 August 2012 by Gerrit bruening (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

There is not only the problem of unwanted leading and trailing white space: Significant white space may also inadvertently be removed by database applications. Explicitly protecting significant whitespace is ugly. Which of all spaces are involved? And what is the best way to go? This problem may be discussed in the article. Or is it already discussed implicitly --gerrit.bruening 06:08, 8 August 2012 (EDT)

As indicated in the article, mixed-content elements are unfamiliar to many people who write XML database applications. They must be made aware of the issues here, or significant whitespace will get removed. The algorithm described in the section Mixed-Content Elements should be used. It would be nice to add a section at the end of this article giving an example not just in XSLT but in some database connection tool. If anyone has experience processing XML whitespace in mixed-content elements using a tool other than XSLT, please contribute sample code. John P. McCaskey 10:31, 9 August 2012 (EDT)

In the given example the inner element don't directly follow each other. What about
   <p>  This was  <emph>my</emph> <foreign>grande croissant</foreign>!
    </p>
? Is it obvious that the algorithm described will not create
  <emph>my</emph><foreign>grande croissant</foreign>
? --gerrit.bruening 04:03, 30 August 2012 (EDT)