[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Sorry,
Brain fart, my problems were due to a typo that I overlooked for a very long time.
<xsl:template match="b[c]"/>
does work as expected.
Sandy McArthur wrote:
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: [xsl] template match question -sorry
Subject: Re: [xsl] template match question -sorry From: Sandy McArthur <sandymac@xxxxxxx> Date: Fri, 02 Aug 2002 12:25:31 -0400 |
Sorry,
Brain fart, my problems were due to a typo that I overlooked for a very long time.
<xsl:template match="b[c]"/>
does work as expected.
Sandy McArthur wrote:
I'm having trouble figuring out how to have two templates that match the same element but differ based on if a child elements exists.
Source fragment:
<a> <b> <c> foo </c> </b>
<b> bar </b> </a>
I'm having trouble writing a template match for 'b' when it has a 'c' element. Here is what seems logical to me but won't work and any little varriation I come up with fails too:
<xsl:template match="b[c]"/>
That form seems logical to me because this at least makes the template match but how I want it to:
<xsl:template match="b[//c]"/>
What am I doing wrong and/or how is my thinking wrong?
FYI: I'm using the Xalan that comes with the Sun 1.4 JVM on linux.
Thanks, Sandy McArthur
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] template match question, David Carlisle | Thread | Re: [xsl] template match question, Marrow |
Re: [xsl] template match question, Marrow | Date | [xsl] XML to XML transformation, Subramanian Subraman |
Month |