Re: [xsl] Embedded bold,italic,anchors etc.

Subject: Re: [xsl] Embedded bold,italic,anchors etc.
From: Craig Riley <craig@xxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Jun 2008 12:35:59 -0400
Having a few "doh!" moments at the moment. I already thought that
using smaller templates was something I'd go back and change, having
got the recursion working now I just keep thinking how crap what I've
done is lol

Always the case in coding when you build something first time I guess.
Fortunate thing is that I was only building a test page to test the
new XML system our editors are using. When I build the CMS I can at
least start again :)

Does it matter what order the recursion occurs in, I assume each time
you <xsl:apply-templates/> it goes through every template again!?


Cheers


Craig


Quoting Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>:


Craig,

At 11:10 AM 6/11/2008, you wrote:
From what I have read I was probably using the value-of instead of
the recursive technique somebody suggested. For what it's worth this
is the code I have to date, I'm sure there's tons of things wrong with
it but that's part of learning! I can already see I'm not using
templates nowhere near enough! :(

If it's any comfort, this is the thing that generally requires the most getting-used-to from beginners. Experts argue about why this is. But there is agreement that when possible, many small templates are greatly preferable than few larger templates, for a number of reasons both subtle and not-so-subtle. In particular, the "recursive descent" processing model allows the complexity of your code to be reduced exponentially in cases where your input structures are not perfectly regular, which is often the case with XML data.

The recursive technique is bread and butter for XSLT. We live by it.
Those who don't like it or have no use for it should probably be doing
XQuery or something else altogether.

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
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
======================================================================



---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.

Current Thread