xsl-list
[Top] [All Lists]

RE: template match : node-set paring through multiple-axis relationships

2003-06-04 07:13:56
If I understand what you're saying, wouldn't it fit your needs
to have an "otherwise" that applies templates to . in a 
different mode?
(as above)
Then you can have all the other kinds of template matching you want
for b nodes, e.g.

<xsl:template match="b[conditions]" mode="different">
 ...
</xsl:template>

Lars,

Yes, this would be the ideal case. I had read the XSL2.0 command
"xsl:next-match" and thought that this would be a good thing to use, but
without 2.0 I can't very well use it.  ;)

If a template has a mode, then will it be matched by default, or only if the
mode is called?  I considered this as an option, but I did not experiment
with it much, because it did not seem appetizing at the time to generate
different mode-names (of course, I'm generating name mangle prefixes now, so
it would probably not be hard to morph my Nasty Looking (TM) solution into
something like this).

But as you mentioned, and I alluded to earlier, the generated code need not
be pretty (or fast, for my purposes!) so as long as something works pretty
well, I will be happy with it.  However, I'm sure that I will be optimizing
the generated output sometime in the future. :)

Jonathan

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list