Subject: Re: [xsl] how to test for the element type of the current node From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 02 Jul 2003 13:18:04 -0400 |
That was actually one of the alternatives I looked at. I discarded it because
I didn't know how to select "non-B children of A", now I know that you can use
match="A/*[not(self::B)]" (true?)
David pointed out that I could achieve my goal of handling B specially iff it's a child of A using a template matching A/B. In fact, using such a template would be required because xsl:template is not scoped and can only occur at the top level, so I can't put one inside the xsl:template for A.
This, btw, appears bad style: you're adding top-level elements to your XSL that really only have a meaning inside a subtree of your input DOM. It's fragile because you have related pieces of style sheet spread out all over your style sheet, and it also seems prone to breaking if you ever change your DTD. (Maybe it's a design limitation of XSLT?)
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 ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] how to test for the eleme, David Carlisle | Thread | RE: [xsl] how to test for the eleme, Jim Fuller |
Re: [xsl] if statement, Martin Klaffenboeck | Date | Re: [xsl] xsl:sort in old MSXML, David Carlisle |
Month |