[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Bruce,
At 01:27 PM 9/11/2004, you wrote:
No, you can't do this. (I assume you meant xsl:call-template name="..."/>.) But you could apply-templates select="..." to that node, and have a template to match it ... (in a mode if necessary).
Thinking of templates as subroutines, or functions, doesn't actually force you to invoke them by name -- they can still be matched, to whatever nodes you may happen to have around ... in fact this is the insight at the heart of Dimitre Novatchev's Functional XSL.
Re: [xsl] dynamically applying templates
Subject: Re: [xsl] dynamically applying templates From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 13 Sep 2004 12:00:15 -0400 |
Bruce,
At 01:27 PM 9/11/2004, you wrote:
I had thought it might be nice to able to name each template and somehow apply those in the above, but nothing I try seems to be valid (e.g. I can't get away with <xsl:apply-templates name="$source/*[node-name(.) = node-name(current())]">).
No, you can't do this. (I assume you meant xsl:call-template name="..."/>.) But you could apply-templates select="..." to that node, and have a template to match it ... (in a mode if necessary).
Thinking of templates as subroutines, or functions, doesn't actually force you to invoke them by name -- they can still be matched, to whatever nodes you may happen to have around ... in fact this is the insight at the heart of Dimitre Novatchev's Functional XSL.
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 ======================================================================
--+------------------------------------------------------------------ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx> --+--
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] dynamically applying template, Bruce D'Arcus | Thread | Re: [xsl] dynamically applying temp, Bruce D'Arcus |
Re: [xsl] schemas and xslt 2.0 (was, Bruce D'Arcus | Date | Re: [xsl] schemas and xslt 2.0 (was, XML User |
Month |
Keywords