Subject: RE: [xsl] hard core xlt ;-) From: Joost Fleuren <joost@xxxxxxxxxxx> Date: Thu, 26 Jul 2001 15:27:49 +0200 |
Hi Dylan, could you post an code example of an XSLT that generates an XSLT? I could use an example. Kind regards, Joost Fleuren. > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Dylan Walsh > Sent: Thursday, July 26, 2001 1:32 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Cc: Elise D. > Subject: RE: [xsl] 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 > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] hard core xlt ;-), Dylan Walsh | Thread | RE: [xsl] hard core xlt ;-), Elise D. |
[xsl] RE: New ContextNode Question, abi ashiru | Date | [xsl] How to implement common funct, Haque, Suraiya |
Month |