|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: optional children
Hi Andrew,
> I want to output <foo/> if and only if element <a> has child <b>,
> with optional children <c> and <d>.
In other words, you want to output <foo> if it has a child <b> and it
doesn't have any other children that are not <c> and <d>:
<xsl:template match="a">
...
<xsl:if test="b and not(*[not(self::c or self::d)])">
<foo />
</xsl:if>
...
</xsl:template>
I hope that's what you were after.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








