Re: indentation

Subject: Re: indentation
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Wed, 10 Nov 1999 13:20:22 -0500
At 05:12 PM 11/10/1999 +0100, Marius.Hanssen@xxxxxxxxxxxxxx wrote:
I am new to this list (and to the world of xml/xsl), and
I was wondering how to indent the first line of my
paragraphs.
I am using IE5, because I am writing this for a
University paper, and I have to deliver my paper in a
way that most people can read.

Here's what happens when IE5 is served an XML document:


- IE5 looks to see if the document specifies an XSL stylesheet.
- If no XSL stylesheet is specified, IE5 uses its "default" XSL stylesheet. This displays the document simply as a collapsible/expandable tree of nodes. Functional but boring, and there's no provision for things like "indent the first line of all paragraphs."
- If an XSL stylesheet IS specified, IE5 uses that stylesheet to transform and render the document.


Now, that 3rd bullet may sound pretty good at first glance, but there's a hidden gotcha (which, from your posting, it wasn't clear that you understood): IE5 works by internally transforming the XML to HTML (using the rules in either the default or specified stylesheet) and then displaying THAT. So relying on IE5 will also require that you consider how to indent the first line of an HTML paragraph; if you know how to do that -- via CSS, the dreaded single-pixel-.gif trick, or whatever -- then you should be set.

Assuming, of course, that you know enough XSL to create the stylesheet to override IE5's default one.

Before you embark on that, be aware that the version of XSL that IE5 understands is several generations removed from the current version of the XSL standard -- the differences are quite large. MS claims that they will be updating IE5 when the standard reaches its final W3C Recommendation form, so if you've invested in learning (and using) the current IE5 flavor, your documents will soon be unreadable by anyone except those using the outdated version of IE5. :)

Another alternative is to learn the current version of the official standard and use *it* to transform your XML into HTML (replete with CSS, single-pixel-.gif's, whatever). This will involve obtaining some XSL engine other than IE5; you can find pointers to them at http://www.xmlsoftware.com. Many subscribers to this list use XT and/or LotusXSL.

Good luck!


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread