Re: LibXML2 Indentation



On Wed, 2003-04-30 at 18:38, Noah Levitt wrote:
> On Wed, Apr 30, 2003 at 18:26:38 +0100, Bill Haneman wrote:
> > 
> > Yeah, in all the noise and flames a very reasonable (IMO) request got
> > lost, namely for indentation whitespace *between* XML elements, i.e.
> > outside of CDATA areas, which as we all know is *not* significant to
> > anything but us humans :-)
> 
> Are you sure? I could very easily be wrong, but I thought
> all whitespace was significant. Consider the <pre> tag in
> xhtml for example.

XML whitespace is a horrible topic, I am sorry I waded in here ;-)

You are right that I was speaking a bit too generally.
It depends on the DTD; in the case of XHTML and the <pre> tag, it's
legal to have content between that tag and the next one, so the
whitespace becomes significant.

So I guess to do this "right" requires that the XML output functions pay
attention to the DTD and only insert "formatting" (i.e. unsignificant)
whitespace between tags where other content (e.g. CDATA) isn't allowed.

But I may be remembering this all wrong....

- Bill
> 
> Noah





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]