[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSLT and nuts-and-bolts (follow-up)

  • To: xml-dev@l...
  • Subject: XSLT and nuts-and-bolts (follow-up)
  • From: Tom Moertel <tom-lists-xml-dev@m...>
  • Date: Wed, 16 Jan 2002 10:37:38 -0500
  • Organization: Moertel.Com

bolt puzzle
[My apologies if you are seeing this for the second time.  The first
email was apparently lost in transit, and so I am resending it now.]

A short while ago, I wrote a story in a weblog diary that managed to
work its way onto this list.  Normally I wouldn't post this kind of
thing here, figuring that this topic has been already discussed to
death, but since the diary draft made it here (and seemed to spark
some, ah, interesting responses), I feel obligated to follow up and
point you to the final version.

For those who didn't read it, in the story I shared a programming
puzzle that I solved a year of so ago when using XSLT to transform XML
documents into LaTeX documents (and also HTML documents, but I didn't
mention this in the diary).  I also shared my concerns about XSLT's
lack of support for nuts-and-bolts programming, often required to fill
minor gaps in XSLT's built-in transformation support.  To illustrate
my point I used a small example problem, having to do with the
manipulation of the text within the elements of my documents.  It's a
problem that, while common in many XML transformation jobs, was
surprisingly awkward to solve within XSLT.  Since XSLT's support for
processing the text within elements was limited, it seemed natural
to fill the gaps with a little XSLT programming, which would let me
process the text in passing, in context, and in a highly portable way.
But no elegant solution was to be found.

Some people, having read the diary draft, have dismissed the ideas it
contains because they were explained in the context of an XML-to-LaTeX
transformation problem, certainly not XSLT's forte.  However, the
points I made hold just as strongly for XML-to-XML and XML-to-HTML
transformations. In short, I suggest that XSLT provides half of a good
solution.  It makes it easy to transform element structures but falls
short on the other half of the job -- transforming the stuff inside
the elements. [1]

This limitation wouldn't be so bad if it weren't so difficult to write
nuts-and-bolts code in XSLT.  Again, XSLT seems to provide only half
of a good solution.  While it mandates a functional style of
programming, many common functional-programming idioms have no
convenient XSLT representation, and those that do are often grotesque.
(One has only to browse the online repositories of XSLT code to see
what I mean.) This deficiency makes gap-filling measures difficult.

(It is interesting to compare DSSSL to XSLT in this regard.  The two
seem like mirrored reflections of each another.  Where DSSSL is rich
in nuts-and-bolts programming support, XSLT is weak.  Where XSLT
shines with domain-specific convenience, DSSSL is lackluster.  I'd be
interested to know how criticisms of DSSSL influenced the design of
XSLT 1.0.  Did people think that DSSSL required too much programming?)

After I posted my diary story on kuro5hin.org, a number of regulars on
the site read it and suggested that I give it a good editing pass to
fix obvious deficiencies and then submit it to the general readership
of the site, which I did.  You can find the article here, along with
the follow-on discussion:

    http://www.kuro5hin.org/story/2002/1/15/1562/95011

While I am open to any comments and criticisms you may have about my
ideas, I would ask that you respond only to what is written in this
message or in the story linked above -- and not to what is written in
the diary entry, which is crude and incomplete.

Thanks for your time and any wisdom you may share.

Cheers,
Tom


[1] There are those who would argue that, if you have the need to
transform the text in your XML documents, the text hasn't been
sufficiently marked up.  However, it is often impractical (or
impossible) to dictate that all documents be marked up perfectly.
Sometimes we have little choice but to take what we are given.

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.