This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: two issues with XSLT processors -- xsltproc and xalan
- From: Daniel Veillard <veillard at redhat dot com>
- To: Bob Stayton <bobs at sco dot com>
- Cc: "Robert P. J. Day" <rpjday at mindspring dot com>,docbook apps list <docbook-apps at lists dot oasis-open dot org>
- Date: Mon, 17 Mar 2003 12:16:21 -0500
- Subject: Re: DOCBOOK-APPS: two issues with XSLT processors -- xsltproc and xalan
- References: <Pine.LNX.4.44.0303170946270.10157-100000@dell>
- Reply-to: veillard at redhat dot com
On Mon, Mar 17, 2003 at 09:44:11AM -0800, Bob Stayton wrote:
> On Mon, Mar 17, 2003 at 11:06:48AM -0500, Daniel Veillard wrote:
> > On Mon, Mar 17, 2003 at 09:50:57AM -0500, Robert P. J. Day wrote:
> > > <xsl:output indent="yes"> to get indented, hierarchical output:
> > >
> > > 1) works great with xalan. xsltproc, on the other hand, doesn't
> > > seem to recognize this attribute although, in all fairness,
> > > no XSLT processor is *required* to do so
> >
> > It does for me, I use it all the time :-)
>
> It works for me with xsltproc as well (libxml 20504,
> libxslt 10027). In the case of fo output, there are many
Okay, the whole problem is for HTML output. Basically libxslt/libxml2
does not indent, it just use line returns. The reason is taht HTML output
is targetting web browsers, and web browsers acts as a very annoying
population when it comes to reacting on white space, seems none of them
really follow the rules of HTML whitespace significance, and as a result
doing a real indenting is very tricky to get right on the full set of
existing browsers. So for HTML output I only do the minimal work allowing
to keep the output readable but not taking any risk.
HTML and XML serialization code are completely different in libxml2.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard at redhat dot com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/