Subject: Re: [xsl] Using variables in template match patterns? From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 11 Jul 2005 11:04:42 -0400 |
Cheers, Wendell
Hi all,
Can anyone tell me whether it is or isn't conform XSLT (1.0) to use variable references in template match patterns? I have something like the following, that is accepted by Xalan, but not by some other parsers:
<!-- top level --> <xsl:param name="selected" />
<xsl:template match="entry[@id = $selected]"> ... </xsl:template>
I also use variables to add a filter on a key pattern, something like this:
<xsl:key name="selected-entries" match="entry[@parent-id = $selected]" use="@id" />
Again, Xalan is happy, but some other parsers aren't..
Who is right?
====================================================================== 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 ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Using variables in template m, Geert Josten | Thread | Re: [xsl] Using variables in templa, Geert Josten |
Re: [xsl] Creating Namespace Nodes, David Carlisle | Date | [xsl] Entities and copy-of, Karl Funk |
Month |