At 09:01 AM 3/19/2003, Jeff wrote:
There are two parts to this. First, there are things that are reasonable
uses for XSLT. Some are hard right now, but solutions will be added to
XSLT 2.0 -- grouping, regular expressions and date handling are
examples. Some other things can be done, but will always be a little
difficult. Then again, there are things that XSLT will never do
well. Yesterday's thread about converting Cobol (or maybe Cobol Data) to
XML probably goes in that category.
Broadly speaking, XSLT is very good at "down-translations" (manipulating
information based on explicit markup structures and features), but not so
good for "up-translations" (inferring structures and features that are not
directly expressed in the markup). Regular expressions and more
sophisticated string handling in general, along with the nodeset()
function, will take it some way towards the latter. Grouping is a good
proof of this rule, as it's an up-translation (though not the most
challenging one).
If you want to know why this is, the historical context that Dave C. cited
is helpful; the first paragraphs of the XSLT Rec, where its design goals
are stated, are also worth contemplating.
A corollary to this principle is that XSLT is at its best when working over
XML whose design is well fitted to the task. From well-designed (and well
tagged) XML, most everyday applications will be "downhill". Poorly designed
XML makes the XSLT hard. (Though only remarked on occasionally, we see this
every day on this list.) Ironically, it seems these days that much of the
work to which XSLT is being put is really just to mitigate difficulties
caused by poor design (to wrestle the XML, that is, through some
combination of up- and down- translation, into something more tractable for
the next step).
Cheers,
Wendell
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list