Not necessarily. Carefully define which new-lines have to be ignored.
This may yield something complex. But then, you are still free to ignore
more new-lines than that in several different places, thus reducing the
problem. In other words, it is up to the formatting program to decide
how to interpret them. If it decides to throw out a few more new-lines
at the beginning or end of various data elements, life becomes much
easier.
You might have countless hacks, but since formatters ar allowed to
format things differently, does it matter?
Take this example:
Here's some text<P>And some more text
<P>
And some final text.
SGML may say this:
\nHere's some text
(P
)P
And some more text\n
(P
)P
\nAnd some final text.
But the formatter is still free to toss those new-lines at the beginning
and end of each paragraph (and in fact it had better if you don't want
a space at the beginning of your paragraphs).
tom