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

RE: hard core xlt ;-)

Subject: RE: hard core xlt ;-)
From: "Dylan Walsh" <Dylan.Walsh@xxxxxxxxxx>
Date: Thu, 26 Jul 2001 12:31:51 +0100
RE:  hard core xlt ;-)
Here are some comments what I consider to be two of the harder/hardest
things to do in XSLT:

1. "Generic" XSLT. Usually you write a stylesheet with assumptions about
the structure of the input XML. Generic XSLT makes no such assumptions.
It processes the source in terms of node types. An element contains
other elements, attributes, text, comments, etc. Start at the root node
and drill down, using recursion (e.g. element template calls
apply-templates on its subelements).
A few months after starting to learn XSLT, I created two stylesheets
using this approach. One of them takes any XML and creates a
colour-coded and indented HTML "pretty print" of the XML. You could use
it to present itself. The other stylesheet took created a specimen of
XML and generated a first-cut DTD. 
I had to ask a lot of questions on this list, but I learned an enormous
amount about XSLT.

2. XSLT that generates XSLT. The issue here is that you have two
namespaces for the XSLT, one for the actual instructions in the
stylesheet, and one for the XSLT you will be generating. It is not
always difficult, depending on how much variation there is in the output
stylesheet. The tricky thing is that you are effectively writing two
transformations at the same time, each applying to different source XML,
and you have to think about e.g. which transformation should make a
given decision.

Both of these are great lessons in XSLT. There are others
- simulating "looping" using recursion  
- the misc. sorting issues and the Muenchian method (will be obsolete in
XSLT 2.0?)

and I'm sure people can add to that list. Possibly the final step would
be to implement XSLT yourself, but you don't have to build cars to be a
good driver.

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


Current Thread

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
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.