[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] XSLT Hello World

Subject: Re: [xsl] XSLT Hello World
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxx>
Date: Mon, 24 Mar 2014 22:21:41 +0000

On Mon, Mar 24, 2014 at 4:05 PM, Wendell Piez <wapiez@xxxxxxxxxxxxxxx> wrote:
> <xsl:stylesheet version="2.0"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> </xsl:stylesheet>
> I.e., a stylesheet with no templates at all. (You can also write it as
> an empty element if you prefer.)

This is exactly the approach I took when  I was afforded the
opportunity to give an XSLT 1 presentation for a client.

> After having acknowledged our astonishment at the results of running
> this, we can talk about the built-in templates. And then we start
> writing templates of our own ... matching elements, not text nodes. We
> do this with a source document with mixed content (such as <doc>Hello
> <who>World</who></doc> ), (so we can try a few things out such as
> matching elements in line), and then a slightly more elaborate
> instance (perhaps including some comments or processing instructions
> so we can illustrate aspects of the data model, such as text nodes) .

The other thing  I did was to build in a skeleton of templates for
each type of input node and have them fill in what needs to go in each

> Take in a few points of fact, practice for an hour or two, and get a
> good night's sleep, and you no longer run the risk that you will be
> surprised by 'text()' in XSLT.

and that applies to the tiny percentage that have the advantage of
some sort of training or the availability of some sort of mentor in
the language.

> Talking about the processing model in the context of documents with
> mixed content also gives us an early opportunity to start thinking
> about XSLT's purposes, strengths and weaknesses.

ditto above.

Basically I agree with you on how it should be.

Some language communities (I am thinking of Python here) are very
effective at making the rank and file (those without the advantage of
formal training) think that their language is simple and easy to use
irrespective of the true picture.

Current Thread