This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: hard core xlt ;-)
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] hard core xlt ;-)
- From: "Elise D." <tyris_azriel at yahoo dot fr>
- Date: Thu, 26 Jul 2001 17:14:04 +0200 (CEST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
well, i like the way you think about what is hard or
not. i tryed for a first time to make "generic" xsl,
meaning i never use the name of a tag, but only for a
defined hierarchy/structure of the xml.
so if i've well understood the way it should be done,
i should detect the type of the node, detect what it
contains .... is it right ?
well, if you ever have a small example of doing this,
it would be great :-)
thanks again, this is really a good idea...
Elise
--- Dylan Walsh <Dylan.Walsh@Kadius.Com> a écrit : >
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
>
___________________________________________________________
Do You Yahoo!? -- Vos albums photos en ligne,
Yahoo! Photos : http://fr.photos.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list