Subject: Re: match on attribute anywhere
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 14 Feb 2002 11:51:54 -0500
|
Jeni,
This solution is nice because its layering of stylesheets (using the
xsl:import mechanism) mirrors the layering of Andrew's presumed use case,
where someone has gone in after the file creation and arbitrarily scattered
@mark attributes around.
I don't know if that's deeply significant, but it is interesting, and
prompts one to notice a class of problems (namely those where you need two
templates to fire on the same node, one to address one layer, another to
address a layer "on top") that can be addressed using this feature of
xsl:apply-imports. Surprise: it works as intended. And that class turns out
to be broader than just customizing standard stylesheets. (Like the class
of problems addressed by keys, which is broader than cross-referencing.)
Cheers,
Wendell
At 09:13 AM 2/14/02, Jeni wrote:
> However, if you have several templates and the knowledge that @mark
> could appear on any element, it wouldnt be so easy. It would be
> great to add just one extra template to match @mark anywhere, and
> highlight its contents.
Actually, this is a situation xsl:apply-imports can actually be useful!
Have your general templates, each dealing with individual nodes in one
stylesheet (I'll call it base.xsl).
Then create another stylesheet that *imports* that base stylesheet:
....
======================================================================
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
| Current Thread |
- Re: match on attribute anywhere, (continued)
- Trevor Nash - Thu, 14 Feb 2002 05:35:31 -0500 (EST)
- Andrew Welch - Thu, 14 Feb 2002 08:47:48 -0500 (EST)
- Jeni Tennison - Thu, 14 Feb 2002 09:10:32 -0500 (EST)
- Andrew Welch - Thu, 14 Feb 2002 09:43:15 -0500 (EST)
- Wendell Piez - Thu, 14 Feb 2002 11:49:18 -0500 (EST) <=
- Bryan Rasmussen - Thu, 14 Feb 2002 12:10:22 -0500 (EST)
- Wendell Piez - Thu, 14 Feb 2002 13:40:03 -0500 (EST)
- Jeni Tennison - Thu, 14 Feb 2002 12:26:12 -0500 (EST)
- Trevor Nash - Thu, 14 Feb 2002 15:23:49 -0500 (EST)
|
|